Raised This Month: $ Target: $400
 0% 

Menu Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-01-2014 , 19:26   Re: Menu Question
Reply With Quote #1

cool
Backstabnoob is offline
pob18
Member
Join Date: Jun 2014
Old 07-02-2014 , 05:30   Re: Menu Question
Reply With Quote #2

What to do, if my menu contain 9 active options and I don't want to have that previous/next functions?
pob18 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-02-2014 , 18:26   Re: Menu Question
Reply With Quote #3

Quote:
Originally Posted by pob18 View Post
What to do, if my menu contain 9 active options and I don't want to have that previous/next functions?
Set MPROP_PERPAGE to 9. I've never tried it but you certainly can.
__________________
fysiks is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-02-2014 , 18:56   Re: Menu Question
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Set MPROP_PERPAGE to 9. I've never tried it but you certainly can.
I tried that yesterday and got an error log almost 1mb size. Said something like "can't paginate that number of items"
NikKOo31 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-02-2014 , 19:02   Re: Menu Question
Reply With Quote #5

perpage to 0, add a custom exit or use old style menus.
__________________
Black Rose is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-02-2014 , 19:40   Re: Menu Question
Reply With Quote #6

Something like this would work, I guess

PHP Code:
public make_menu(id)
{
    new 
num[3], menu menu_create("\rMy menu\w""menu_handler")
    for(new 
09i++)
    {
        if(
sizeof my_items)
        {
            
num_to_str(inum2)
            
menu_additem(menumy_items[i], num0)
        }
        else
            
menu_addblank(menu)
    }
    
menu_additem(menu"\rClose this menu pls""9"0)
    
menu_setprop(menuMPROP_PERPAGE0)
    
menu_display(idmenu0)
    return 
PLUGIN_CONTINUE

NikKOo31 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-02-2014 , 19:51   Re: Menu Question
Reply With Quote #7

No it wouldn't. You cannot use menu_addblank multiple times in a row, like I said use ^n in the previous menu item to add a blank instead.
Backstabnoob is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-02-2014 , 20:13   Re: Menu Question
Reply With Quote #8

Actually, it worked



I though the exit key will be in key 9 but it's in the 0 as you can see ^_^
Cheers

Edit: "Salir" means "Exit"
Attached Images
File Type: jpg 2014-07-02_00001.jpg (83.0 KB, 223 views)

Last edited by NikKOo31; 07-02-2014 at 20:15.
NikKOo31 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-02-2014 , 20:53   Re: Menu Question
Reply With Quote #9

Then you either used menu_addblank only once or you have errors in your logs.
Backstabnoob is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-02-2014 , 21:12   Re: Menu Question
Reply With Quote #10

@Backstabnoob, I have 7 items in the menu. 0 <= i <= 6 my items, 7 <= i <=8 blanks, i == 9 exit option. I used the code I posted, just added format, no error logs :B

Try it yourself...
NikKOo31 is offline
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 21:08.


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