I've tried this. Still don't get it!
I am not sure, if I am able to surpress the message without not sending the event. The message might be client related. Would htat be possible?
Code:
#include <sourcemod>
#include <cstrike>
/*
#Cstrike_game_join_spectators
#Cstrike_game_join_terrorist
#Cstrike_game_join_ct
*/
public void OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"), Event_TextMsg, true);
}
public Action Event_TextMsg(UserMsg msg_id, BfRead msg, const int[] players, int playersNum, bool reliable, bool init)
{
char Text[128];
PbReadString(msg, "params", Text, sizeof(Text), 0);
if(StrContains(Text, "#Cstrike_game_join_") != -1) // change saveplayer with your pattern
{
return Plugin_Handled;
}
return Plugin_Continue;
}