Command help
#5

pawn Код:
// SA-PD
new sRank[ MAX_PLAYERS ],
    sLeader;
// SA-PD

// OnPlayerConnect
sRank[ playerid ] = 0;


COMMAND:finvite( playerid, params[ ] )
{
    if( !sLeader( playerid ) ) return SendClientMessage( playerid, 0xFF0000FF, "Only the SA-PD Leader can use this command!" );
    new
        toplayerid, // the player we want to make SA-PD
        rank
    ; // extracting player's ID and rank from params
    if( sscanf( params, "ri", toplayerid, rank ) ) return SendClientMessage( playerid, 0xFFFFFFFF, "Usage: /finvite <playerid> <rank>" );
    if( toplayerid == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xFF0000FF, "That player is not connected" );
    if( rank < 1 || rank > 4 ) return SendClientMessage( playerid, 0xFF0000FF, "The rank value must be between 1 and 4." );
    new
        message[ 40 ]
    ;
    format(message, sizeof(message), "You were set rank %i By the SA-PD Leader.!", rank);
    SendClientMessage(toplayerid, 0x00FF00FF, message);
    sRank[ toplayerid ] = rank;
    return 1;
}
Reply


Messages In This Thread
Command help - by Lz - 09.12.2012, 09:57
Re: Command help - by Konstantinos - 09.12.2012, 10:10
Re: Command help - by Lordzy - 09.12.2012, 10:13
Re: Command help - by Lz - 09.12.2012, 10:42
Re: Command help - by Konstantinos - 09.12.2012, 10:45
Re: Command help - by Lz - 09.12.2012, 10:48
Re: Command help - by Konstantinos - 09.12.2012, 10:56

Forum Jump:


Users browsing this thread: 1 Guest(s)