Remake code
#1

Can someone remake this code to 0.3x version? To show reason of ban and kick.

Код:
CMD:kick( playerid, params[ ] )
{
    new
        id,
        reason[ 64 ]
    ;
    if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, 0xFF0000AA, "Tu ne administratorius!" );
    if(sscanf( params, "us[64]", id, reason ) ) return SendClientMessage( playerid, 0xDEEE20FF, "Naudojimas: /kick [Nick] [Prieћastis]" );
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xDEEE20FF, "Tokio ћaidėjo nėra" );
    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 ), "Administratorius %s iљmetė ћaidėją %s. Prieћastis: %s ", aName, pName, reason );
    SendClientMessageToAll( 0xDEEE20FF, str );
    Kick( id );
    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 ћaidėjo nėra." );
    if(PlayerInfo[id][pPadmin] == 1) return SendClientMessage(playerid, -1, "Ką čia 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 ћaidėją %s. (Prieћastis: %s)", aName, pName, reason );
    SendClientMessageToAll( -1, str );
    BanEx( id,str);
    return 1;
}
Reply


Messages In This Thread
Remake code - by Louris - 12.02.2013, 15:11
Re: Remake code - by Louris - 12.02.2013, 16:12
Re: Remake code - by YoYo123 - 12.02.2013, 16:38
AW: Remake code - by roym899 - 12.02.2013, 16:56
Re: Remake code - by Louris - 13.02.2013, 03:52
Re: Remake code - by Neil. - 13.02.2013, 04:26

Forum Jump:


Users browsing this thread: 2 Guest(s)