Dynamic Dialogboxes
#4

Quote:
Originally Posted by Markus_Whiteus
Посмотреть сообщение
Don't think you understood, I'll try and be more clear the way I have it set is a user will type /vbuy this will then show a dialogbox(list style) of all the categories and then lets say they press Bikes shows another Dialogbox(list tab style) of all the Vehicles in my dealership table with the catagory for bike e.g
Код:
case dialogThreadCarDealer:
		{
			if(!response)
			{
				return 0;
			}
			switch(listitem)
			{
				case 0:
				{
					new string[525], next[255];
					for(new i=0; i<MAX_DEALERSHIPVEHICLES; i++)
					{
						if(Dealer[i][Cat] == 1)
						{
							format(next, sizeof(next),"%s\t$%d\n",Dealer[i][Name],Dealer[i][Price]);
							strcat(string, next, sizeof(string));
						}
					}
					ShowPlayerDialog(playerid, dialogThreadBikes, DIALOG_STYLE_TABLIST, "Vehicle Dealership - Bikes",string, "Purchase", "Back");
				}
As you can see this will now load the vehicles I have set what I am wondering is how to do the next step dymically make a case for each vehicle depending on how many vehicles it loaded
You have to use the switch function again.

PHP код:
switch(Dealer[i][carid]) // idk wth is Cat but there should be vehicle ID for each vehicle
{
case 
i:
// format and strcat shit (loading each vehicle)
case MAX_DEALERSHIPVEHICLES:
return 
0;
}
// you can use your dialog function here. 
If you try to do this way, you'll get it done I hope. Because what you need is load each vehicles in a category on a dialog.
Reply


Messages In This Thread
Dynamic Dialogboxes - by Markus_Whiteus - 21.03.2016, 11:54
Re: Dynamic Dialogboxes - by WhoIsYourDaddy - 21.03.2016, 12:19
Re: Dynamic Dialogboxes - by Markus_Whiteus - 21.03.2016, 12:26
Re: Dynamic Dialogboxes - by WhoIsYourDaddy - 21.03.2016, 12:33

Forum Jump:


Users browsing this thread: 1 Guest(s)