06.03.2009, 17:52
new Menu:MENUVARIABLE;// this is the variable that will hold the menu for further use;
on a callback or function, sample ongamemodeinit, add the following
public OnGameModeInit()
{
// (title) (amount collumns) (coordinates and width + height)
MENUVARIABLE = CreateMenu("THE MENU TITLE", 1, 55.0, 200.0, 300.0, 240.0);
//(targetmenu) (collumn where it should be placed)(default = 0 (item text)
AddMenuItem(MENUVARIABLE, 0, "Itemsnumber 1");
AddMenuItem(MENUVARIABLE, 0, "Exit menu");
}
//to show it, simply
ShowMenuForPlayer(MENUVARIABLE,playerid);
on a callback or function, sample ongamemodeinit, add the following
public OnGameModeInit()
{
// (title) (amount collumns) (coordinates and width + height)
MENUVARIABLE = CreateMenu("THE MENU TITLE", 1, 55.0, 200.0, 300.0, 240.0);
//(targetmenu) (collumn where it should be placed)(default = 0 (item text)
AddMenuItem(MENUVARIABLE, 0, "Itemsnumber 1");
AddMenuItem(MENUVARIABLE, 0, "Exit menu");
}
//to show it, simply
ShowMenuForPlayer(MENUVARIABLE,playerid);