03.03.2013, 17:23
it dont show the admin name look wat it say By admin s%
Dont show admin name
Dont show admin name
Код:
CMD:warn(playerid, params[]) { new PlayerToKick; new iPlayer, szReason[ 128 ] ; if (APlayerData[playerid][PlayerLevel] >= 1) if( sscanf( params, "iS(None specified)[128]", iPlayer, szReason )) return SendClientMessage( playerid, 0xFF0000AA, "[USAGE] /warn [playerid] [reason]" ); g_iWarnings[ iPlayer ] ++; if( g_iWarnings[ iPlayer ] > 2 ) // 3 warnings { // Kick player or whatever you want (and send messages) Kick(PlayerToKick); } else // 1 or 2 warnings { new iName[ MAX_PLAYER_NAME ] ; GetPlayerName( playerid, iName, MAX_PLAYER_NAME ); format( szReason, sizeof( szReason ), "%s has been warned by admin %s (%i/3)%s%s", iName,AdminLevelName,FormatName(playerid), g_iWarnings[ iPlayer ], ( isnull( szReason ) ? ("") : (" - Reason: ") ), szReason ); SendClientMessageToAll( 0xFFFF00FF, szReason ); } return true; }