27.02.2011, 08:01
Hey Guys , Can anyone give me /skin command like /skin 1-299
Thanks .
Thanks .
COMMAND:skin(playerid, params[])
{
new skinid;
if(!sscanf(params, "i",skinid))
{
if(skinid < 300)
{
SetPlayerSkin(playerid, skinid);
SendClientMessage(playerid, COLOR_WHITE," You have new skin!! Wooho!");
}
else return SendClientMessage(playerid, COLOR_LIGHTRED,"Please use skin ID's between 0 and 299!");
}
else return SendClientMessage(playerid, COLOR_WHITE,"Usage: /skin [ID (0-299)]");
return 1;
}
Thanks for being impatient.
http://forum.sa-mp.com/showpost.php?...&postcount=518 I already made your command for you, but you had to go and make two separate posts. @xRyder - Your command has a redundant usage of sscanf, you can just use isnull and strval as you're only dealing with one integer. Furthermore, invalid skin IDs can be sent through your command. |
This is rough example. You should code it a little bit more if you want to solve all the bugs that comes with that command.
![]() |