Is it possible to add a special menu id or something, so later I could destroy and hide it with this command?
PHP Code:
show_menu(id, 0, "^n", 1);
Or maybe it's possible to check if menu is displayed?
I have this menu:
PHP Code:
new newmenu[64], choise_1[64], choise_2[64], choise_3[64]
format(newmenu, 64, "%L", id, "NEW_MENU");
g_iMenu = menu_create(newmenu, "Pressedrod");
format(choise_1, 64, "%L", id, "MENU_CHOISE_1");
menu_additem(g_iMenu, choise_1, "1", 0);
format(choise_2, 64, "%L", id, "MENU_CHOISE_2");
menu_additem(g_iMenu, choise_2, "2", 0);
And I want to destroy and hide it on player death
PHP Code:
RegisterHam(Ham_Killed, "player", "PlayerDies", 1)
/***/
public PlayerDies(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
show_menu(id, 0, "^n", 1);
}
}
The problem is that show_menu(id, 0, "^n", 1); destoys all menus...