Menu bug
#1

I don't understand, what the problem with this. When I open a menu using command, the gamemode open other menu.

Code:
Код:
    DestroyMenuEx(Wait);
		Wait = CreateMenu("Gas",2,30.0,140.0,220.0,0.0);
		if(IsValidMenu(Wait)){
		  new string[128];
		  SetMenuColumnHeader(Wait,0,"Combustible");
		  SetMenuColumnHeader(Wait,1,"Price");
	 	  AddMenuItem(Abastecendo,0,"Gasoline");
			format(string,sizeof(string),"$%d",ValuerGasoline);
	 	  AddMenuItem(Wait,1,string);
	 	  AddMenuItem(Wait,0,"Gasoline Podium");
	 	  	format(string,sizeof(string),"$%d",ValuerPodium);
	 	  AddMenuItem(Wait,1,string);
	 	  AddMenuItem(Wait,0,"Diesel");
	 	 	format(string,sizeof(string),"$%d",ValuerDiesel);
	 	  AddMenuItem(Wait,1,string);
	 	  AddMenuItem(Wait,0,"Alcohol");
	 		format(string,sizeof(string),"$%d",ValuerAlcohol);
	 	  AddMenuItem(Wait,1,string);
		}
		ShowMenuForPlayer(Wait,playerid);
		SetPlayerControl(playerid,0);
		return 1;
	}
In start script exist: New Menu:Wait.

Thanks

Reply
#2

Show your IsValidMenu and DestroyMenuEx
Reply
#3

IsValidMenu is a native of sa-mp.

Код:
stock DestroyMenuEx(Menu:mid)
{
	for(new i = 0; i < 50; i++)
	{
	  if(GetPlayerMenu(i) == mid)
	  {
	    HideMenuForPlayer(mid, i);
	    SetPlayerControl(i, true);
	  }
	}
	DestroyMenu(mid);
}
In others menus it work. Maybe strings?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)