Raised This Month: $51 Target: $400
 12% 

[CSGO] Can't block join chat messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
user420
New Member
Join Date: Nov 2019
Old 11-24-2019 , 16:35   [CSGO] Can't block join chat messages
Reply With Quote #1

I'm trying to block several chat messages like "PLAYER attacked a teammate.", "PLAYER is joining the Terrorist force.", ...

This is what I've tried:
PHP Code:
public OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"),hook_chatmsg_admintools,true);
}

public 
Action:hook_chatmsg_admintools(UserMsg:msg_id,Handle:handle_msg,const players[],playersNum,bool:reliable,bool:init)
{
    
char msg[64];
    
PbReadString(handle_msg,"params",msg,sizeof(msg),0);
    
    if (
StrEqual(msg,"#Cstrike_TitlesTXT_Game_teammate_attack")) return Plugin_Handled;

    return 
Plugin_Continue;

It seems to work fine but when I replace "#Cstrike_TitlesTXT_Game_teammate_attack" with other message names out of csgo_english.txt like "#Cstrike_TitlesTXT_Game_join_ct" the message is still printed.

I'd be really glad if someone could tell me why.

Last edited by user420; 11-24-2019 at 16:35.
user420 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 06:23.


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