Quote:
Originally Posted by Bugsy
Not sure if the % is or isn't causing an issue here. Try checking only the part of the string with the team name:
PHP Code:
#include <amxmodx>
public plugin_init( ) register_event( "SendAudio", "win", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin" ); public win( ) { new sz[ 16 ]; read_data( 2, sz, charsmax( sz ) ); if ( equal( sz[ 7 ], "ter" ) , 3 ) client_print( 0, print_chat, "T" ); else client_print( 0, print_chat, "CT" ); }
|
hi, i learn from you that i can sub-string in equal operator, i did this, and work 100% [thank you] i write my code:
Code:
#include <amxmodx>
public plugin_init( )
register_event( "SendAudio", "win", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin" );
public win( )
{
new sz[ 16 ];
read_data( 2, sz, charsmax( sz ) );
if ( equal( sz[ 1 ], "!MRAD_terwin" ) )
client_print( 0, print_chat, "T" );
else if ( equal( sz[ 1 ], "!MRAD_ctwin" ) )
client_print( 0, print_chat, "CT" );
}
when i start sz[ 1 ], its skipping the all '%' problem