Raised This Month: $ Target: $400
 0% 

How to make a back and next option on a menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 13:17   How to make a back and next option on a menu
Reply With Quote #1

How would I make a back and next option if i run out of room on the first page of the menu? Would it be its own case like..

PHP Code:
case 9:
{
     
CmdNextMenuid )

or

PHP Code:
case 9:
{
     
CmdBackMenuid )

or are there certain props to use?
Thanks to anyone who helps.
__________________
Hi.
Kreation is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 02-06-2010 , 13:39   Re: How to make a back and next option on a menu
Reply With Quote #2

PHP Code:
Kick Player

$players
(1,8, %n. %v//Players will shown in buttons 1,2,3,4,5,6,7 and 8.
//%n represents the key pressed, and %v the player

$next(9,9Next//Button 9 will contain the "Next"

$exitorback(0,0. Exit,0. Back//Button 0 will contain exit or back. 
This i took from Menu Creator (amxx studio)
Mxnn is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-06-2010 , 13:59   Re: How to make a back and next option on a menu
Reply With Quote #3

Quote:
Originally Posted by Kreation View Post
How would I make a back and next option if i run out of room on the first page of the menu? Would it be its own case like..

PHP Code:
case 9:
{
     
CmdNextMenuid )

or

PHP Code:
case 9:
{
     
CmdBackMenuid )

or are there certain props to use?
Thanks to anyone who helps.
Make a sub-menu and name it next. Yes, it needs to be its own case.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 15:52   Re: How to make a back and next option on a menu
Reply With Quote #4

I found that you can use menu_setprop( menu, MPROP_NEXTNAME, "Next" )..
but what about the rest of the cases which go to the next page? Do I continue putting the cases under the menu_setprop, or above. For example.

PHP Code:
menu_additemmenu"Option 1""1")
menu_additemmenu"Option 2""2")
menu_setpropmenuMPROP_NEXTNAME"Next" )
menu_additemmenu"Option 3""3"
Would it be like that? or -- >

PHP Code:
menu_additemmenu"Option 1""1")
menu_additemmenu"Option 2""2")
menu_additemmenu"Option 3""3")
menu_setpropmenuMPROP_NEXTNAME"Next" 
And add all of the items above the prop..
Any help appreciated.
__________________
Hi.
Kreation is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-06-2010 , 16:00   Re: How to make a back and next option on a menu
Reply With Quote #5

nvm
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 02-06-2010 at 16:04.
wrecked_ is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 16:02   Re: How to make a back and next option on a menu
Reply With Quote #6

Ahh I didn't pay much attention to the 0, I'll do that now.. Thanks.
__________________
Hi.
Kreation is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-06-2010 , 16:04   Re: How to make a back and next option on a menu
Reply With Quote #7

Completely disregard my last post, the last parameter in additem is the admin level needed to access it. I'll search in amxconst.inc, hold up.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-06-2010 , 16:09   Re: How to make a back and next option on a menu
Reply With Quote #8

PHP Code:
#define MEXIT_ALL      1    /* Menu will have an exit option (default)*/
#define MEXIT_NEVER  -1      /* Menu will not have an exit option */

#define MPROP_PERPAGE   1    /* Number of items per page (param1 = number, 0=no paginating, 7=default) */
#define MPROP_BACKNAME  2  /* Name of the back button (param1 = string) */
#define MPROP_NEXTNAME  3  /* Name of the next button (param1 = string) */
#define MPROP_EXITNAME  4  /* Name of the exit button (param1 = string) */
#define MPROP_TITLE  5        /* Menu title text (param1 = string) */
#define MPROP_EXIT    6  /* Exit functionality (param1 = number, see MEXIT constants) */
#define MPROP_NOCOLORS  8  /* Sets whether colors are not auto (param1 = number, 0=default) */
#define MPROP_NUMBER_COLOR  10    /* Color indicator to use for numbers (param1 = string, "\r"=default) */ 
There are the defines and comment parameters on the different setprops. I think it might make the next page on its own, not too sure though. Never had a menu with that many needed items.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 16:16   Re: How to make a back and next option on a menu
Reply With Quote #9

Well, I am about to test it with 12 items. So we'll see if it makes the second page on its own.
__________________
Hi.
Kreation is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 16:52   Re: How to make a back and next option on a menu
Reply With Quote #10

Okay so I haven't got to see if it makes its own next page because when I type /shop it doesn't show up at all. Any ideas to why the menu wouldn't show up?
__________________
Hi.
Kreation 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 07:22.


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