Raised This Month: $ Target: $400
 0% 

Stop texts bomb_planted/defused


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 07-31-2016 , 18:20   Stop texts bomb_planted/defused
Reply With Quote #1

Hello guys, i want to stop texts like "Terrorists win" or "Bomb planted"
I search on this forum, i found this code :
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR ""


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(get_user_msgid("TextMsg"), "Message_TextMsg");
}
public 
Message_TextMsg(iMesgIdiMsgTypeiPlrId)
{    
    static 
message[32]
    
get_msg_arg_string(2messagecharsmax(message))
    
    if(
equal(message"#CTs_Win")
    ||
equal(message"#Terrorists_Win")
    ||
equal(message"#Round_Draw")
    ||
equal(message"#Bomb_Planted")
    ||
equal(message"#Bomb_Defused")
    ||
equal(message"#Target_Bombed")
    ||
equal(message"#Hostages_Not_Rescued"))   return PLUGIN_HANDLED;
    
    return 
PLUGIN_CONTINUE

But it doesn't work.Can you help me?
Andu. is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-01-2016 , 08:40   Re: Stop texts bomb_planted/defused
Reply With Quote #2

Does it still show up?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Old 08-01-2016, 08:58
Napoleon_be
This message has been deleted by Napoleon_be. Reason: nvm
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-01-2016 , 09:02   Re: Stop texts bomb_planted/defused
Reply With Quote #3

You could try this
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Block Messages"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new szMessages[][] = {
    
"#CTs_Win",
    
"#Terrorists_Win",
    
"#Round_Draw",
    
"#Bomb_Planted",
    
"#Bomb_Defused",
    
"#Target_Bombed",
    
"#Hostages_Not_Rescued",
    
"#Game_Commencing",
    
"#Game_will_restart_in"
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(get_user_msgid("TextMsg"), "Message_TextMsg");
}

public 
Message_TextMsg(msg_idmsg_destmsg_entity)
{    
    static 
message[32]
    
get_msg_arg_string(2messagecharsmax(message))
    
    for(new 
isizeof(szMessages); i++) {
        if(
equal(messageszMessages[i])) {
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE

__________________

Last edited by Napoleon_be; 08-01-2016 at 09:06.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 08-01-2016 , 09:19   Re: Stop texts bomb_planted/defused
Reply With Quote #4

Quote:
Originally Posted by Andu. View Post
Hello guys, i want to stop texts like "Terrorists win" or "Bomb planted"
But it doesn't work.Can you help me?
Use this one and put it's name on the top in plugins.ini

PHP Code:
#include <amxmodx>

#define PLUGIN "Block TextMsg"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"

public plugin_init()
{   
    
register_messageget_user_msgid"TextMsg" ) , "hook_TextMSG"   ); 
}
    
public 
hook_TextMSG msg_idmsg_destmsg_entity )
{
    static 
szMsg[3];
    
get_msg_arg_string2szMsgcharsmax(szMsg) );

    switch( 
szMsg[1] )
    {
            case 
'B''C''H''R''T' : return PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;

siriusmd99 is offline
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 08-01-2016 , 09:24   Re: Stop texts bomb_planted/defused
Reply With Quote #5

Thank you so much, it works.And for their sounds "The bomb has been planted" and other can u help me?
Andu. is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-01-2016 , 09:31   Re: Stop texts bomb_planted/defused
Reply With Quote #6

Quote:
Originally Posted by siriusmd99 View Post
Use this one and put it's name on the top in plugins.ini

PHP Code:
#include <amxmodx>

#define PLUGIN "Block TextMsg"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"

public plugin_init()
{   
    
register_messageget_user_msgid"TextMsg" ) , "hook_TextMSG"   ); 
}
    
public 
hook_TextMSG msg_idmsg_destmsg_entity )
{
    static 
szMsg[3];
    
get_msg_arg_string2szMsgcharsmax(szMsg) );

    switch( 
szMsg[1] )
    {
            case 
'B''C''H''R''T' : return PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;


I think giving yourself credits for Arkshine's code is kind of bullshit. You should change this.

https://forums.alliedmods.net/showpo...50&postcount=2

Andu, the link i posted could also be usefull for you to block sound messages.
__________________

Last edited by Napoleon_be; 08-01-2016 at 09:31.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 08-01-2016 , 09:55   Re: Stop texts bomb_planted/defused
Reply With Quote #7

Not working
Andu. is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-01-2016 , 09:57   Re: Stop texts bomb_planted/defused
Reply With Quote #8

Quote:
Originally Posted by Andu. View Post
Not working
What doesnt work?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 08-01-2016 , 09:58   Re: Stop texts bomb_planted/defused
Reply With Quote #9

PHP Code:
    public plugin_init()
    {   
        
// block win sounds
        
register_messageget_user_msgid"SendAudio" ),"message_sendaudio" ); 
        
        
// block win messages
        
register_messageget_user_msgid"TextMsg" )  ,"message_textmsg"   ); 
    }
    
    
    public 
message_textmsgmsg_idmsg_destmsg_entity )
    {
        static 
message[3];
        
get_msg_arg_string2messagesizeof message );

        switch( 
message[1] )
        {
            
// -- #CTs_Win ; #Terrorists_Win ; #Round_Draw
            
case 'C''T''R' : return PLUGIN_HANDLED;
        }

        return 
PLUGIN_CONTINUE;
    }


    public 
message_sendaudiomsg_idmsg_destmsg_entity )
    {
        static 
message[10];
        
get_msg_arg_string2messagesizeof message );

        switch( 
message[7] )
        {
            
// -- %!MRAD_terwin ; %!MRAD_ctwin ; %!MRAD_rounddraw
            
case 'c''t''r' : return PLUGIN_HANDLED;
        }

        return 
PLUGIN_CONTINUE;
    } 
Sounds are not blocked
Andu. is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-01-2016 , 10:05   Re: Stop texts bomb_planted/defused
Reply With Quote #10

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Block Messages"
#define VERSION "1.0"
#define AUTHOR "Arkshine"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_messageget_user_msgid"SendAudio" ),"message_sendaudio" ); 
    
register_messageget_user_msgid"TextMsg" )  ,"message_textmsg"   ); 
}


public 
message_textmsgmsg_idmsg_destmsg_entity )
{
    static 
message[3];
    
get_msg_arg_string2messagecharsmax(message));
    
    switch( 
message[1] )
    {
        case 
'C''T''R''G''B''H' : return PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}


public 
message_sendaudiomsg_idmsg_destmsg_entity )
{
    static 
message[10];
    
get_msg_arg_string2messagecharsmax(message));
    
    switch( 
message[7] )
    {
        case 
'c''t''r''B' : return PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;

try this
__________________

Last edited by Napoleon_be; 08-01-2016 at 10:26.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 23:39.


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