SA-MP Forums Archive
Dialog List Style - 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: Dialog List Style (/showthread.php?tid=598492)



Dialog List Style - andreistalker - 13.01.2016

I have a problem with this help dialog, when i select the first item it close, and when i select the second it shows the 2nd dialog...

OnDialogResponse
PHP код:
case DIALOG_HELP:
                {
                    if(
response)
                    {
                        if(
listitem == 1)
                        {
                            
ShowPlayerDialog(playeridDIALOG_INFODIALOG_STYLE_MSGBOX"Help - INFO""/help - Iti afiseaza meniul de help\n/stats (playerid) - Iti afiseaza stats-urile tale sau ale unui alt jucator\n ""Inchide""");
                        }
                        if(
listitem == 2)
                        {
                            
ShowPlayerDialog(playeridDIALOG_RPGDIALOG_STYLE_MSGBOX"Help - RPG""/licenta - Ia-ti licenta de condus\n/payday - Iti afiseaza cat mai ai pana la PayDay-ul urmator\n/buylevel - Faci level-ul atunci cand ai destule RP-uri\n ""Inchide""");
                        }
                    }
                } 
And the help command
PHP код:
CMD:help(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_LIST"Help""1. Info \n2. RPG\n""Select""Inchide");
    return 
1;




Re: Dialog List Style - Eth - 13.01.2016

pawn Код:
case DIALOG_HELP:
                {
                    if(response)
                    {
                        switch(listitem)
                        {
                        case 0:
                        {
                            ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Help - INFO", "/help - Iti afiseaza meniul de help\n/stats (playerid) - Iti afiseaza stats-urile tale sau ale unui alt jucator\n ", "Inchide", "");
                        }
                        case 1:
                        {
                            ShowPlayerDialog(playerid, DIALOG_RPG, DIALOG_STYLE_MSGBOX, "Help - RPG", "/licenta - Ia-ti licenta de condus\n/payday - Iti afiseaza cat mai ai pana la PayDay-ul urmator\n/buylevel - Faci level-ul atunci cand ai destule RP-uri\n ", "Inchide", "");
                        }
                        }
                    }
                }
pawn Код:
CMD:help(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "Help", "1. Info \n2. RPG", "Select", "Inchide");
    return 1;
}



Re: Dialog List Style - andreistalker - 13.01.2016

Thanks didn't know that the cases are starting from 0