New SAMP Skins?
#1

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
Reply
#2

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

You can use SetPlayerSkin.
Reply
#3

Код:
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");"
Reply
#4

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);
}
Reply
#5

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
Reply
#6

Don't forget exclude 74 id.
Reply
#7

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.
Reply
#8

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

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)