#1

Hi guys.
I made some dialogs for my server (list items) - 2 dialogs. But when I select a item from the second, I get the items from the first. I used if(dialogid == 1) and if(dialogid == 2)
How can I make that each of them will have different items?
Reply
#2

When you make a dialog something like this

ShowPlayerDialog(playerid, ID YOU USE FOR THE DIALOG ,DIALOG_STYLE_INPUT,"Title:","Content","Option 1","Option 2");

now you use this

if(dialogid == ID YOU USE FOR DIALOG) //----> The id of the dialog like 1, 2, 3, 4...
{
if(response == 1) // ----> The First Option
{
..................
return 1;
}
else // ------> The Second Option
{
....................
}
return 1;
}
Reply
#3

The first list item is ID 0

Example:
Код:
#define Car 0
ShowPlayerDialog(playerid,Cars,DIALOG_STYLE_LIST,"Choose your Car","Bullet\r\nTurismo\r\nSuper GT","Accept","Cancel");
Dialog response:

Код:
	if(dialogid == Cars)
	{
	    if(response)
	    {
	        if(listitem == 0)
	        {
	            Bullet
	        }
	        if(listitem == 1)
	        {
	            Turismo
	        }
	        if(listitem == 2)
	        {
	            Super GT
	        }
	    }
	}
Reply
#4

No.. . I know it. I'm asking how to make items for the second dialog.
Reply
#5

If you know that, then make sure your ShowPlayerDialog doesn't have the same dialogid as the other one.
Reply
#6

use a string and format(..) it ...
Reply
#7

what??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)