SA-MP Forums Archive
[SOLVED] About 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: [SOLVED] About skins... (/showthread.php?tid=123495)



[SOLVED] About skins... - Lorenc_ - 26.01.2010

hello is there any function that could put all skins in class selection?
my friend told me there was so i just wanted to ask you guys whats the function..
I really dont like the function AddPlayerClass...

thanks,
Lorenc



Re: [HELP] About skins... - Lorenc_ - 26.01.2010

*bump*


Re: [HELP] About skins... - deather - 26.01.2010

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

For more information read
http://forum.sa-mp.com/index.php?topic=67900.0


Re: [HELP] About skins... - bajskorv123 - 26.01.2010

Above GameModeInit()
Код:
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 < -1 || skinid > 300) return false;
  for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  #undef MAX_BAD_SKINS
  return 1;
}
Under GameModeInit()
Код:
AddPlayerClass(0, x, y, z, a, wep1, ammo1, wep2, ammo2, wep3, ammo3); /*Here CJ must be because he doesnt get defined else*/
for(new i = 0; i < 300; i++)
{
  if(IsValidSkin(i))
  {
    AddPlayerClass(i, x, y, z, a, wep1, ammo1, wep2, ammo2, wep3, ammo3);
  }
}



Re: [HELP] About skins... - Lorenc_ - 26.01.2010

Quote:
Originally Posted by [NWA
Hannes ]
Above GameModeInit()
Код:
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 < -1 || skinid > 300) return false;
  for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  #undef MAX_BAD_SKINS
  return 1;
}
Under GameModeInit()
Код:
AddPlayerClass(0, x, y, z, a, wep1, ammo1, wep2, ammo2, wep3, ammo3); /*Here CJ must be because he doesnt get defined else*/
for(new i = 0; i < 300; i++)
{
  if(IsValidSkin(i))
  {
    AddPlayerClass(i, x, y, z, a, wep1, ammo1, wep2, ammo2, wep3, ammo3);
  }
}
Thanks!

Quote:
Originally Posted by |)ЂΩ†{−}ЂR™ – Dare To Die
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

For more information read
http://forum.sa-mp.com/index.php?topic=67900.0
Ok sorry kaisersouse I forgot to read the topic =(
Thanks for the info btw.