Raised This Month: $32 Target: $400
 8% 

[CS:GO] Block warmup chat messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 11-26-2017 , 22:10   [CS:GO] Block warmup chat messages
Reply With Quote #1

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.)

Last edited by joao7yt; 11-26-2017 at 22:42.
joao7yt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:48.


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