08.04.2012, 18:22
From this!
To this
much easyer and faster (my option)
Код:
COMMAND:kick(playerid, params[ ] ) { new ID; if( Admin[ playerid ] == 1 ) return 0; if( sscanf( params, "us", ID, params ) ) return SendClientMessage( playerid, -1, "{FFFF00}Use example: /kick [ NAME or ID ] [ REASON ]."); if( !IsPlayerConnected( ID ) ) return SendClientMessage( playerid, -1, "{FFFF00}Selected playerid not connected."); else { new string[ 100 ]; format( string, 100, "[ KICK ]: Admin [ %s ] kicked [ %s ].", pName( playerid ), pName( ID ) ); SendClientMessageToAll( -1, string ); format( string, 100, "{FF0000}[] %s ", params ); SendClientMessageToAll( -1, string ); Kick( ID ); } return 1; }
Код:
CMD:kick(playerid, params[]) { new ID; if( Admin[ playerid ] == 1 ) return 0; if( sscanf( params, "us", ID, params ) ) return SendClientMessage( playerid, -1, "{FFFF00}Use example: /kick [ NAME or ID ] [ REASON ]."); if( !IsPlayerConnected( ID ) ) return SendClientMessage( playerid, -1, "{FFFF00}Selected playerid not connected."); else { new string[ 100 ]; format( string, 100, "[ KICK ]: Admin [ %s ] kicked [ %s ].", pName( playerid ), pName( ID ) ); SendClientMessageToAll( -1, string ); format( string, 100, "{FF0000}[] %s ", params ); SendClientMessageToAll( -1, string ); Kick( ID ); } return 1; }