• How to make this show up as red
    5 replies, posted
So in my server, i deleted a thing called [OOC] and am trying to add in something called *Dead*. Example: [IMG]http://i.gyazo.com/75ca98670c022b3f30767cbd135bb9e4.png[/IMG] Here is the code. [CODE]function GM:PlayerSay(client, text, public) local lowered = string.lower(text); if (!public and JB_ROUND_STATE == ROUND_ACTIVE and client:Team() != TEAM_PRISONER and client:Team() != TEAM_GUARD) then return "*Dead*"..string.sub(text, 0) end; end;[/CODE] The only problem im having with this is that i wand the *Dead* To show up before the text that the user writes AND in red, but what it is doing is this. Example: [IMG]http://i.gyazo.com/ca5587d777076f64b9f12e86e25d2872.png[/IMG]
Use OnPlayerChat hook instead
[QUOTE=HumbleTH;45547657]Use OnPlayerChat hook instead[/QUOTE] Example?
[url=http://wiki.garrysmod.com/page/GM/OnPlayerChat]You could've just googled. Literally the first page[/url]
[QUOTE=HumbleTH;45547790][url=http://wiki.garrysmod.com/page/GM/OnPlayerChat]You could've just googled. Literally the first page[/url][/QUOTE]thanks
And do not use the gamemode function use a hook instead.
Sorry, you need to Log In to post a reply to this thread.