Problems with CreateMenu - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problems with CreateMenu (
/showthread.php?tid=174870)
Problems with CreateMenu -
Ash. - 07.09.2010
Hi all,
Im having a few problems with CreateMenu.
pawn Код:
new Menu:SysMenu; //Top of the script
//In OnFilterScriptInit
SysMenu = CreateMenu("Functions", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(SysMenu, 1, "Open Gate");
AddMenuItem(SysMenu, 1, "Teleport to Base");
AddMenuItem(SysMenu, 1, "Repair Vehicle");
AddMenuItem(SysMenu, 1, "Show Company Colours");
//In OnPlayerCommandText
ShowMenuForPlayer(BlackMenu, playerid);
(Sorry about the indentation, it died in transit xD)
The menu shows, with the title, but with no menu items.
I cannot see what i have done wrong. - I have tried the wiki and that shows me that the above is correct.
Your help is appreciated.
Thanks
Ash
Re: Problems with CreateMenu -
Ash. - 07.09.2010
Bump, can anyone help?
Ive also tried fiddling with the AddMenuItem thing and tried column 2, (and allowed 2 columns in CreateMenu) - this still didnt work
Re: Problems with CreateMenu -
sabretur - 16.03.2011
pawn Код:
new Menu:SysMenu; //Top of the script
//In OnFilterScriptInit
SysMenu = CreateMenu("Functions", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(SysMenu, 0, "Open Gate");
AddMenuItem(SysMenu, 0, "Teleport to Base");
AddMenuItem(SysMenu, 0, "Repair Vehicle");
AddMenuItem(SysMenu, 0, "Show Company Colours");
//In OnPlayerCommandText
ShowMenuForPlayer(BlackMenu, playerid);]