PHP Code:
public void OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"), TextMsg, true);
}
public Action TextMsg(UserMsg msg_id, Protobuf msg, const int[] players, int playersNum, bool reliable, bool init)
{
char buffermsg[512];
PbReadString(msg, "params", buffermsg, sizeof(buffermsg), 0);
if (StrContains(buffermsg, "#SFUI_Notice_Match_Will_Start_") != -1 || StrEqual(buffermsg, "#SFUI_Notice_Warmup_Has_Ended", false))
{
return Plugin_Stop;
}
return Plugin_Continue;
}
This will block these messages:
- #SFUI_Notice_Match_Will_Start_Chat (>> Match will start when warmup has ended.)
- #SFUI_Notice_Match_Will_Start_Waiting_Chat (>> Waiting for all players to connect.)
- #SFUI_Notice_Warmup_Has_Ended (> Warmup has ended.)