Raised This Month: $ Target: $400
 0% 

menu_addblank with following lines


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schwabba
Senior Member
Join Date: Apr 2008
Old 11-07-2010 , 02:54   menu_addblank with following lines
Reply With Quote #1

Hi,

when i use this code:

PHP Code:
        menu_additem(menu"item1""1"0);
        
menu_additem(menu"item2""2"0);
        
menu_addblank(menu1)
        
menu_addblank(menu1)
        
menu_additem(menu"item3""3"0); 
then i get a menu looks like this:

PHP Code:
1. item1
2. item2


5. item3 
and thats what i want it look like, but then when i have this handler:

PHP Code:
switch(key)
        case 
1:
        {
                
//do something
        
}
        case 
2:
        {
                
//do something
        
}
        case 
3:
        {
                
//do something
        
}

then case 3 dont works, i changed it to case 5 too and it was'nt working, but why?

Last edited by Schwabba; 11-07-2010 at 02:57.
Schwabba is offline
GuessWhat
Junior Member
Join Date: Oct 2010
Old 11-07-2010 , 03:00   Re: menu_addblank with following lines
Reply With Quote #2

i suppose key is Data to num which is the info, it should work just show the entire code
GuessWhat is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 11-07-2010 , 04:07   Re: menu_addblank with following lines
Reply With Quote #3

You can simply add blanks like this:
Code:
menu_additem(menu, "item2 ^n^n", "2", 0);
Or you can add blanks using the original native but u need to use it like this
Code:
menu_addblank(menu, 0)
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
issen1
Member
Join Date: Jan 2010
Old 11-07-2010 , 04:08   Re: menu_addblank with following lines
Reply With Quote #4

Look here: http://forums.alliedmods.net/showthread.php?t=140318

You have to use the old style menu interface to accomplish this.

Edit: If you don't want to increase the item counter, then abdul-rehman's code might work.
__________________
greets (:

Last edited by issen1; 11-07-2010 at 04:11.
issen1 is offline
Old 11-07-2010, 04:10
abdul-rehman
This message has been deleted by abdul-rehman. Reason: NVM
Schwabba
Senior Member
Join Date: Apr 2008
Old 11-07-2010 , 06:21   Re: menu_addblank with following lines
Reply With Quote #5

I used the old style menu now, it might happen that someone missclicks now, because the items are changing, but ok.
Schwabba 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 03:48.


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