Raised This Month: $ Target: $400
 0% 

Block MSG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 08-10-2013 , 05:18   Block MSG
Reply With Quote #1

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

This msg shows up evrytime you teamkill a teammate
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-10-2013 , 05:27   Re: Block MSG
Reply With Quote #2

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


Last edited by guipatinador; 08-10-2013 at 06:07.
guipatinador is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-10-2013 , 05:50   Re: Block MSG
Reply With Quote #3

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

Last edited by Black Rose; 08-10-2013 at 11:32.
Black Rose is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 08-10-2013 , 08:49   Re: Block MSG
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
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.
__________________
simanovich is offline
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 16:01.


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