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

Player's Currently Viewed Menu Handle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-30-2013 , 22:22   Player's Currently Viewed Menu Handle
Reply With Quote #1

Hi All,

I am trying to get the handle of a menu that a player is currently viewing. The only thing I found is GetClientMenu but it does not return the menu handle. Is there a method to do this that I am not finding?

I would rather not cache the menu handle when showing the menu, but if that is the only option, then I guess I have no other choice...

Thanks.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 03-30-2013 , 22:40   Re: Player's Currently Viewed Menu Handle
Reply With Quote #2

I don't think there is (or will be) a function for this.

Yours sincerely
Impact
__________________
Impact123 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-31-2013 , 17:15   Re: Player's Currently Viewed Menu Handle
Reply With Quote #3

Quote:
Originally Posted by Emp` View Post
Hi All,

I am trying to get the handle of a menu that a player is currently viewing. The only thing I found is GetClientMenu but it does not return the menu handle. Is there a method to do this that I am not finding?

I would rather not cache the menu handle when showing the menu, but if that is the only option, then I guess I have no other choice...

Thanks.
What's the use case for this?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-31-2013 , 18:00   Re: Player's Currently Viewed Menu Handle
Reply With Quote #4

Quote:
Originally Posted by Powerlord View Post
What's the use case for this?
I'm using it for menu filtering. I have a menu with many options and I hook when you say something to filter out any menu item that does not contain what was said in both the item name and data.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
sdz
Senior Member
Join Date: Feb 2012
Old 03-31-2013 , 18:48   Re: Player's Currently Viewed Menu Handle
Reply With Quote #5

You could use global variables..

PHP Code:
#include <SourceMod>

static String:CurrentMenu;


//////////////////////////////////////
////When client opens a menu/////
//////////////////////////////////////
CurrentMenu[Client] = "Insert Text"
Then do whatever you want to Print CurrentMenu of your Menu/Command Target.
sdz is offline
Reply


Thread Tools
Display Modes

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:42.


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