Idk if this is a known problem or not, but ever since the Gmod update innocent players can use the team chat, which is pretty much a foolproof T tester, and is kinda breaking the game.
I wanted to create a temporary fix that'll just not send team chat messages if the player is innocent.
I'm pretty bad at researching so sorry if this is simple, but how would I go about checking if the message was sent to team chat?
I have this (pretty much everything else) [CODE]function chatCommand( ply, text, public )
if ply:ROLE == ROLE_INNOCENT and --[[Check if it's in team chat]]
then
return("") -- Hide it from chat.
end
end
hook.Add( "PlayerSay", "chatCommand", chatCommand )[/CODE]
*cough* github
(Its probably already fixed)
That defeats the purpose. I made it so that innocent team chat would redirect to main chat; the reason you see the team tag is because an addon is doing it.
[editline]18th July 2015[/editline]
That code wouldn't even work either, lol. ply:ROLE doesn't exist.
[QUOTE=code_gs;48239660]That defeats the purpose. I made it so that innocent team chat would redirect to main chat; the reason you see the team tag is because an addon is doing it.
[editline]18th July 2015[/editline]
That code wouldn't even work either, lol. ply:ROLE doesn't exist.[/QUOTE]
Oh, ok.
Sorry for the needless thread then.
Sorry, you need to Log In to post a reply to this thread.