Dialog problem
#1

pawn Код:
if(dialogid == 100)
{
    if(!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");

    switch(listitem)
    {
        case 0:
        {
            new part1[] = "\n/car - Info about your vehicle\n/cars - Statistics about the server vehicles\n/buycar\t\t- Buy a vehicle\n/sellcar - to sell your vehicle\n/callcar - call your vehicle";
            new part2[] = "\n/watch[car/off] - to spectate your vehicle\n/[Un]lock - To lock/unlock your vehicle\n/resetcar - to reset your vehicle to the parked position\n/eject[all] - To eject a player from your vehicle";
            new string[400]; //128 is way to small (part2 = nearly 200)
            format(string, sizeof(string),"%s %s",part1,part2);
            ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX,"Vehicle Car System",string,"Done","");
        }
        case 1:
        {
            //Second page
        }
        case 2:
        {
            //3rd page
        }
    }
}
When i click on page 1/2/3 nothing happen, what's the problem could be?
Thanks.
Reply
#2

Try this

PHP код:
if(dialogid == 100)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                new 
part1[] = "\n/car - Info about your vehicle\n/cars - Statistics about the server vehicles\n/buycar\t\t- Buy a vehicle\n/sellcar - to sell your vehicle\n/callcar - call your vehicle";
                new 
part2[] = "\n/watch[car/off] - to spectate your vehicle\n/[Un]lock - To lock/unlock your vehicle\n/resetcar - to reset your vehicle to the parked position\n/eject[all] - To eject a player from your vehicle";
                new 
string[400]; //128 is way to small (part2 = nearly 200)
                
format(stringsizeof(string),"%s %s",part1,part2);
                
ShowPlayerDialog(playerid100DIALOG_STYLE_MSGBOX,"Vehicle Car System",string,"Done","");
            }
        }
    } 
Reply
#3

Quote:
Originally Posted by Ken97
Посмотреть сообщение
Try this

PHP код:
if(dialogid == 100)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                new 
part1[] = "\n/car - Info about your vehicle\n/cars - Statistics about the server vehicles\n/buycar\t\t- Buy a vehicle\n/sellcar - to sell your vehicle\n/callcar - call your vehicle";
                new 
part2[] = "\n/watch[car/off] - to spectate your vehicle\n/[Un]lock - To lock/unlock your vehicle\n/resetcar - to reset your vehicle to the parked position\n/eject[all] - To eject a player from your vehicle";
                new 
string[400]; //128 is way to small (part2 = nearly 200)
                
format(stringsizeof(string),"%s %s",part1,part2);
                
ShowPlayerDialog(playerid100DIALOG_STYLE_MSGBOX,"Vehicle Car System",string,"Done","");
            }
        }
    } 
But i wanted when click player Page 1 it's show the vehicle system commands same as Page 2, and in Page 3 it's showing the Special commands for special vehicles.
Reply
#4

PHP код:
if(dialogid == 100
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                new 
part1[] = "\n/car - Info about your vehicle\n/cars - Statistics about the server vehicles\n/buycar\t\t- Buy a vehicle\n/sellcar - to sell your vehicle\n/callcar - call your vehicle"
                new 
part2[] = "\n/watch[car/off] - to spectate your vehicle\n/[Un]lock - To lock/unlock your vehicle\n/resetcar - to reset your vehicle to the parked position\n/eject[all] - To eject a player from your vehicle"
                new 
string[400]; //128 is way to small (part2 = nearly 200) 
                
format(stringsizeof(string),"%s %s",part1,part2); 
                
ShowPlayerDialog(playerid100DIALOG_STYLE_MSGBOX,"Vehicle Car System",string,"Done",""); 
            } 
           if(
listitem == 1)
           {
               
Your 2nd page here
           
}
           if(
listitem == 2)
           {
               
Your 3rd page here
           
}
        } 
    } 
Reply
#5

Quote:
Originally Posted by Ken97
Посмотреть сообщение
PHP код:
if(dialogid == 100
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                new 
part1[] = "\n/car - Info about your vehicle\n/cars - Statistics about the server vehicles\n/buycar\t\t- Buy a vehicle\n/sellcar - to sell your vehicle\n/callcar - call your vehicle"
                new 
part2[] = "\n/watch[car/off] - to spectate your vehicle\n/[Un]lock - To lock/unlock your vehicle\n/resetcar - to reset your vehicle to the parked position\n/eject[all] - To eject a player from your vehicle"
                new 
string[400]; //128 is way to small (part2 = nearly 200) 
                
format(stringsizeof(string),"%s %s",part1,part2); 
                
ShowPlayerDialog(playerid100DIALOG_STYLE_MSGBOX,"Vehicle Car System",string,"Done",""); 
            } 
           if(
listitem == 1)
           {
               
Your 2nd page here
           
}
           if(
listitem == 2)
           {
               
Your 3rd page here
           
}
        } 
    } 
Thanks for quick respone, anyway this does not doing anything after i press on the Page number at dialog.
Reply
#6

Make sure the dialog id should not be the same with other id's, and try to return 0 in every OnDialogResponse callback, in your filterscripts
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)