Dialog system not working properly [+REP for help]
#1

Hello folks
I've came across this problem with my locker system.

I made the command to enter the dialog system from the locker but as soon as I want to enter a sub-category of it, it stops doing what it should do.

This is the command:
Код:
if(strcmp(cmdtext, "/locker", true) == 0)
The dialog that should open at first with all the sub-categories is working.

The sub-categories are under
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
And here is where it goes wrong. Sub-categories underneath the public don't open and don't show in game.

This is the code for the first dialog:
Код:
if(dialogid == DIALOG_LOCKER)
 	{
  		if(response)
		{
			switch(listitem)
  			{
	              case 0: // If Utility Belt
	              {
	                ShowPlayerDialog(playerid, DIALOG_LUBELT, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Baton \nDesert Eagle \nPepperspray \nBack", "Select", "Exit");
	              }
	              case 1: // If Rifles
	              {
	                ShowPlayerDialog(playerid, DIALOG_LHEAVY, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Shotgun \nBack", "Select", "Exit");
	              }
	              case 2: // If Melee Weapons
	              {
                    ShowPlayerDialog(playerid, DIALOG_LMELEE, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Baton \nPepperspray \nBack", "Select", "Exit");
	              }
	              case 3: // If Camera
	              {
                    GivePlayerWeapon(playerid, 43, 100); // Gives Camera with 100 shots
					ShowPlayerDialog(playerid, DIALOG_LOCKER, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Utility belt \nRifles \nMelee weapons \nCamera \nFirst Aid Kit \nArmour", "Select", "Exit");
	              }
	              case 4: // If First Aid Kit
	              {
                    SetPlayerHealth(playerid, 100); //100% health
					ShowPlayerDialog(playerid, DIALOG_LOCKER, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Utility belt \nRifles \nMelee weapons \nCamera \nFirst Aid Kit \nArmour", "Select", "Exit");
	              }
	              case 5: // If Armour
	              {
                    SetPlayerArmour(playerid, 50); //50% armour for normal locker
					ShowPlayerDialog(playerid, DIALOG_LOCKER, DIALOG_STYLE_LIST, "Welcome to the --- locker!", "Utility belt \nRifles \nMelee weapons \nCamera \nFirst Aid Kit \nArmour", "Select", "Exit");
	              }
	              
    		}
 		}
  	}
Help is much appreciated!
Don't pay attention to loose indentations!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)