View Single Post
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 08-25-2018 , 07:03   Re: [CS:GO] surpressing event "player_team" will lead to not closing the teamselect p
Reply With Quote #3

Thanks, but it didn't work out.

Code:
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, "is joining the Counter-Terrorist force") != -1) // change saveplayer with your pattern
    {
        return Plugin_Handled;
    }
    else if(StrContains(Text, "is joining the Terrorist force") != -1) // change saveplayer with your pattern
    {
        return Plugin_Handled;
    }
    else if(StrContains(Text, "is joining the Spectators") != -1) // change saveplayer with your pattern
    {
        return Plugin_Handled;
    }
    return Plugin_Continue;
}
Still getting the messages! Is my code correct?

(Also I think there would be a problem for people who are running the game not in English.)
fragnichtnach is offline