21.03.2016, 12:33
Quote:
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"); } |
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.