SA-MP Forums Archive
How to add 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)
+--- Thread: How to add all skins? (/showthread.php?tid=299690)



How to add all skins? - GAMER_PS2 - 27.11.2011

i want to add all skins id 0 to id 299 i know how to add with

Код:
AddPlayerClass(blah);
but it would take so many days to add it up to 299

how can i add skins only with short code?


Re: How to add all skins? - [L3th4l] - 27.11.2011

pawn Код:
for(new i = 0; i < 299; i++)
{
    if(IsValidSkin(i)) AddPlayerClass(i, ...);
}
If you don't have a "IsValidSkin" function search around for one, or remove it.


Re: How to add all skins? - Laronic - 27.11.2011

pawn Код:
public OnGameModeInit()
{
    for(new skinid = 0; skinid < 299; skinid++)
    {
        if(IsValidSkin(skinid))
        {
            AddPlayerClass(skinid, . . .);
        }
    }
    return true;
}

stock IsValidSkin(skinid)
{
    if(skinid < 0 || skinid > 299) return false;
    switch(skinid)
    {
        case 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289: return false;
    }
    return true;
}
Edit: Too late.


Re: How to add all skins? - .:Kaos:. - 27.11.2011

If you are using 0.3d the "invalid" skins were added.


Re: How to add all skins? - GAMER_PS2 - 27.11.2011

CyberGhost code is working but wheres id 299


Re: How to add all skins? - [L3th4l] - 27.11.2011

Skins start with 0, so 299 = 298. Set it to 300. (My bad )


Re: How to add all skins? - GAMER_PS2 - 27.11.2011

thanks guys it work


Re: How to add all skins? - Tanush123 - 27.11.2011

Lol when i added skin ongamemode, i had to do 1 by 1