Checking if a menu is open
Hey everyone,
Does anyone know if there is anything to check if a player is in a menu? Whether it's amxmodmenu, a game menu, or any other menu from other plugins.. Is there a way to check if a menu is open and displayed to a player? |
Re: Checking if a menu is open
|
Re: Checking if a menu is open
Make a global bool "g_MenuActive[33];" then after menu_display put "g_MenuActive[id] = true", don't forget to put "g_MenuActive[id] = false" on Ham_Spawn and after menu is closed (menu_destroy). This can be used only when menu comes from that plugin.
So if you want to check you'd do PHP Code:
|
Re: Checking if a menu is open
Quote:
Also resetting on spawn is wrong, you should reset as soon as the menu is closed. |
Re: Checking if a menu is open
Quote:
|
Re: Checking if a menu is open
Quote:
|
Re: Checking if a menu is open
Quote:
|
Re: Checking if a menu is open
player_menu_info did the trick. I was trying get_user_menu and for some reason it wasn't working. It wasn't detecting the menus properly, not sure why.
Thank you OciXCrom. The only thing that player_menu_info didnt detect was the menu from the radio commands. Any idea how to catch that? Quote:
|
Re: Checking if a menu is open
I'm pretty sure that's client side and can't be detected. What are you trying to do exactly?
|
Re: Checking if a menu is open
Quote:
Quote:
|
| All times are GMT -4. The time now is 20:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.