SA-MP Forums Archive
skin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: skin (/showthread.php?tid=323062)



skin - Dw.UsHer - 04.03.2012

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


Re: skin - Dw.UsHer - 04.03.2012

any help me please


Re: skin - dragondex - 04.03.2012

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


Re: skin - Dw.UsHer - 04.03.2012

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 !


Re: skin - Dw.UsHer - 04.03.2012

pleaseeeeeeeeeeeeeeeeee


Re: skin - Konstantinos - 04.03.2012

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;
}



Re: skin - Dw.UsHer - 04.03.2012

thanks all <3


Re: skin - Chrillzen - 04.03.2012

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


Re: skin - Konstantinos - 04.03.2012

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.