/skin command doesn't work - 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 command doesn't work (
/showthread.php?tid=575766)
/skin command doesn't work -
Blackazur - 30.05.2015
It always says "You cannot use this Skin!":
Код:
CMD:skin(playerid,params[])
{
new skinid, string[128];
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, /skin skinid");
if(skinid < 1 || skinid > 299) return SendClientMessage(playerid,"Skin ID must be between 1 and 299!");
if(skinid > 162 || skinid < 217) return SendClientMessage(playerid,"You cannot use this Skin!");
SetPlayerSkin(playerid, skinid);
SendClientMessage(playerid,"Skin changed");
return 1;
}
Re : /skin command doesn't work -
AlexBlack - 30.05.2015
replace :
PHP код:
if(skinid > 162 || skinid < 217)
to :
PHP код:
if(skinid > 162 && skinid < 217)
Re: /skin command doesn't work -
fuckingcruse - 30.05.2015
After 1 " if " use " else if " and at " else " , and your last sendclientmessage is wrong , you didn't use any color
Re: /skin command doesn't work -
[LvZ]Free - 30.05.2015
if(skinid > 162 || skinid < 217) this code doesnt allow you to use skins ids higher than 162 or lower than 217 so i don't know why are you using it. If you want the play not to use the certain skin ids 162 / 217 you should do this.
if(skinid = 162 || skinid = 217)
Re: /skin command doesn't work -
NoDi522 - 30.05.2015
PHP код:
CMD:skin(playerid,params[])
{
new skinid, string[128];
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, /skin skinid");
if(skinid < 1 || skinid > 299) return SendClientMessage(playerid,"Skin ID must be between 1 and 299!");
else if(skinid > 162 || skinid < 217) return SendClientMessage(playerid,"You cannot use this Skin!");
{
SetPlayerSkin(playerid, skinid);
SendClientMessage(playerid,"Skin changed");
}
return 1;
}
Just do better this brackets because i edited code on this site so...