Dialog List Style
#1

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;

Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)