23.09.2012, 14:27
For some reason, when I click an option in a list dialog, nothing appears on the screen. I've been looking through the code, but I can't spot where I made the mistake, it's almost identical to the wiki one.
P.S - The forums ruin the indentation a bit.
Код:
#define TRUCK_FIRST_DIALOG 12900 ShowPlayerDialog(playerid, TRUCK_FIRST_DIALOG, DIALOG_STYLE_LIST, "Trucking missions", "Select a random route\nSelect your own trucking route", "OK", "Exit");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == TRUCK_FIRST_DIALOG) { if(response) { if(listitem == 0) { SendClientMessage(playerid, RED, "The option is currently disabled. We apologize for any inconvenience caused."); } if(listitem == 1) { if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == 435) // Refrigerated Trailer { ShowPlayerDialog(playerid, NORMAL_ROUTE_GOODS, DIALOG_STYLE_LIST, "Choose goods to carry", "Electricals\nTyres\nGroceries\nFrozen food\nMeat\nSausages\nDrinks\nFurniture\nOffice Equipment", "OK", "Exit"); } if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == 450) // Coal Trailer { ShowPlayerDialog(playerid, COAL_ROUTE_GOODS, DIALOG_STYLE_LIST, "Choose goods to carry", "Coal\nGravel", "OK", "Exit"); } if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == 584) // Petrol Trailer { ShowPlayerDialog(playerid, TANKER_ROUTE_GOODS, DIALOG_STYLE_LIST, "Choose goods to carry", "Petrol\nDiesel", "OK", "Exit"); } } } return 1; } return 0; }