SA-MP Forums Archive
All Skins wihnout stress - 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: All Skins wihnout stress (/showthread.php?tid=157081)



All Skins wihnout stress - OldDirtyBastard - 05.07.2010

I wanna ask if theres possible to add all skins by one code...
And how i remove the bugged skins(main ingame characters)
I first tried to do with the AddPlayerClass, but it was realy stressfull n long process..
And by the skin selection, the CJ skin randomly poped up out of novhere(even it wasnt included in the GM)
I woud be glad if someone woud help me and thank god the forum is back
Regards.


Re: All Skins wihnout stress - TheNuttyScientist - 05.07.2010

If you didn't add the CJ skins you would have inserted invalid skin ids.

Here's a list of skins:

http://weedarr.wikidot.com/skinlistc


Re: All Skins wihnout stress - OldDirtyBastard - 05.07.2010

Ok, but is there a way to add all skins by one code?


Re: All Skins wihnout stress - TheNuttyScientist - 05.07.2010

No, I do not believe there is such a thing.

There may be but I have never seen one, sorry.


Re: All Skins wihnout stress - BP13 - 05.07.2010

Quote:
Originally Posted by OldDirtyBastard
Посмотреть сообщение
Ok, but is there a way to add all skins by one code?
There was a code for it. I don't recall it right now. But you can use this I wrote:


http://pastebin.com/kJdQT1g2


Re: All Skins wihnout stress - OldDirtyBastard - 05.07.2010

just found this here on the forum
pawn Код:
for(new i = 0; i < 299; i++)
  {
    if(IsValidSkin(i))
    {
      AddPlayerClass(i,0.0,0.0,0.0,0.0,24,100,29,50,-1,-1);
    }
  }
Adds all skins, this is exactly what ive been loking for.
Anyway thakns.


Re: All Skins wihnout stress - watkijkje - 05.07.2010

Код:
    for(new i = 0; i < 299; i++)
    {
        if(IsValidSkin(i))
        {
            AddPlayerClass(i,-1327.804,-214.589,14.529,0.0,0,0,0,0,0,0);
        }
    }
Код:
IsValidSkin(skinid)
{
    #define	MAX_BAD_SKINS 22
    new badSkins[MAX_BAD_SKINS] =
    {
        3, 4, 5, 6, 8, 42, 65, 74, 86,
        119, 149, 208, 265, 266, 267,
        268, 269, 270, 271, 272, 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: All Skins wihnout stress - dice7 - 05.07.2010

This should work

pawn Код:
for (new i = 0; i < 300; i++)
{
    if (IsValidSkin(i))
    {
        AddPlayerClass(i, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
    }
}




IsValidSkin(skinid)
{
    switch (skinid)
    {
        case 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 265, 266, 267, 268, 269, 270, 271, 272, 273, 289: { return 0; }
        default: {return 1;}
    }
    return 1;
}

Edit: Damn it, the "there are new replies after you clicked 'reply'" thingy isn't implanted here


Re: All Skins wihnout stress - OldDirtyBastard - 05.07.2010

hmm getting that "IsValidSkin" is never used...even when i tried to forward it


Re: All Skins wihnout stress - dice7 - 05.07.2010

You need to put the for loop under OnGameModInit and the IsValidSkin function outside any callbacks/functions, preferably at the bottom of your script