Responsive Dialog
#5

PHP код:
#define DIALOG_HELP 0
#define DIALOG_SUPPRESSION_HELP 1
CMD:help(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_LIST"Commands""Suppressor\nSome shit""Continue""Cancel");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_HELP:
        {
            if(
response)
                return 
ShowPlayerDialog(playeridDIALOG_SUPPRESSION_HELPDIALOG_STYLE_LIST"Commands""Attach\nDettach""Yes""Exit");
        }
        case 
DIALOG_SUPPRESSION_HELP:
        {
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                        return 
SendClientMessage(playerid, -1"Attach");
                    case 
1:
                        return 
SendClientMessage(playerid, -1"Dettach");
                }
            }
            else
                return 
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_LIST"Commands""Suppressor\nSome shit""Continue""Cancel");
        }
    }
    return 
1;

P.S. Work on your indentation.
Reply


Messages In This Thread
Responsive Dialog - by Mo123 - 29.05.2018, 18:25
Re: Responsive Dialog - by Exhibit - 29.05.2018, 18:29
Re: Responsive Dialog - by RxErT - 29.05.2018, 19:08
Re: Responsive Dialog - by Mo123 - 29.05.2018, 20:49
Re: Responsive Dialog - by iSpark - 29.05.2018, 22:03

Forum Jump:


Users browsing this thread: 4 Guest(s)