#1

how i make when i type cmd /giverank ID 1-6 to change his skin ??
Reply
#2

any help me please
Reply
#3

tell me what skin id's you wanna use
and is it only RCON admin command?
Reply
#4

that command is for leader
i want this skins
1rank= 28(id)
2rank= 30(id)
3rank= 114(id)
4rank= 115(id)
5rank= 117(id)
6rank= 120(id)

plaese help me !
Reply
#5

pleaseeeeeeeeeeeeeeeeee
Reply
#6

pawn Код:
CMD:giverank( playerid, params[ ] )
{
    new id, rank;
    if( sscanf( params, "ui", id, rank ) ) return SendClientMessage( playerid, -1, "Usage: /giverank <ID/Part Of Name> <Rank>" );
    if( rank < 1 || rank > 6 ) return SendClientMessage( playerid, -1, "Available ranks are from 1 to 6." );
    switch( rank )
    {
        case 1: SetPlayerSkin( id, 28 );
        case 2: SetPlayerSkin( id, 30 );
        case 3: SetPlayerSkin( id, 114 );
        case 4: SetPlayerSkin( id, 115 );
        case 5: SetPlayerSkin( id, 117 );
        case 6: SetPlayerSkin( id, 120 );
    }
    return 1;
}
Reply
#7

thanks all <3
Reply
#8

Dwayne why use cases when you can simply define a amount with sscanf and use SetPlayerSkin = amount;
Reply
#9

Quote:
Originally Posted by Chrillzen
Посмотреть сообщение
Dwayne why use cases when you can simply define a amount with sscanf and use SetPlayerSkin = amount;
What?
If you do that, you will have errors for sure. I used switch but it can be with if statement too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)