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 Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #60 on: November 11, 2013, 03:02:12 am »
Had the same problem, it happens when the console says something, a simple ply:IsValid() fixes this:
Code: Lua
  1. hook.Add("OnPlayerChat", "Tags", function(ply, Text, Team, PlayerIsDead)
  2.         if ply:IsValid() then
  3.                 for k,v in pairs(Tags) do
  4.                         if ply:IsUserGroup(v[1]) then
  5.                                 if Team then
  6.                                                 if ply:Alive() then
  7.                                                         chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  8.                                                 else
  9.                                                         chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  10.                                                 end
  11.                                                 return true
  12.                                 end
  13.                                 if ply:IsPlayer() then
  14.                                         if ply:Alive() then
  15.                                                 chat.AddText(Color(255, 0, 0, 255), "", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  16.                                                 return true
  17.                                         elseif !ply:Alive() then
  18.                                                 chat.AddText(Color(255, 0, 0, 255), "*DEAD* ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  19.                                                 return true
  20.                                         end
  21.                                 end
  22.                         end
  23.                 end
  24.         end
  25. end)


I fixed this. Sorry I ignored you. I didn't read the code and what Jammar said. I've been really busy with other things. So I'm updated this now, thanks for your help.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Goku

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
  • Carpe Diem.
    • Fight Club
Re: Player Chat Tags 2.5
« Reply #61 on: December 09, 2013, 03:53:10 am »
Hello,

First of all I would like to express my satisfaction for this addon as it works like a charm on my TTT Server.

However, I have noticed that the color of ranks/names in chat are not affected when players use the 'Suit Zoom' command. If you are not familiar with it, it allows a players to say a prepared sentence instantly such as: "Goku is a Traitor".
I was wondering if I could be given some tips on how to make it compatible.

Thank you.
Destruction is a form of creation.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #62 on: December 10, 2013, 12:55:52 am »
Hello,

First of all I would like to express my satisfaction for this addon as it works like a charm on my TTT Server.

However, I have noticed that the color of ranks/names in chat are not affected when players use the 'Suit Zoom' command. If you are not familiar with it, it allows a players to say a prepared sentence instantly such as: "Goku is a Traitor".
I was wondering if I could be given some tips on how to make it compatible.

Thank you.

If Suit Zoom is an extra addon for TTT, if you would please provide a link to it or share it's code I will look at it and see why it doesn't work. Most likely is not working because it's using it's own chat.Addtext, with it's own colour (basically, you're not saying anything when ever you use the command, it just replace what you said with that). Chances are, it would require editing to make it work correctly for your needs, which most likely are not that hard.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Goku

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
  • Carpe Diem.
    • Fight Club
Re: Player Chat Tags 2.5
« Reply #63 on: December 10, 2013, 07:35:29 am »
If Suit Zoom is an extra addon for TTT, if you would please provide a link

Well actually, this Suit Zoom key is something you will find in the Options of Gmod. The Suit Zoom is what other gamemodes use to zoom in, whereas on TTT it has been modified to serve another purpose.
The command itself is called ttt_radio (Bottom of the page http://ttt.badking.net/help).

If you need anymore information, just ask.
« Last Edit: December 10, 2013, 07:37:08 am by Goku »
Destruction is a form of creation.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #64 on: December 10, 2013, 03:35:56 pm »
Urghh.. I don't like TTT. I'd rather not make edits for it.

This addon works fine, it just won't work with 'Suit Zoom' because it has it's own chat.Add function, and it would require more effort to fix than to just not use it.. so with that being said, I'm sorry, I can not really help.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Goku

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
  • Carpe Diem.
    • Fight Club
Re: Player Chat Tags 2.5
« Reply #65 on: December 10, 2013, 05:20:09 pm »
I was afraid you would say that. In any case thank you for the attempt to help.

Out of curiosity, is your deep hatred for TTT directed towards the actual gameplay, or the lua side of things?
Destruction is a form of creation.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #66 on: December 10, 2013, 09:31:52 pm »
Gameplay related things. I do not understand the purpose of a deathmatch type gamemode, (though I have built a TDM gamemode myself for other people) when Garry's Mod is a sandbox based game. DarkRP is really the closest it gets to actually liking any other gamemode than sandbox.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Dartouious

  • Newbie
  • *
  • Posts: 19
  • Karma: -7
Re: Player Chat Tags 2.5
« Reply #67 on: January 11, 2014, 02:22:31 pm »
So I recently added this on my Dark RP server and I am less then satisfied. I like it but it need to have a tagged added on it when a player does /advert and make the text a bright yellow. or when the player types /occ or // which is also occ. it would add a tag for it that says [OCC]. Can you do that?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #68 on: January 11, 2014, 03:23:42 pm »
So I recently added this on my Dark RP server and I am less then satisfied. I like it but it need to have a tagged added on it when a player does /advert and make the text a bright yellow. or when the player types /occ or // which is also occ. it would add a tag for it that says [OCC]. Can you do that?

Normally I would always love assisting players, but you have pissed me off with this:
So I recently added this on my Dark RP server and I am less then satisfied.
Are you kidding me, really? I guarantee that is not how you would ever talk normally to someone who you like or want something from.
Not only did you totally say you're completed dissatisfied with my addon, you actually want me to help you SPECIFICALLY on a certain part and add more stuff just for you.
Lastly, you just say "Can you do that?", and when you're asking for a favor most people will say "please", or "if you have some time that would be great if you could", like a gentleman, though you just thought you're the boss here and that I'm some sort of personally slave to you.
As well you didn't read this entire thread/posts because I have answered this before previously.
You're quite lucky that this forum is family friendly talk, because that quite honestly pissed me off.

You will not get helped by me, maybe someone who is more lenient to people such as yourself can assist you here on the forum.

The End
- Justin
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Player Chat Tags 2.5
« Reply #69 on: January 11, 2014, 08:10:48 pm »
So I recently added this on my Dark RP server and I am less then satisfied. I like it but it need to have a tagged added on it when a player does /advert and make the text a bright yellow. or when the player types /occ or // which is also occ. it would add a tag for it that says [OCC]. Can you do that?

We are not servants. When someone takes time out of their life to do something for you, you do not respond with "I am less than satisfied." You say thank you. And honestly, I think you deserve -2 Karma for that. Perhaps more complaints.
Out of the Garry's Mod business.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Player Chat Tags 2.5
« Reply #70 on: January 11, 2014, 10:36:55 pm »
We are not servants. When someone takes time out of their life to do something for you, you do not respond with "I am less than satisfied." You say thank you. And honestly, I think you deserve -2 Karma for that. Perhaps more complaints.
-3, now.
That was extremely disrespectful, what he said... Seriously. You don't do that kind of stuff.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Granaten

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Chat Tags 2.5
« Reply #71 on: January 21, 2014, 06:33:14 am »
Would anyone be able to help me. I got DarkRP 2.5.

I added the two files, and it works. BUT, it doesn't show either the OOC or Advert Tag.

Would any be able to help me?

Code: [Select]
// Cleint Side apple :p

local Tags =
{
--Group    --Tag     --Color
{"vip", "VIP", Color(255, 93, 0, 255) },
{"mod-vip", "Moderator", Color(0, 255, 255, 255) },
{"moderator", "Moderator", Color(0, 255, 255, 255) },
{"admin-vip", "Admin", Color(255, 0, 191, 255) },
{"admin", "Admin", Color(255, 0, 191, 255) },
{"superadmin", "Senior Admin", Color(0, 255, 0, 255) },
{"developer", "Developer", Color(95, 127, 63, 255) },
{"owner", "Owner", Color(255, 0, 0, 255) },
}

hook.Add("OnPlayerChat", "Tags", function(ply, Text, Team, PlayerIsDead)
if ply:IsValid() then
for k,v in pairs(Tags) do
if ply:IsUserGroup(v[1]) then
if Team then
if ply:Alive() then
chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
else
chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
end
return true
end
if ply:IsPlayer() then
if ply:Alive() then
chat.AddText(Color(255, 0, 0, 255), "", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
return true
elseif !ply:Alive() then
chat.AddText(Color(255, 0, 0, 255), "*DEAD* ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
return true
end
end
end
end
end
end)
« Last Edit: January 21, 2014, 06:43:01 am by Granaten »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags 2.5
« Reply #72 on: January 21, 2014, 03:36:48 pm »
All I can say is, "sdafafsadfgjfigrhguighduignsdgsduvnoihfdueifhufiodfubvsfvfsuhgfusghughdsigohdgiuhdugsddgosdhug, gdifgsodigshgohdsgusdhgisouhgnsduighsduighdsghsodghoiushguidghdfuivnceuihroueinfrveivnoiudsfg......"

Please read this thread, as it tells you what you can and can not do. I believe I've said that you can't do that as you would have to edit DarkRP for it to work. Though I think maybe others have gotten it to work.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline hongsang5282

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Chat Tags 2.5
« Reply #73 on: February 06, 2014, 10:36:57 pm »
When I see back my start.bat ,it will write like "Unknown commands sv_tags"
And the server is not apply the tags at all,helpmmm,,,,,

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Player Chat Tags 2.5
« Reply #74 on: February 06, 2014, 11:26:26 pm »
Gameplay related things. I do not understand the purpose of a deathmatch type gamemode, (though I have built a TDM gamemode myself for other people) when Garry's Mod is a sandbox based game. DarkRP is really the closest it gets to actually liking any other gamemode than sandbox.

Er. I can't ignore this.

deathmatch type gamemode

TTT is not a simple deathmatch gamemode. It is a psychological game which tests your mind with how people can lie.
I, myself have gained several ways to detect liars, which helps me punish rule breakers who say they didn't do it.

Whenever you have time, please, look into the gamemode's actual gameplay. :D

Anywho...

When I see back my start.bat ,it will write like "Unknown commands sv_tags"
And the server is not apply the tags at all,helpmmm,,,,,

I'm pretty sure you need to edit some files within the addon.
And it would help us troubleshoot your problem faster if you gave us details like, gamemode, gamemode version, addons, all that fun stuff.
Out of the Garry's Mod business.

  • Print