AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block MSG (https://forums.alliedmods.net/showthread.php?t=223130)

ironskillz1 08-10-2013 05:18

Block MSG
 
How do i block the msg "You killed a Teammate" ??

This msg shows up evrytime you teamkill a teammate

guipatinador 08-10-2013 05:27

Re: Block MSG
 
PHP Code:

public plugin_init( )
{
    
register_messageget_user_msgid"TextMsg" ), "MessageText" )
}

public 
MessageTextmsgiddestid )
{
    new 
szMsg32 ]
    
get_msg_arg_string2szMsgcharsmaxszMsg ) )
    
    if( 
equalszMsg ,"#Game_teammate_attack" ) || equalszMsg"#Killed_Teammate" ) )
    {
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE



Black Rose 08-10-2013 05:50

Re: Block MSG
 
I think this is enough.
EDIT: Don't use my example. It was wrong.

simanovich 08-10-2013 08:49

Re: Block MSG
 
Quote:

Originally Posted by Black Rose (Post 2009847)
I think this is enough.
Code:
#include <amxmodx> public plugin_init( ) &nbsp;&nbsp;&nbsp;&nbsp;register_event("TextMsg", "MessageText", "b", "2=#Game_teammate_attack"); public MessageText() return PLUGIN_HANDLED;

register_event is a post one (The message is already send), so you cann't block in the way.


All times are GMT -4. The time now is 16:01.

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