Raised This Month: $51 Target: $400
 12% 

Change button number in menu.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vliket
Junior Member
Join Date: Feb 2017
Old 02-26-2017 , 10:13   Change button number in menu.
Reply With Quote #1

Hello, i have problem on my server, i have Vip menu but when i want to Exit menu that button is on number 9 but i wants to have it on 0 can someone help me how to fix it in this .sma file?
Thanks

Download .sma : http://leteckaposta.cz/599771114
Vliket is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 10:46   Re: Change button number in menu.
Reply With Quote #2

Remove the blank slots.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-26-2017 , 11:11   Re: Change button number in menu.
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Remove the blank slots.
But then he loses the menu appearance with the blanks which I imagine was done so intentionally.

You can fix this by adding an additional blank with the second param set to 1. This function was missing closing brackets so I added these to make it compile. See the highlighted line that was added.
Code:
public cmd_menu(id) {     if(get_pcvar_num(onoffmenu))     {         if(is_user_alive(id))         {             static item[64]                         new menu = menu_create("\yVIP MENU \d(/vipmenu) ^n\dVyber si zbran zadarmo", "menu_handler")                         menu_additem(menu, "M4A1 + Deagle \y[VIP]", "1", 0)             menu_additem(menu, "AK47 + Deagle \y[VIP]", "2", 0)                menu_additem(menu, "AWP + Deagle \y[VIP]", "3", 0)                menu_addblank(menu, 0)              menu_additem(menu, "\yVIP Nastavenia", "4", 0)                menu_additem(menu, "\yZobrazit vyhody", "5", 0)                menu_addblank(menu, 0)                        if ( Menu[ id ] )             {                 menu_additem(menu, "Zobrazovanie menu na zaciatku kola [\yZAPNUTE\w]", "6", 0)             }             else             {                 menu_additem(menu, "Zobrazovanie menu na zaciatku kola [\rVYPNUTE\w]", "6", 0)             }
            menu_addblank(menu, 1) 
            menu_setprop(menu, MPROP_EXITNAME, "Zavriet")             menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)             menu_setprop(menu, MPROP_NUMBER_COLOR, "\r" )                         menu_display(id, menu, 0)         }     } }
__________________

Last edited by Bugsy; 02-26-2017 at 11:18.
Bugsy is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-26-2017 , 11:29   Re: Change button number in menu.
Reply With Quote #4

why not ^n ?
__________________
JusTGo is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-26-2017 , 11:39   Re: Change button number in menu.
Reply With Quote #5

Quote:
Originally Posted by JusTGo View Post
why not ^n ?
No.
__________________
edon1337 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 19:11.


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