Poll

Was this module useful, and helpful?

Yes :)
274 (87.5%)
No :(
39 (12.5%)

Total Members Voted: 0

  • Print

Author Topic: Player Chat Tags [2.58v]  (Read 620597 times)

0 Members and 1 Guest are viewing this topic.

Offline seabeds

  • Newbie
  • *
  • Posts: 35
  • Karma: 0
    • Seaside TTT
Re: Player Chat Tags [2.57v]
« Reply #165 on: March 22, 2015, 07:02:25 am »
I was able to change and add a tag to the groups i so wanted. But the name of the players are the same color (i don't want that). How can i stop that? I'd like their name the normal colors (green when terrorist, yellow when spectator and blue when detective). Here's the lua code:


Code: Lua
  1. -- Client Side
  2. -- Originally Made By: TyGuy
  3. -- Edited By: Mr. Apple
  4.  
  5. -- Further edits by: Bytewave
  6.  
  7. local Tags =
  8. {
  9. -- Do not add []s here.
  10. --Group    --Tag     --Color
  11. {"admin", "Admin", Color(0, 0, 255, 255) },
  12. {"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
  13. {"owner", "Owner", Color(255, 0, 0, 255) },
  14. }
  15.  
  16. hook.Add("OnPlayerChat", "apple_chat_tags_OnPlayerChat_hook", function(ply, Text, Team, PlayerIsDead)
  17.         if ply:IsValid() then
  18.                 for k,v in pairs(Tags) do
  19.                         if ply:IsUserGroup(v[1]) then
  20.                                 if Team then
  21.                                                 if ply:Alive() then
  22.                                                         chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  23.                                                 else
  24.                                                         chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  25.                                                 end
  26.                                                 return true
  27.                                 end
  28.                                 if ply:IsPlayer() then
  29.                                         if ply:Alive() then
  30.                                                 chat.AddText(Color(255, 0, 0, 255), "", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  31.                                                 return true
  32.                                         elseif !ply:Alive() then
  33.                                                 chat.AddText(Color(255, 0, 0, 255), "*DEAD* ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  34.                                                 return true
  35.                                         end
  36.                                 end
  37.                         end
  38.                 end
  39.         end
  40. end)

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.57v]
« Reply #166 on: March 22, 2015, 05:33:10 pm »
I was able to change and add a tag to the groups i so wanted. But the name of the players are the same color (i don't want that). How can i stop that? I'd like their name the normal colors (green when terrorist, yellow when spectator and blue when detective). Here's the lua code:


Code: Lua
  1. -- Client Side
  2. -- Originally Made By: TyGuy
  3. -- Edited By: Mr. Apple
  4.  
  5. -- Further edits by: Bytewave
  6.  
  7. local Tags =
  8. {
  9. -- Do not add []s here.
  10. --Group    --Tag     --Color
  11. {"admin", "Admin", Color(0, 0, 255, 255) },
  12. {"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
  13. {"owner", "Owner", Color(255, 0, 0, 255) },
  14. }
  15.  
  16. hook.Add("OnPlayerChat", "apple_chat_tags_OnPlayerChat_hook", function(ply, Text, Team, PlayerIsDead)
  17.         if ply:IsValid() then
  18.                 for k,v in pairs(Tags) do
  19.                         if ply:IsUserGroup(v[1]) then
  20.                                 if Team then
  21.                                                 if ply:Alive() then
  22.                                                         chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", team.GetColor(ply:Team()), ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  23.                                                 else
  24.                                                         chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", team.GetColor(ply:Team()), ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  25.                                                 end
  26.                                                 return true
  27.                                 end
  28.                                 if ply:IsPlayer() then
  29.                                         if ply:Alive() then
  30.                                                 chat.AddText(Color(255, 0, 0, 255), "", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", team.GetColor(ply:Team()), ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  31.                                                 return true
  32.                                         elseif !ply:Alive() then
  33.                                                 chat.AddText(Color(255, 0, 0, 255), "*DEAD* ", color_white, "[", v[3], v[2], color_white, "]", Color(50, 50, 50, 255), " ", team.GetColor(ply:Team()), ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  34.                                                 return true
  35.                                         end
  36.                                 end
  37.                         end
  38.                 end
  39.         end
  40. end)



Try that.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nex86

  • Newbie
  • *
  • Posts: 22
  • Karma: 0
Re: Player Chat Tags [2.57v]
« Reply #167 on: March 24, 2015, 11:51:08 am »
since the latest gmod update, the script no longer works.

Player names in the chatbox went back to yellow again and without ranknames.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.57v]
« Reply #168 on: March 24, 2015, 01:16:23 pm »
since the latest gmod update, the script no longer works.

Player names in the chatbox went back to yellow again and without ranknames.

Think about it, look how many people have viewed this thread, and how many comments it gets. It's been about 20 days since the Garry's Mod update, and I've posted since then, so don't you think that someone would say this on the same day the update was implanted on all the servers. So I'm going to say this to you, obviously w/e gamemode you're on, it's broken, not my addon. My addon is very simple, and is garry ever updated the chat hooking, it would break every gamemode, and most addons, it would be retarded if he did.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nex86

  • Newbie
  • *
  • Posts: 22
  • Karma: 0
Re: Player Chat Tags [2.57v]
« Reply #169 on: April 04, 2015, 04:34:26 pm »
works fine now.
The only issues I could find is when using PAC3 editor, the chat commands to trigger an event don't work when a group is assigned to a TAG.
I have to create another group that your chat plugin doesn't know in order to get them to work...

is there a way to fix this?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.57v]
« Reply #170 on: April 05, 2015, 01:33:52 am »
works fine now.
The only issues I could find is when using PAC3 editor, the chat commands to trigger an event don't work when a group is assigned to a TAG.
I have to create another group that your chat plugin doesn't know in order to get them to work...

is there a way to fix this?

Umm not sure, not familiar with the addon, try making a request in general discussions on this forum and ask about it. Sorry I can't provide anything more useful.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Player Chat Tags [2.57v]
« Reply #171 on: April 05, 2015, 06:53:19 am »
Uh, no.
General is not the area for the question. Though it might be group related, it's either PAC3 adjusting chat, or your release, or mixture of both plus whatever else he might have adjusting chat hook.
Sounds like ULX is working as it should, just some other scripts aren't in relation to groups.

This is why Team Ulysses stays away from adjusting chat and custom chatboxes and all the other cute-sy things other devs try to do with chat.
So much can go wrong once more PlayerSay hooks are thrown in.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.57v]
« Reply #172 on: April 05, 2015, 05:09:15 pm »
Uh, no.
General is not the area for the question. Though it might be group related, it's either PAC3 adjusting chat, or your release, or mixture of both plus whatever else he might have adjusting chat hook.
Sounds like ULX is working as it should, just some other scripts aren't in relation to groups.

This is why Team Ulysses stays away from adjusting chat and custom chatboxes and all the other cute-sy things other devs try to do with chat.
So much can go wrong once more PlayerSay hooks are thrown in.

And that's the way it is, I guess.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline OverlordTomala

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Chat Tags [2.58v]
« Reply #173 on: April 08, 2015, 05:34:26 am »
I'm also using PAC 3 and getting the same issue. That's for my Sandbox server and Cinema. I have an Elevator server running without PAC 3, but it still doesn't appear to work.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.58v]
« Reply #174 on: April 08, 2015, 10:09:44 pm »
I'm also using PAC 3 and getting the same issue. That's for my Sandbox server and Cinema. I have an Elevator server running without PAC 3, but it still doesn't appear to work.

Can you link me to this "PAC 3", so I can investigate, because I don't know what PAC 3 is, I don't really play garry's mod anymore, which I'd say is most developers now adays.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

<Removed at Request>

  • Guest
Re: Player Chat Tags [2.58v]
« Reply #175 on: April 11, 2015, 02:59:15 am »
Hi.
I'm pretty new to this whole server running thing and Ulysses but I have been using this addon since I started. Yesterday however, I checked on my server and found that chat tags no longer worked so came here to try and update it. Yet, after updating all the files I still can't see any chat tags.
I have tried to keep my server without mods and haven't changed or added anything to the server. Is there anything I could do to try and fix it?

Also, sorry to hear you're moving away from gmod Apple. :)

Thanks,
<Removed at Request>
« Last Edit: February 18, 2018, 01:38:58 pm by JamminR »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags [2.58v]
« Reply #176 on: April 12, 2015, 09:39:33 pm »
Hi.
I'm pretty new to this whole server running thing and Ulysses but I have been using this addon since I started. Yesterday however, I checked on my server and found that chat tags no longer worked so came here to try and update it. Yet, after updating all the files I still can't see any chat tags.
I have tried to keep my server without mods and haven't changed or added anything to the server. Is there anything I could do to try and fix it?

Also, sorry to hear you're moving away from gmod Apple. :)

Thanks,
<Removed at Request>

make sure you're using the right version for your server, there is a mange version then a automatic one.
« Last Edit: February 18, 2018, 01:38:32 pm by JamminR »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Consortias

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Player Chat Tags [2.58v]
« Reply #177 on: April 23, 2015, 10:05:49 pm »
Hello,

I have tried installing this add-on correctly reading through every post on this thread.. I have the latest ULib and ULX.. My user-groups have been created.. And the add-on was placed correctly.

However the add-on is not recognizing any of the groups, absolutely none of them. I am receiving absolutely zero script errors or console errors.. It just doesn't display anything.. It uses normal chat...

Any help?

(Note: The GameMode I'm using is Murder)

Offline eliman

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: Player Chat Tags [2.58v]
« Reply #178 on: April 24, 2015, 12:09:30 am »
I can also confirm that the tags aren't working. I've tried both managed and unmanaged and still no luck. Everything ULX related is up to date.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Player Chat Tags [2.58v]
« Reply #179 on: April 24, 2015, 10:11:59 am »
Please tell me you two have tried restarting your servers...
Once you get to know me, you'll find you'll have never met me at all.

  • Print