I'm trying to block several chat messages like "PLAYER attacked a teammate.", "PLAYER is joining the Terrorist force.", ...
This is what I've tried:
PHP Code:
public OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"),hook_chatmsg_admintools,true);
}
public Action:hook_chatmsg_admintools(UserMsg:msg_id,Handle:handle_msg,const players[],playersNum,bool:reliable,bool:init)
{
char msg[64];
PbReadString(handle_msg,"params",msg,sizeof(msg),0);
if (StrEqual(msg,"#Cstrike_TitlesTXT_Game_teammate_attack")) return Plugin_Handled;
return Plugin_Continue;
}
It seems to work fine but when I replace "#Cstrike_TitlesTXT_Game_teammate_attack" with other message names out of csgo_english.txt like "#Cstrike_TitlesTXT_Game_join_ct" the message is still printed.
I'd be really glad if someone could tell me why.