[BUG] player_menu_info always returns 1 on listenserver
Basically as the title says... Try doing this after joining a team:
new menuUp = player_menu_info( id, menu_id, keys ); Printing the values shows something such as: menuUp: 1 menu_id: -26 keys: -1 So i'm basically checking for a positive menu_id as well, but I believe this is still a bug worth reporting. TY, Josh |
Re: [BUG] player_menu_info always returns 1 on listenserver
I can't decide whether to classify this as a bug. A negative menuid means a VGUI message was sent. It's too bad though that those have no explicit time-out so there's no way to explicitly unset the value.
However, the documentation explicitly says the value will be >0 AND it the intent was for it to be only for plugin-level menus. |
Re: [BUG] player_menu_info always returns 1 on listenserver
I understand what you're saying... So is there no possible way to determine when a VGUI menu has closed? Then specify a timeout similar to non-VGUI's?
|
Re: [BUG] player_menu_info always returns 1 on listenserver
If I remember good - menuid "-26" and "-27" it was either team selection or skin menu opened. It was the same problem with get_user_menu function I was using since 2 years (it was the first time I tried to figure out the problem with overwritting menus of one plugin by other plugins). Finally I'm using in the code the check if that menuid is grater than 0 - that means some hud menu is displayed. If it's negative or 0 - I'm overwritng it. If I remember good those days Bail told me something about hardiness with hooking if the VGUI menu is already closed by the user - that's why You still have that menuid returned by these functions (get_user_menu and player_menu_info) instead cleared up to 0.
|
Re: [BUG] player_menu_info always returns 1 on listenserver
|
All times are GMT -4. The time now is 01:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.