forward BanPublic(playerid); public BanPublic(playerid) { new stringai[ 128 ], pName[ MAX_PLAYER_NAME ], aName[ MAX_PLAYER_NAME ] ; new id, reason[ 64 ] ; GetPlayerName( playerid, aName, MAX_PLAYER_NAME ); GetPlayerName( id, pName, MAX_PLAYER_NAME ); format( stringai, sizeof( stringai ), "%s Uћblokavo ћaideja %s. (Prieћastis: %s)", aName, pName, reason ); SendClientMessage(playerid, 0xFF4444FF, "Jus uћblokuotas! Uћblokavo neteisingai? Pildyk unban anketa fr.tt.lt"); BanEx( playerid, stringai ); return 1; }
CMD:ban( playerid, params[ ] ) { if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage( playerid, -1, "Tu ne administratorius!" ); new id, reason[ 64 ] ; if(sscanf( params, "us[64]", id, reason ) ) return SendClientMessage( playerid, -1, "Naudojimas: /ban [Nickas] [Prieћastis]" ); if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Tokio ћaidejo nera." ); if(PlayerInfo[id][pPadmin] == 1) return SendClientMessage(playerid, -1, "Ka cia darai?"); new str[ 128 ], pName[ MAX_PLAYER_NAME ], aName[ MAX_PLAYER_NAME ] ; GetPlayerName( playerid, aName, MAX_PLAYER_NAME ); GetPlayerName( id, pName, MAX_PLAYER_NAME ); format( str, sizeof( str ), "%s Uћblokavo ћaideja %s. (Prieћastis: %s)", aName, pName, reason ); SendClientMessageToAll( -1, str ); SetTimerEx("BanPublic", 1000, 0, "d", id); return 1; }
Cause you're using the same formatted string for the reason of the ban.
|