Code For All Skins?
#1

Ok ehm... I'm searchin a code for all skins..
so something that adds all skins to my gamemode with only a few lines..
I know I've seen something like that before, however I can't remember where and I can't find any now...
can someone of you provide me with such a code?
Reply
#2

Quote:
Originally Posted by Sascha
Посмотреть сообщение
Ok ehm... I'm searchin a code for all skins..
so something that adds all skins to my gamemode with only a few lines..
I know I've seen something like that before, however I can't remember where and I can't find any now...
can someone of you provide me with such a code?
Put this under OnGameModeInit.
pawn Код:
for(new skins; skins < 300; skins++)
{
      if(IsValidSkin(skins)) AddPlayerClass(skins, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0)
}
Reply
#3

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Put this under OnGameModeInit.
pawn Код:
for(new skins; skins < 300; skins++)
{
      if(IsValidSkin(skins)) AddPlayerClass(skins, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0)
}
pawn Код:
if(IsValidSkin(skins))
If this default function?
Reply
#4

Quote:
Originally Posted by Raimis_R
Посмотреть сообщение
pawn Код:
if(IsValidSkin(skins))
If this default function?
Nope, IsValidSkin is an user defined function. I'm searching around to find it Atm.
Reply
#5

no...
however I know how to make that function on my own..
I'll send the function into this topic so other guys can use it too^^

edit:
here's the function
pawn Код:
stock IsValidSkin(skin)
{
    if(skin == 3 || skin == 4 || skin == 5 || skin == 6 || skin == 8 || skin == 42 || skin == 53 || skin == 65
    || skin == 74 || skin == 86 || skin == 91 || skin == 208 || skin == 273 || skin == 289 || skin == 300 ||
    skin == 119 || skin == 149) return 0;
    return 1;
}
Reply
#6

pawn Код:
stock IsValidSkin(skinid)
{
    if((skinid < 0) || (skinid > 300)) return 0;
    switch(skinid)
    {
        case 3..6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289: return 0;
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by Sascha
Посмотреть сообщение
no...
however I know how to make that function on my own..
I'll send the function into this topic so other guys can use it too^^
Found it !

pawn Код:
IsValidSkin(skinid) //Thanks Sergei
{
    if(0 < skinid < 300)
    {
        switch(skinid)
        {
            case 3, 4, 5, 6, 8, 42, 65, 74, 86,
            119, 149, 208, 273, 289: return 0;
        }
        return 1;
    }
    return 0;
}
Reply
#8

oh your function is much better lol..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)