Add custom skin to IsInvalidSkin - 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: Add custom skin to IsInvalidSkin (
/showthread.php?tid=652001)
Add custom skin to IsInvalidSkin -
IndependentGaming - 01.04.2018
hello since i have added 3 skins I had to make this function like this:
PHP код:
stock IsInvalidSkin(skin) {
if(!(0 <= skin <= 30000)) return 1;
return 0;
}
how can I add here that only add the skin IDs I have added there ?
PHP код:
stock IsInvalidSkin(skin) {
if(!(0 <= skin <= 311)) return 1;
return 0;
}
Re: Add custom skin to IsInvalidSkin -
ForCop - 01.04.2018
Quote:
Originally Posted by SacrificeGaming
hello since i have added 3 skins I had to make this function like this:
PHP код:
stock IsInvalidSkin(skin) {
if(!(0 <= skin <= 30000)) return 1;
return 0;
}
how can I add here that only add the skin IDs I have added there ?
PHP код:
stock IsInvalidSkin(skin) {
if(!(0 <= skin <= 311)) return 1;
return 0;
}
|
Код:
stock IsInvalidSkin(skin) {
if((-1 <= skin <= 312)) return true;
return false;
}
Re: Add custom skin to IsInvalidSkin -
IndependentGaming - 01.04.2018
Quote:
Originally Posted by ForCop
Код:
stock IsInvalidSkin(skin) {
if((-1 <= skin <= 312)) return true;
return false;
}
|
312 doesn't make sence ?
skinID starts at 20001, 20002, 20003
Re: Add custom skin to IsInvalidSkin -
ForCop - 01.04.2018
Quote:
Originally Posted by SacrificeGaming
312 doesn't make sence ?
skinID starts at 20001, 20002, 20003
|
Код:
stock IsValidCustomSkin(skinid){
switch(skinid){
case 0..73,75..311,2000..30000: return true;
return false;
}