Raised This Month: $ Target: $400
 0% 

disable "attacked by a teammate" for csgo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yannick
Member
Join Date: Oct 2012
Old 02-16-2013 , 15:12   disable "attacked by a teammate" for csgo
Reply With Quote #1

Since i couldn't do it by myself i'm looking here for some help.

I want a plugin which disables the textmsg playerxy attacked a teammate. The css plugins are not working in csgo.

regards yannick
yannick is offline
yannick
Member
Join Date: Oct 2012
Old 02-21-2013 , 11:52   Re: disable "attacked by a teammate" for csgo
Reply With Quote #2

is no one able to help me ?
yannick is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 02-21-2013 , 17:27   Re: disable "attacked by a teammate" for csgo
Reply With Quote #3

For cs:s is this
PHP Code:

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

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


    
/* Block team-attack messages from being shown to players. */ 
    
decl String:message[256];
    
BfReadString(bfmessagesizeof(message));

    if (
StrContains(message"teammate_attack") != -1// this for css
        
return Plugin_Handled;
        
    return 
Plugin_Continue;

But for cs:go i dont know the name of the msg


Edit: mmm maybe this

PHP Code:
public OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"), Hook_TextMsgtrue);
}

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


    
/* Block team-attack messages from being shown to players. */ 
    
decl String:message[256];
    
BfReadString(bfmessagesizeof(message));

    if (
StrContains(message"teammate") != -1// this will work for csgo? try it :)
        
return Plugin_Handled;
        
    return 
Plugin_Continue;

__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 02-21-2013 at 17:29.
Franc1sco is offline
Send a message via MSN to Franc1sco
eternal75
New Member
Join Date: May 2014
Old 05-24-2014 , 21:57   Re: disable "attacked by a teammate" for csgo
Reply With Quote #4

hi,

do u have the .smx file plz?

And i'll test it .

i'm a newbie in PHP,

thanks .
eternal75 is offline
eternal75
New Member
Join Date: May 2014
Old 05-25-2014 , 06:48   Re: disable "attacked by a teammate" for csgo
Reply With Quote #5

Quote:
Originally Posted by Franc1sco View Post
For cs:s is this
PHP Code:

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

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


    
/* Block team-attack messages from being shown to players. */ 
    
decl String:message[256];
    
BfReadString(bfmessagesizeof(message));

    if (
StrContains(message"teammate_attack") != -1// this for css
        
return Plugin_Handled;
        
    return 
Plugin_Continue;

But for cs:go i dont know the name of the msg


Edit: mmm maybe this

PHP Code:
public OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"), Hook_TextMsgtrue);
}

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


    
/* Block team-attack messages from being shown to players. */ 
    
decl String:message[256];
    
BfReadString(bfmessagesizeof(message));

    if (
StrContains(message"teammate") != -1// this will work for csgo? try it :)
        
return Plugin_Handled;
        
    return 
Plugin_Continue;


hi,

do u have the .smx file plz?

And i'll test it .

i'm a newbie in PHP,

thanks .
eternal75 is online now Report Post
eternal75 is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 05-25-2014 , 07:10   Re: disable "attacked by a teammate" for csgo
Reply With Quote #6

There was a cvar for it.
LambdaLambda is offline
eternal75
New Member
Join Date: May 2014
Old 05-25-2014 , 08:56   Re: disable "attacked by a teammate" for csgo
Reply With Quote #7

so tell the cvar instead just said it plz
eternal75 is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 05-25-2014 , 09:11   Re: disable "attacked by a teammate" for csgo
Reply With Quote #8

I tried to test for you but
L 05/25/2014 - 08:11:41: [SM] Plugin encountered error 21: Native is not bound
L 05/25/2014 - 08:11:41: [SM] Native "BfReadString" reported:
L 05/25/2014 - 08:11:41: [SM] Displaying call stack trace for plugin "myplugs/teamattackmessageblock.smx":
L 05/25/2014 - 08:11:41: [SM] [0] Line 23, teamattackmessageblock.sp::Hook_TextMsg()

I'm not aware of a cvar

Last edited by hamilton5; 05-25-2014 at 09:21.
hamilton5 is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 05-25-2014 , 09:56   Re: disable "attacked by a teammate" for csgo
Reply With Quote #9

I would tell if I would remember. I were looking for it, and haven't find it, so created plug that disables this msg. BUT I'm sure there was cvar for it.

PS there's no BF in CS:GO. You need to replace it with Protobuf, https://wiki.alliedmods.net/Protobuf.

Last edited by LambdaLambda; 05-25-2014 at 09:58.
LambdaLambda is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-26-2014 , 03:02   Re: disable "attacked by a teammate" for csgo
Reply With Quote #10

search...
[CSGO] How do I block friendly fire chat message?

*edit
maybe this is that cvar
Code:
"CS_WarnFriendlyDamageInterval" = "3.0" game cheat
 - Defines how frequently the server notifies clients that a player damaged a frien
Code:
sm_cvar CS_WarnFriendlyDamageInterval 1000

Last edited by Bacardi; 05-26-2014 at 03:06.
Bacardi 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 14:42.


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