Why not just use the quickmessage menu to open the admin menu?
Code:
execKey "8" { close quickmessage; open admin }
Then, monitor if the admin menu is open:
Code:
if( menu == "admin")
{
if(self getGuid() == 0)
{
self playLocalSound("granted");
self openMenu(game["menu_admin"]);
}
else
{
self iprintlnbold("^1Access Denied!");
self playLocalSound("denied");
}
continue;
}
Seems a lot easier than all this messing around trying to get openMenu() to work.
NB - make sure your admin.menu has the menu item name of "admin". The item script name is what the engine looks for. Not the name of the menu file.