SA-MP Forums Archive
[HELP] Adding all skins - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Adding all skins (/showthread.php?tid=110235)



[HELP] Adding all skins - FreddeN - 25.11.2009

Is there a good way to add all skins to your skin selection?
But it must be editable, cause cop skins and some other specific skins may not be in the list.

Adding every skin like this:

Код:
AddPlayerClass(1,1743.0060,-1861.6870,13.5772,0.3222,0,0,0,0,0,0);
AddPlayerClass(2,1743.0060,-1861.6870,13.5772,0.3222,0,0,0,0,0,0);
AddPlayerClass(3,1743.0060,-1861.6870,13.5772,0.3222,0,0,0,0,0,0);
That is to much work, the skins goes up to ID 264+.

Thanks for all anwers.


Re: [HELP] Adding all skins - Correlli - 25.11.2009

https://sampwiki.blast.hk/wiki/Skins:All


Re: [HELP] Adding all skins - FreddeN - 25.11.2009

Quote:
Originally Posted by Don Correlli
Looks good but where am I going to put:

Код:
IsValidSkin(skinid)
{
  #define	MAX_BAD_SKINS 22
  new badSkins[MAX_BAD_SKINS] =
  { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289 };
  if (skinid < 0 || skinid > 299) return false;
  for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  #undef MAX_BAD_SKINS
  return 1;
}



Re: [HELP] Adding all skins - Correlli - 25.11.2009

Somewhere in your script (don't put it inside of some callback or function).


Re: [HELP] Adding all skins - FreddeN - 25.11.2009

Quote:
Originally Posted by Don Correlli
Somewhere in your script (don't put it inside of some callback or function).
It works, but is this where the skins is going to show up, spawn?

Код:
AddPlayerClass(i,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);



Re: [HELP] Adding all skins - Correlli - 25.11.2009

Yes, the coords will be the same for every skin. You could check for player's class-ID at OnPlayerSpawn and set your own position.