ForceClassSelection
#3

pawn Код:
CMD:class( playerid, params[ ] ) {
    new
        id
    ;

    if ( AdminLevel[ playerid ] != 1337 )
        return SendClientMessage( playerid, -1, "You are not l33t." );

    if ( sscanf( params, "u", id ) )
        return SendClientMessage( playerid, -1, "Usage: /class [ playerid / partOfName ]" );

    if ( id = INVALID_PLAYER_ID )
        return SendClientMessage( playerid, -1, "Invalid player." );

    SendClientMessage( id, -1, "You have been forced to the class selection by a l33t admin." );

    ForceClassSelection( id ):
    SetPlayerHealth( id, 0.0 );

    return 1;
}
TIP:

Use "u" for players ( sscanf ),
it will detect if the player entered an ID,
or a partOfName ( e.G: Basicz ), can be used as "/class bas".
Reply


Messages In This Thread
ForceClassSelection - by zxc1 - 13.07.2011, 13:54
Re: ForceClassSelection - by veyron - 13.07.2011, 14:00
Re: ForceClassSelection - by Basicz - 13.07.2011, 14:03
Re: ForceClassSelection - by zxc1 - 13.07.2011, 14:14
Re: ForceClassSelection - by zxc1 - 13.07.2011, 14:29

Forum Jump:


Users browsing this thread: 1 Guest(s)