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

Remove Teamattack message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cen0x
SourceMod Donor
Join Date: Jan 2015
Location: Germany
Old 01-24-2015 , 14:54   Remove Teamattack message
Reply With Quote #1

Heya,

I want to remove the Teamattack message for cs;go but I cant found how it works. I tried already PreHook and change the Broadcast bool but its not work. Does anyone know how it works?

regards
cen0x
__________________

cen0x is offline
Send a message via Skype™ to cen0x
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 01-24-2015 , 16:16   Re: Remove Teamattack message
Reply With Quote #2

Not sure if it'll work in cago, but in older games you could simply block a specific chat text ('SayText' or 'SayText2' usermessage) coming from user #0
__________________
Leonardo is offline
cen0x
SourceMod Donor
Join Date: Jan 2015
Location: Germany
Old 01-25-2015 , 14:43   Re: Remove Teamattack message
Reply With Quote #3

I have no idea how to solve it^^
__________________

cen0x is offline
Send a message via Skype™ to cen0x
Dkmuniz
Senior Member
Join Date: Jun 2013
Old 01-25-2015 , 17:26   Re: Remove Teamattack message
Reply With Quote #4

PHP Code:
public Action:Event_TextMsg(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{

    
decl String:text[64];
    if (
GetUserMessageType() == UM_Protobuf)
        
PbReadString(bf"params"textsizeof(text), 0);
    else
        
BfReadString(bftextsizeof(text));
    
    if (
StrContains(text"#SFUI_Notice_Killed_Teammate") != -1)
        return 
Plugin_Handled;
    
    if (
StrContains(text"#Cstrike_TitlesTXT_Game_teammate_attack") != -1)
        return 
Plugin_Handled;
    
    if (
StrContains(text"#Hint_try_not_to_injure_teammates") != -1)
        return 
Plugin_Handled;

    return 
Plugin_Continue;
}

public 
Action:Event_HintText(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{

    
decl String:text[64];
    if (
GetUserMessageType() == UM_Protobuf)
        
PbReadString(bf"text"textsizeof(text));
    else
        
BfReadString(bftextsizeof(text));

    if (
StrContains(text"#SFUI_Notice_Hint_careful_around_teammates") != -1)
        return 
Plugin_Handled;

    return 
Plugin_Continue;

PHP Code:
public OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"), Event_TextMsgtrue);
HookUserMessage(GetUserMessageId("HintText"), Event_HintTexttrue);


Dkmuniz is offline
cen0x
SourceMod Donor
Join Date: Jan 2015
Location: Germany
Old 01-27-2015 , 20:14   Re: Remove Teamattack message
Reply With Quote #5

It works, thank u.
__________________

cen0x is offline
Send a message via Skype™ to cen0x
Reply


Thread Tools
Display Modes

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 08:32.


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