Dialog wont work right
#6

PHP код:
// Make sure to define each dialog with a unique number
#define DIALOG_NAVI1 1
#define DIALOG_NAVI2 2
ocmd:navi(playerid,params[])
{
    
ShowPlayerDialog(playeridDIALOG_NAVI1DIALOG_STYLE_LIST"Navigation system""•List 1\n•List 2\n•List 3""Choose""Cancel");
    return 
1;
}
// OnDialogResponse
if(dialogid == DIALOG_NAVI1)
{
    if(
response// if user selected something
    
{
        switch(
listitem)
        {
            case 
0// User has selected the 1st item in list from DIALOG_NAVI1
            
{
                  
ShowPlayerDialog(playeridDIALOG_NAVI2DIALOG_STYLE_LIST"Navigation system""•alist1\n•alist2\n•alist3""Choose""Cancel");
            }
            case 
1// User has selected the 2nd item in list from DIALOG_NAVI1
            
{
                  
// do something
            
}
            case 
2// User has selected the 3rd item in list from DIALOG_NAVI1
            
{
                  
// do something
            
}
        }
    }
}
if(
dialogid == DIALOG_NAVI2)
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0SendClientMessage(playerid, -1"1. item selected");
            case 
1SendClientMessage(playerid, -1"2. item selected");
            case 
2SendClientMessage(playerid, -1"3. item selected");
        }
    }

Reply


Messages In This Thread
Dialog wont work right - by BrightLeaN - 16.04.2018, 16:00
Re: Dialog wont work right - by UFF - 16.04.2018, 16:20
Re: Dialog wont work right - by BrightLeaN - 16.04.2018, 16:29
Re: Dialog wont work right - by UFF - 16.04.2018, 16:35
Re: Dialog wont work right - by jasperschellekens - 16.04.2018, 17:56
Re: Dialog wont work right - by kovac - 16.04.2018, 18:25

Forum Jump:


Users browsing this thread: 2 Guest(s)