Raised This Month: $ Target: $400
 0% 

Solved block teamattack message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
The overrated maniac
Member
Join Date: Jun 2021
Location: Argentina
Old 01-07-2022 , 16:22   block teamattack message
Reply With Quote #1

For a jailbreak mod, when a terrorist attack another terrorist, the message on say says "x attacked a teammate" I want to remove it. I tryed this

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("D7 block saytext team attack""0.0.1""D i 5 7 i n c T, Johnny got his gun")
    
    
register_message(get_user_msgid("SayText"), "message_SayText")
}

// Credits to Johnny got his gun
public message_SayText()
{
    if (
get_msg_args() > 4)
        return 
PLUGIN_CONTINUE;
    
    static 
szBuffer[40];
    
get_msg_arg_string(2szBuffer39)
    
    if (!
equali(szBuffer"#Cstrike_TitlesTXT_Game_teammate_attack"))
        return 
PLUGIN_CONTINUE;
    
    return 
PLUGIN_HANDLED;

and this (with the plugin init obv)

PHP Code:
public message_SayText()
{
    if (
get_msg_args() > 4)
        return 
PLUGIN_CONTINUE;
    
    static 
szBuffer[23];
    
get_msg_arg_string(2szBuffer22)
    
    if (!
equali(szBuffer"#C4_Plant_At_Bomb_Spot") )
    {
        return 
PLUGIN_CONTINUE;
    }
    return 
PLUGIN_HANDLED;

They dont work and I checked jbextreme and no idea how he does it.
Post from the functions: https://forums.alliedmods.net/showth...20#post2180920
Post from jbextreme: https://forums.alliedmods.net/showthread.php?p=1113644
Example image from the text to remove:

Last edited by The overrated maniac; 01-07-2022 at 18:54. Reason: Solved
The overrated maniac is offline
 


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


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