IsInvalidSkin
#1

Hello, i scripting one server
and i have this problem

pawn Код:
for(new i=0; i<=299; i++)
    {
        if(!IsInvalidSkin(i)) AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    }
i have this error:

Код:
D:\Infinity Freeroam\gamemodes\infinitygm.pwn(127) : error 017: undefined symbol "IsInvalidSkin"
how to fix it?

Thanks
Reply
#2

Код:
IsInvalidSkin(SkinID)
{
#define MAX_BAD_SKINS 22
new InSkin[MAX_BAD_SKINS] = {
0, 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 == InSkin[i]) return true;}
return 0;
}
or
Код:
stock IsValidSkin(skinid) // Creat de catre Simon.
{
    #define MAX_BAD_SKINS 14

    new badSkins[MAX_BAD_SKINS] = 
    {
        3, 4, 5, 6, 8, 42, 65, 74, 86,
        119, 149, 208, 273, 289
    };

    if (skinid < 0 || skinid > 299) 
            return 0;

    for (new i = 0; i < MAX_BAD_SKINS; i++) 
    {
        if (skinid == badSkins[i]) 
        return 0;
    }
    #undef MAX_BAD_SKINS

    return 1;
}
Reply
#3

thanks mann
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)