All Skins wihnout stress
#1

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.
Reply
#2

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
Reply
#3

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

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

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

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
Reply
#6

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.
Reply
#7

Код:
    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;
}
Reply
#8

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
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)