So for some reason my chat on MvM is broken because I can't see the opposing team, but I was being told that it was a default behavior, so I tried making a plugin to fix it, but this issue happens:
I added a command listener for 'say' and while it does work, it doesn't hide any commands that start with '/', and no I don't wanna hide it if it starts with '/', only if it is a valid command.
Here's the code:
PHP Code:
public Action:Chat(client, const char[] command, int argc)
{
if (StrEqual(command, "say_team") || StrEqual(command, "say_party")) {return Plugin_Handled;}
int PlayerTeam = GetClientTeam(client);
new String:Args[128];
GetCmdArgString(Args, sizeof(Args));
StripQuotes(Args);
new String:cl_name[32];
GetClientName(client, cl_name, sizeof(cl_name));
new String:spec[8];
if (PlayerTeam == 1) {spec = "*SPEC* ";}
CPrintToChatAllEx(client, "%s{teamcolor}%s{default} : %s", spec, cl_name, Args);
return Plugin_Handled;
}