SA-MP Forums Archive
/clothes - 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: /clothes (/showthread.php?tid=658152)



/clothes - ServerFiles - 25.08.2018

How can I make 2 different clothes system?

Like they can use /clothes 2 but the selectionmodel wont display or they can just type /clothes and selection model will display?

something like this
PHP код:
if(sscanf(params, "d", iSkin)) return SCP(playerid, "[skin id]");
....
if 
there's no input, it will appear ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); 



Re: /clothes - Ciandlah - 25.08.2018

Here you can try this, only took me like 20 secs to code this. Youll have to implement it into your script but its a small start for you
Код:
#define DIALOG_CLOTHES 001


CMD:clothes(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		//Your line to check if a player is logged in or not I.E if(IsPlayerLoggedIn(playerid))
		{
			ShowPlayerDialog(playerid, DIALOG_CLOTHES, DIALOG_STYLE_LIST, "Clothing Menu", "Selection Choice\nModel Choice", "Select", "Back");
			return 1;
		}
	}
	return 1;
}

CMD:cl(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		cmd_clothes(playerid, params);
	}
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_CLOTHES)
    {
        if(response) // If they click on the Select button this happens
        {
            switch(listitem)
            {
                case 0: // Selection choice option happens here
                case 1: // Model choice option happens here
            }
        }
        return 1;
    }
 
    return 0;
}



Re: /clothes - ServerFiles - 25.08.2018

Not what I wanted. What I mean is

If you type like
/clothes 200, it will changed your skin and the selectionmode won't appear

but if you type like
/clothes only, the selectionmode will appear since you haven't choose/pick any skin.


Re: /clothes - Shinja - 25.08.2018

PHP код:
if(!strlen(params)) //show dialog
else {
    if(
sscanf(params, "d", iSkin)) return SCP(playerid, "[skin id]");
    
//set his skin
}Â