SA-MP Forums Archive
New SAMP Skins? - 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: New SAMP Skins? (/showthread.php?tid=573019)



New SAMP Skins? - DevinPatino - 03.05.2015

I'm currently new to all of this skin features of samp. I don't know nothing about the skins how to add nor remove, Anyone can teach me how to add the new skins would much love it! Rep+ for sure I'm using ZCMD command processer


Re: New SAMP Skins? - Dredd - 03.05.2015

Skins WIKI
Skin id 300 to 311 were added in SA-MP 0.3.7

You can use SetPlayerSkin.


Re: New SAMP Skins? - JaydenJason - 03.05.2015

Код:
CMD:setskin(playerid, params)
{
	new skinid;
	if(sscanf(params, "i", skinid))
	{
		if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");
		SetPlayerSkin(playerid, skinid);
	}
	return 1;
}
note, if you can't make such simple thing, search for "SSCANF" and install that too, you need it for this.

(if it doesn't work, replace "return SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");" with "SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");"


Re: New SAMP Skins? - Patrik356b - 05.05.2015

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
(if it doesn't work, replace "return SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");" with "SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");"
If you remove "return" the if statement should be like
Код:
if(skinid < 0 || skinid > 311) 
{ 
    SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");
}
else
{
    SetPlayerSkin(playerid, skinid);
}



Re: New SAMP Skins? - J4Rr3x - 05.05.2015

Quote:
Originally Posted by Patrik356b
Посмотреть сообщение
If you remove "return" the if statement should be like
Код:
if(skinid < 0 || skinid > 311) 
{ 
    SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");
}
else
{
    SetPlayerSkin(playerid, skinid);
}
Better to do this:
Код:
if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");
SetPlayerSkin(playerid, skinid);

// Just two lines :D



Re: New SAMP Skins? - ZiGGi - 05.05.2015

Don't forget exclude 74 id.


Re: New SAMP Skins? - Patrik356b - 06.05.2015

Quote:
Originally Posted by J4Rr3x
Посмотреть сообщение
Better to do this:
Код:
if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, -1, "Don't go lower than 0, or higher than 311");
SetPlayerSkin(playerid, skinid);

// Just two lines :D
That is worse to read but performance is the same.


Re: New SAMP Skins? - Puppy - 06.05.2015

There is nothing wrong with using the 74 skin ID, it's just CJ nothing else.


Re: New SAMP Skins? - Patrik356b - 06.05.2015

Quote:
Originally Posted by Puppy
Посмотреть сообщение
There is nothing wrong with using the 74 skin ID, it's just CJ nothing else.
if there is no difference there is no need to include it.


Re: New SAMP Skins? - HeLiOn_PrImE - 07.05.2015

Quote:
Originally Posted by Patrik356b
Посмотреть сообщение
if there is no difference there is no need to include it.
It was not included. 74 is just an invalid skin ID.
In the past the server would crash if you tried to apply an invalid skin, now it just sets it to 0, which happens to be CJ's skin.