AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [CS:GO] Block warmup chat messages (https://forums.alliedmods.net/showthread.php?t=303209)

joao7yt 11-26-2017 22:10

[CS:GO] Block warmup chat messages
 
PHP Code:

public void OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"), TextMsgtrue);
}

public 
Action TextMsg(UserMsg msg_idProtobuf msg, const int[] playersint playersNumbool reliablebool init)
{
    
char buffermsg[512];
    
PbReadString(msg"params"buffermsgsizeof(buffermsg), 0);
    
    if (
StrContains(buffermsg"#SFUI_Notice_Match_Will_Start_") != -|| 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.)


All times are GMT -4. The time now is 23:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.