15.08.2016, 14:05
I made a command to setskin and i want to make if is restricted skin to set the next skin but is not work, what is wrong?
When I type the command it set me skin 0
I make a debug and it return me 0 at every time
Код:
CMD:nextskin(playerid,params[])
{
new nextskin = GetNextSkin(GetPlayerSkin(playerid));
SetPlayerSkin(playerid,nextskin);
}
GetNextSkin(skin)
{
if(skin==14||skin==15||skin==20)
skin++;
return skin;
}
I make a debug and it return me 0 at every time
Код:
GetNextSkin(skin)
{
new newskin=skin;
new str[20];
format(str,20,"your skin %d",newskin);
SCM(0,-1,str);
if(skin==14||skin==15||skin==20)
newskin++;
format(str,20,"your next skin %d",newskin);
SCM(0,-1,str);
return newskin;
}


