How to add all skins with code?
#1

Hello,

Couple of months back i found this code on samp wiki,
It was a code that i put under OnGameModeInit or something,
It aloud the player to pick from ALL skins that were valid,
I was looking on wiki and i am unable to find that code,
Can anyone tell me the code/Where to find it?
Reply
#2

pawn Код:
IsValidSkin(skinid) // credits to Simon Campbell
{
  #define MAX_BAD_SKINS (14)
  new
      badSkins[MAX_BAD_SKINS] = {
    3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289
  };
  for(new i = 0; i < MAX_BAD_SKINS; i++)
  {
    if(skinid == badSkins[i]) return false;
  }
  #undef MAX_BAD_SKINS
  return true;
}

public OnGameModeInit()
{
  for(new s = 0; s < 299; s++)
  {
    if(IsValidSkin(s)) AddPlayerClass(s, X_POS, Y_POS, Z_POS, ANGLE, -1, -1, -1, -1, -1, -1);
  }
  return true;
}

Reply
#3

Thanks

C:\Users\Torran\Desktop\tRoleplay\gamemodes\tFreer oam.pwn(171) : warning 201: redefinition of constant/macro (symbol "MAX_BAD_SKINS")
C:\Users\Torran\Desktop\tRoleplay\gamemodes\tFreer oam.pwn(176) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

I've edited something, try now.
Reply
#5

Now im just left with the warning

C:\Users\Torran\Desktop\tRoleplay\gamemodes\tFreer oam.pwn(171) : warning 201: redefinition of constant/macro (symbol "MAX_BAD_SKINS")
Reply
#6

You probably have MAX_BAD_SKINS define somewhere in your script already.
Reply
#7

Lol yeah i did, Fixed now, Thanks
Reply
#8

but it wouldnt add all skins(284) It adds about 150 :>
Reply
#9

Quote:
Originally Posted by Dreft
but it wouldnt add all skins(284) It adds about 150 :>
It adds all stable skins (total of 285).
Reply
#10

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Dreft
but it wouldnt add all skins(284) It adds about 150 :>
It adds all stable skins (total of 285).
Yep just what i wanted thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)