Random skin
#1

How can I make it like,if the player is in a certian point and types like /skin (I know how to do this part) it will give him a random skin from let's say like,8 specific skins.

Thanks in advance and have a nice day
Reply
#2

You will need an array of your chosen skins:
pawn Код:
new Skins[] = { 8, 167, 10 };
And then the command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/skin", cmdtext, true, 5) == 0)
    {
        SetPlayerSkin(playerid, Skins[random(sizeof(Skins))]);
        return 1;
    }
    return 0;
}
I haven't tested, but it compiles alright.. I think it should work.. Just change "8, 167, 10" to suit your needs.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)