How to add all skins with code? -
Torran - 09.03.2010
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?
Re: How to add all skins with code? -
Correlli - 09.03.2010
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;
}
Re: How to add all skins with code? -
Torran - 09.03.2010
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.
Re: How to add all skins with code? -
Correlli - 09.03.2010
I've edited something, try now.
Re: How to add all skins with code? -
Torran - 09.03.2010
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")
Re: How to add all skins with code? -
Correlli - 09.03.2010
You probably have MAX_BAD_SKINS define somewhere in your script already.
Re: How to add all skins with code? -
Torran - 09.03.2010
Lol yeah i did, Fixed now, Thanks
Re: How to add all skins with code? -
Dreftas - 09.03.2010
but it wouldnt add all skins(284)
It adds about 150 :>
Re: How to add all skins with code? -
Correlli - 09.03.2010
Quote:
Originally Posted by Dreft
but it wouldnt add all skins(284) It adds about 150 :>
|
It adds all stable skins (total of 285).
Re: How to add all skins with code? -
Torran - 09.03.2010
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