SA-MP Forums Archive
Custom skin doesn't show ingame - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Custom skin doesn't show ingame (/showthread.php?tid=651844)



Custom skin doesn't show ingame - IndependentGaming - 29.03.2018

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


Re: Custom skin doesn't show ingame - Maxandmov - 29.03.2018

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.


Re: Custom skin doesn't show ingame - CantBeJohn - 29.03.2018

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.


Re: Custom skin doesn't show ingame - IndependentGaming - 29.03.2018

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 ?


Re: Custom skin doesn't show ingame - BulletRaja - 29.03.2018

show us your setskin command


Re: Custom skin doesn't show ingame - IndependentGaming - 29.03.2018

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;




Re: Custom skin doesn't show ingame - Ghazal - 29.03.2018

Show us your
pawn Код:
IsInvalidSkin
function code


Re: Custom skin doesn't show ingame - IndependentGaming - 29.03.2018

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 ?