Skin - 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: Skin (
/showthread.php?tid=609765)
Skin -
andreyysk - 16.06.2016
Hello,
I need that when you use the /skin showed up list where the skins and when /skin ID In order to give players skin, but did not show skin list. How to do it? I need to make it inconsistent. My DCMD code:
dcmd(skin,4,cmdtext);
dcmd_skin(playerid,params[])
{
{
DestroySelectionMenu(playerid);
SetPVarInt(playerid, "skinc_active", 1);
CreateSelectionMenu(playerid);
SelectTextDraw(playerid, 0xACCBF1FF);
}
{
if(IsValidSkin(strval(params)) == 0) return SendClientMessage(playerid,COLOR_RED,"bad id.");
else return SetPlayerSkin(playerid,strval(params));
}
}
Re: Skin -
andreyysk - 16.06.2016
please help :/
Re: Skin -
luke49 - 16.06.2016
https://sampforum.blast.hk/showthread.php?tid=407045
Re: Skin -
andreyysk - 16.06.2016
But I want to make at the command /skin ID that gave me skin and only if / skin proved to list.
Re: Skin -
Golf - 16.06.2016
Use Sscanf
Re: Skin -
luke49 - 16.06.2016
PHP код:
CMD:skin(playerid, params[])
{
new skin;
if(!sscanf(params, "i", skin)) {
if(skin > 299 || skin < 0) {
SendClientMessage(playerid, 0xFF0000FF, "error: invalid skin ID.");
}
SetPlayerSkin(playerid, skin);
}
else {
SendClientMessage(playerid, 0xFFFFFF, "usage: /skin [id]");
}
return 1;
}