15.02.2013, 14:09
(
Последний раз редактировалось Louris; 15.02.2013 в 14:54.
)
Hi, why in samp.ban file shows like that:
127.0.0.1 [15/02/13 | 17:29:07] Geraldelis - Geraldelis Uћblokavo ћaideja Geraldelis. (Prieћastis (english: reason): )
In reason: just writes nothing and that he banned him self.. code:
Ban code:
127.0.0.1 [15/02/13 | 17:29:07] Geraldelis - Geraldelis Uћblokavo ћaideja Geraldelis. (Prieћastis (english: reason): )
In reason: just writes nothing and that he banned him self.. code:
Код:
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; }