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(PLUGIN, VERSION, AUTHOR)
g_Msg = get_user_msgid("SayText")
register_message(g_Msg,"BlockMessage")
}
public BlockMessage(MsgID,MsgDest,id) {
new msg_string[64]
get_msg_arg_string(2, msg_string, 63)
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?