Hi, i try to block msg print
PHP Code:
//register_message(get_user_msgid("SayText"), "msg_TextMsg");
register_message( get_user_msgid( "TextMsg" ), "msg_TextMsg" );
public msg_TextMsg( msgid, dest, id )
{
static text_msg[ 128 ];
get_msg_arg_string( 2, text_msg, charsmax(text_msg) );
if (contain(text_msg, "* Can't change team to") != -1 || contain(text_msg, "* Server limits teams to") == 0)
return PLUGIN_HANDLED
return PLUGIN_CONTINUE;
}
/*
// in HLSDK C++
if ( !IsValidTeam( mdls ) )
{
int clientIndex = pPlayer->entindex();
g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model", pPlayer->m_szTeamName );
sprintf( text, "* Can't change team to \'%s\'\n", mdls );
UTIL_SayText( text, pPlayer );
sprintf( text, "* Server limits teams to \'%s\'\n", m_szTeamList );
UTIL_SayText( text, pPlayer );
return;
}
*/
But did not work?
__________________