AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   (OLD) Bug Reports (https://forums.alliedmods.net/forumdisplay.php?f=24)
-   -   [BUG] player_menu_info always returns 1 on listenserver (https://forums.alliedmods.net/showthread.php?t=50223)

Geesu 01-21-2007 22:24

[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

BAILOPAN 01-21-2007 22:40

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.

Geesu 01-22-2007 00:48

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?

KWo 01-22-2007 02:41

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.

Geesu 01-22-2007 16:02

Re: [BUG] player_menu_info always returns 1 on listenserver
 
I just made an entry here to help people:

http://www.amxmodx.org/funcwiki.php?...info&go=search


All times are GMT -4. The time now is 01:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.