Hi i was wondering how to make evovle chat tags i cant seem to get them to work. thanks
[b][url=http://wiki.garrysmod.com/?title=Chat.AddText]Chat.AddText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Example:
[lua]chat.AddText(Color(0,0,0),"[EVOLVE]", Color(255,0,0),"Player"..v:Nick().."has been banned!")[/lua]
[b]should[/b] make it print [EVOLVE] (in black text) Player (player name) has been banned! (in green text)
I think he means like [quote](Super Admin) Name: I'm a super admin[/quote][code]
hook.Add("PlayerSay","AdminTag",function(ply, text, team)
if(ply:IsAdmin() and !ply:IsSuperAdmin()) then
return "(Admin) "..ply:Nick()..": "..text;
end
end
[/code]
[QUOTE=devinpro;25664518]I think he means like [code]
hook.Add("PlayerSay","AdminTag",function(ply, text, team)
if(ply:IsAdmin() and !ply:IsSuperAdmin()) then
return "(Admin) "..ply:Nick()..": "..text;
end
end
[/code][/QUOTE]
That wouldn't work if I'm not mistaken, it would print:
Carmine:(Admin) Carmine: test
you have to use Chat.AddText() like c-unit said.