Raised This Month: $32 Target: $400
 8% 

Get menu close


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 07-01-2006 , 20:05   Get menu close
Reply With Quote #1

How can i check if a manu was closed?

Should work on all menus like main, bans, kick, slay/slap etc...
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-01-2006 , 22:59   Re: Get menu close
Reply With Quote #2

what are you trying to do? Make a message pop-up when a menu closes?
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-01-2006 , 23:24   Re: Get menu close
Reply With Quote #3

I wouldn't know the direct way of doing it, but heres how I would do it if all else fails. I would create a variable that is set to 1 when a menu is open, and have that variable on all menus, and when the menu shuts, switch that 1 to a 0. If the variable is at 0, then all menus are shut... Meh, =)
TheNewt is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-01-2006 , 23:33   Re: Get menu close
Reply With Quote #4

That is one way mystic but that would be pointless lol, to do anything upon the close of a menu you would have exec another func, before the menu closes EX:

when i choose to kick player BLAH, you would have to put in the source code for that menu that after kicking him and closing the menu to set_task(0.2, "FUNC_NAME").

that would start doing w/e you want to do when the menu closes, but to set a variable wouldnt do much to exec a function
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-01-2006 , 23:49   Re: Get menu close
Reply With Quote #5

I didn't say it was the best way, haha.
TheNewt is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-02-2006 , 10:36   Re: Get menu close
Reply With Quote #6

Quote:
Originally Posted by Rolnaaba
That is one way mystic but that would be pointless lol, to do anything upon the close of a menu you would have exec another func, before the menu closes EX:

when i choose to kick player BLAH, you would have to put in the source code for that menu that after kicking him and closing the menu to set_task(0.2, "FUNC_NAME").

that would start doing w/e you want to do when the menu closes, but to set a variable wouldnt do much to exec a function
That's retarded.

You'll have to hook every function that is the handle for each menu.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
VEN
Veteran Member
Join Date: Jan 2005
Old 07-02-2006 , 11:30   Re: Get menu close
Reply With Quote #7

Do you want to catch the menu close moment? Is this for any menu?
If just check for menu needed this can be used
PHP Code:
/* Gets what menu the player is watching and what keys for menu he have.
* When there is no menu the index is 0. If the id is negative then the menu
* is VGUI in other case the id is from register_menuid() function. */
native get_user_menu(index,&id,&keys); 
You can loop this to catch menu close event, not a good way but then you do not have to register every menu.

Last edited by VEN; 07-02-2006 at 11:38.
VEN is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 07-02-2006 , 15:46   Re: Get menu close
Reply With Quote #8

Thanks VEN.

Im going to make a menu que system, that will wait untill the curent menu is closed before it displays the new one....
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:25.


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