Ban reason
#1

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:

Код:
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;
}
Ban code:

Код:
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;
}
Reply
#2

Cause you're using the same formatted string for the reason of the ban.
Reply
#3

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Cause you're using the same formatted string for the reason of the ban.
What I should change?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)