Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by SiJ
Quote:
Originally Posted by CalgonX
pawn Код:
stock KickPlayer( playerid, Reason[], Reason2[], playerwhokicked ) { if( IsPlayerConnected( playerid ) ) { new string[ 128 ], Name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, Name, sizeof( Name ) );
if( playerwhokicked == -255 ) { format( string, sizeof( string ), "AdmCmd: %s has been kicked, reason: %s", Name, Reason ); SendClientMessageToAll( COLOR_RED, string ); format( string, sizeof( string ), "You have been kicked for %s.", Reason2 ); Kick( playerid ); print( string ); } else { new KickerName[ MAX_PLAYER_NAME ]; GetPlayerName( playerwhokicked, KickerName, sizeof( KickerName ) ); format( string, sizeof( string ), "AdmCmd: %s has been kicked by %s, reason: %s", Name, KickerName, Reason ); SendClientMessageToAll( COLOR_RED, string ); format( string, sizeof( string ), "You have been kicked for %s.", Reason2 ); Kick( playerid ); print( string ); } } else { printf( "KickPlayer() was called, but the playerid (%d) inserted into the function wasn't a valid ID.", playerid ) ); } }
//KickPlayer( playerid, "DMing", "Deathmatching", -255 );
|
So what was wrong with my code.. :\
You just did the same thing as in my code, but in other way..
|
Yours is poorly constructed and has a billion useless cells.