Function getskin
#1

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?

Код:
CMD:nextskin(playerid,params[])
{
 new nextskin = GetNextSkin(GetPlayerSkin(playerid));
 SetPlayerSkin(playerid,nextskin);
}

GetNextSkin(skin)
{
	if(skin==14||skin==15||skin==20)
	skin++;
	return skin;
}
When I type the command it set me skin 0
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;
}
Reply


Messages In This Thread
Function getskin - by Mister0 - 15.08.2016, 14:05
Re: Function getskin - by Shinja - 15.08.2016, 14:15
Re: Function getskin - by Stinged - 15.08.2016, 14:17
Re: Function getskin - by Mister0 - 15.08.2016, 14:21
Re: Function getskin - by Shinja - 15.08.2016, 14:23
Re: Function getskin - by F1N4L - 15.08.2016, 14:29
Re: Function getskin - by Mister0 - 15.08.2016, 14:30
Re: Function getskin - by Mister0 - 15.08.2016, 14:35
Re: Function getskin - by Stinged - 15.08.2016, 14:36
Re: Function getskin - by Mister0 - 15.08.2016, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)