Custom skin doesn't show ingame
#1

Hello, I'm trying to add custom skins but when I give my self skin ID 299

Код:
AddCharModel(299, 299, "tommy.dff", "tommy.txd");
it doesn't show to custom skin

Files dff and txd has been added to the "Models" folder the console says its loaded and ingame it downloaded the mod but it doesn't show
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=644118
Concentrate on the text; second ID is the ID of the skin in-game. You, on the other hand, did the definition wrong.
Reply
#3

Custom skin ids are from (20000 to 30000), you’re not replacing the normal skins afterall; you’re ADDING them. Here’s the format:

PHP код:
AddCharModel(baseidnewiddffname[], txdname[]); 
In other words:

PHP код:
AddCharModel(29920000"tommy.dff""tommy.txd"); 
The skin ID for your new custom skin would be “20000” and it’d be based off skin ID 299.
Reply
#4

If I change my skin with the admin command to 20003 it says invalid skinid so I added ID 20003 to the SkinList and it still says invalid skinID
Where else do I define this ?
Reply
#5

show us your setskin command
Reply
#6

Quote:
Originally Posted by BulletRaja
Посмотреть сообщение
show us your setskin command
PHP код:
CMD:setskin(playeridparams[])
{
    if (
PlayerInfo[playerid][pAdmin] >= 3)
    {
        new 
string[128], giveplayeridskinid;
        if(
sscanf(params"ud"giveplayeridskinid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /setskin [player] [skinid]");
        if(
IsPlayerConnected(giveplayerid))
        {
            if((
PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin]) && giveplayerid != playerid) return SendClientMessageEx(playeridCOLOR_GREY"You cannot use this command on a the same/greater level admin than you!");
            if(!
IsInvalidSkin(skinid))
            {
                if(
GetPlayerSkin(giveplayerid) == skinid)
                {
                    
SendClientMessageExplayeridCOLOR_WHITE"The person you're trying to change skins of already is using the skin you're trying to set." );
                }
                else
                {
                    
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][pModel]);
                    
format(szMiscArraysizeof(szMiscArray), "Skin changed %d"skinid);
                    
DBLog(playeridgiveplayerid"Admin"szMiscArray);
                }
            }
            else
            {
                
SendClientMessageEx(playeridCOLOR_GREY"Invalid skin ID!");
            }
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command.");
    }
    return 
1;

Reply
#7

Show us your
pawn Код:
IsInvalidSkin
function code
Reply
#8

I managed to edit this function I'm now able to get the skin id, however is it possible to add the new skin to the mselection ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)