SA-MP Forums Archive
Help set skin SAMP - 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: Help set skin SAMP (/showthread.php?tid=654282)



Help set skin SAMP - nguyenthanhdanhsamp - 25.05.2018

How to change the IsInvalidSkin function to set skin custom?, because custom skin default is 20001 is up. I use Samp 0.3DL

PHP код:
CMD:setskin(playeridparams[]) 

    if (
PlayerInfo[playerid][pAdmin] >= 3
    { 
        new 
string[128], giveplayeridskinid
        if(
sscanf(params"ud"giveplayeridskinid)) return SendClientMessageEx(playeridCOLOR_GREY"SU DUNG: /setskin [Player] [skinid]"); 
  
        if(
IsPlayerConnected(giveplayerid)) 
        { 
   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]); 
                } 
            } 
            else 
            { 
                
SendClientMessageEx(playeridCOLOR_GREY"Invalid skin ID!"); 
            } 
        } 
    } 
    else 
    { 
        
SendClientMessageEx(playeridCOLOR_GRAD1"Ban Khфng Cу Kha Nang Su Dung Lкnh Nаy !"); 
    } 
    return 
1




Re: Help set skin SAMP - GeorgeMcReary - 25.05.2018

Define IsValidSkin Function by yourself. add exclusion to skins 20001 and above.


Re: Help set skin SAMP - nguyenthanhdanhsamp - 25.05.2018

OK. it work. Thanks <3 Very Good