Raised This Month: $ Target: $400
 0% 

Block "* PlayerName has changed to team 'red'" message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 05-04-2010 , 14:36   Block "* PlayerName has changed to team 'red'" message
Reply With Quote #1

I need an advice.
I want to block message " * PlayerName has changed to team 'red' "
when player changes team (Half-Life).
Now I have:

PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_Msg get_user_msgid("SayText")
    
register_message(g_Msg,"BlockMessage")
}

public 
BlockMessage(MsgID,MsgDest,id) {
    new 
msg_string[64]
    
get_msg_arg_string(2msg_string63)
    if(
contain(msg_string" has changed to team ^'") > -1)
        return 
PLUGIN_HANDLED
    
return PLUGIN_CONTINUE

Is that good? Or it can be done better way?

Last edited by Flipper_SPb; 05-04-2010 at 14:40.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
 



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 03:45.


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