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

Get menu page


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-29-2011 , 00:12   Get menu page
Reply With Quote #1

Is there some way I can get the page number of a menu which the player is viewing?

Also on this topic, how can I remove a menu from a player's screen without the player having to do anything?

Thanks!
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
delayedCoder
Junior Member
Join Date: Jul 2011
Location: under binary
Old 07-29-2011 , 02:18   Re: Get menu page
Reply With Quote #2

A quick way to exit the menu without the client doing anything physically would be:

Code:
client_cmd(id, "slot10");

As for hooking the page, i'm testing it, hold on.
delayedCoder is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-29-2011 , 02:18   Re: Get menu page
Reply With Quote #3

If you are using the "new menus" then you can read the newmenus.inc to see what function you can use to get the page they are viewing.

For removing the menu from the screen, see the "Notes" section of the New Menus Tutorial. Also, you may need to use menu_cancel() first.

Quote:
Originally Posted by delayedCoder View Post
A quick way to exit the menu without the client doing anything physically would be:

Code:
client_cmd(id, "slot10");
This is not a good way to do it.
__________________
fysiks is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-31-2011 , 11:20   Re: Get menu page
Reply With Quote #4

Quote:
Originally Posted by delayedCoder View Post
A quick way to exit the menu without the client doing anything physically would be:

Code:
client_cmd(id, "slot10");
Unfortunately that didn't work, even after using menu_cancel().
Is there another way?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-31-2011 , 12:32   Re: Get menu page
Reply With Quote #5

If you followed fysiks post you would have found the right way.

http://forums.alliedmods.net/showthr...46364#EndNotes
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
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 04:51.


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