#1

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

please help :/
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=407045
Reply
#4

But I want to make at the command /skin ID that gave me skin and only if / skin proved to list.
Reply
#5

Use Sscanf
Reply
#6

PHP код:
CMD:skin(playeridparams[])
{
    new 
skin;
    if(!
sscanf(params"i"skin)) {
        if(
skin 299 || skin 0) {
            
SendClientMessage(playerid0xFF0000FF"error: invalid skin ID.");
        }
        
SetPlayerSkin(playeridskin);
    }
    else {
           
SendClientMessage(playerid0xFFFFFF"usage: /skin [id]");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)