#1

hello guys i wanted to know how can i use THIS skins in my server?
Reply
#2

You need to install the latest version of samp which is 0.3.7.
Reply
#3

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
You need to install the latest version of samp which is 0.3.7.
i have already installed it and also in my server files i updated npc.exe, server.exe and announce.exe so that my server can playable on 0.3.7, but when in game i do /setskin playerid 307 (cop skin) it says invald skin id?
Reply
#4

Maybe you have limited the command. Show us the code.
Reply
#5

Quote:
Originally Posted by Darkwood17
Посмотреть сообщение
Maybe you have limited the command. Show us the code.
PHP код:
stock IsInvalidSkin(skin)
{
    
#define    MAX_BAD_SKINS   15
    
new badSkins[MAX_BAD_SKINS] =
    {
        
13456842657486,
        
119149208273289
    
};
    for (new 
0MAX_BAD_SKINSi++)
    {
        if (
skin == badSkins[i] || skin || skin >= 300 ) return true;
    }
    return 
false;

/setskin cmd:
PHP код:
CMD:setskin(playeridparams[])
{
    if (
PlayerInfo[playerid][pAdmin] >= 3)
    {
        new 
string[128], giveplayeridskinid;
        if(
sscanf(params"id"giveplayeridskinid)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /setskin [playerid] [skinid]");
        if(
IsPlayerConnected(giveplayerid))
        {
            if(!
IsInvalidSkin(skinid))
            {
                if(
GetPlayerSkin(giveplayerid) == skinid)
                {
                    
SendClientMessageExplayeridCOLOR_WHITE"The player you're trying to change skins of already is using the skin you're trying to set." );
                }
                else
                {
                    
PlayerInfo[giveplayerid][pChar] = skinid;
                    
PlayerInfo[giveplayerid][pModel] = skinid;
                    
format(stringsizeof(string), "Your skin has been changed to ID %d by Administrator %s."skinidGetPlayerNameEx(playerid));
                    
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                    
format(stringsizeof(string), "You have given %s skin ID %d."GetPlayerNameEx(giveplayerid), skinid);
                    
SendClientMessageEx(playeridCOLOR_WHITEstring);
                    
SetPlayerSkin(giveplayeridPlayerInfo[giveplayerid][pChar]);
                }
            }
            else
            {
                
SendClientMessageEx(playeridCOLOR_GREY"Invalid skin ID!");
            }
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command!");
    }
    return 
1;

i have added some bad skins so that player cant set that skins but, i havent added new 0.3.7 skins in bad skins list then too, IG it says Invalid Skin ID! ?

EDIT: i have edited now some thing in IsAValidSkin so lets hope it works!
Reply
#6

Try this:

Код:
stock IsInvalidSkin(skin) 
{ 
    #define    MAX_BAD_SKINS   15 
    new badSkins[MAX_BAD_SKINS] = 
    { 
        1, 3, 4, 5, 6, 8, 42, 65, 74, 86, 
        119, 149, 208, 273, 289 
    }; 

    for (new i = 0; i < MAX_BAD_SKINS; i++) 
    { 
        if (skin == badSkins[i] || skin < 0 || skin >= 311 ) return true; 
    } 

    return false; 
}
Reply
#7

pawn Код:
stock IsInvalidSkin(skin)
{
    #define    MAX_BAD_SKINS   15
    new badSkins[MAX_BAD_SKINS] =
    {
        1, 3, 4, 5, 6, 8, 42, 65, 74, 86,
        119, 149, 208, 273, 289
    };

    for (new i = 0; i < MAX_BAD_SKINS; i++)
    {
        if (skin == badSkins[i] || skin < 0 || skin >= 311 ) return true;
    }

    return false;
}
Reply
#8

Quote:
Originally Posted by Darkwood17
Посмотреть сообщение
Try this:

Код:
stock IsInvalidSkin(skin) 
{ 
    #define    MAX_BAD_SKINS   15 
    new badSkins[MAX_BAD_SKINS] = 
    { 
        1, 3, 4, 5, 6, 8, 42, 65, 74, 86, 
        119, 149, 208, 273, 289 
    }; 

    for (new i = 0; i < MAX_BAD_SKINS; i++) 
    { 
        if (skin == badSkins[i] || skin < 0 || skin >= 311 ) return true; 
    } 

    return false; 
}
Quote:
Originally Posted by Metharon
Посмотреть сообщение
pawn Код:
stock IsInvalidSkin(skin)
{
    #define    MAX_BAD_SKINS   15
    new badSkins[MAX_BAD_SKINS] =
    {
        1, 3, 4, 5, 6, 8, 42, 65, 74, 86,
        119, 149, 208, 273, 289
    };

    for (new i = 0; i < MAX_BAD_SKINS; i++)
    {
        if (skin == badSkins[i] || skin < 0 || skin >= 311 ) return true;
    }

    return false;
}
Thanks guys it works now! rep++ to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)