Dialog not displaying
#1

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.

Код:
#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;
}
P.S - The forums ruin the indentation a bit.
Reply


Messages In This Thread
Dialog not displaying - by HighFlyer - 23.09.2012, 14:27
Re: Dialog not displaying - by AtItsMax - 23.09.2012, 14:30
Re: Dialog not displaying - by HighFlyer - 23.09.2012, 14:33
Re: Dialog not displaying - by HighFlyer - 23.09.2012, 17:57
Re: Dialog not displaying - by Gangster-rocks - 23.09.2012, 18:20

Forum Jump:


Users browsing this thread: 1 Guest(s)