Raised This Month: $7 Target: $400
 1% 

Simple Menu Builder


Post New Thread Reply   
 
Thread Tools Display Modes
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-18-2020 , 21:26   Re: Simple Menu Builder
Reply With Quote #171

Quote:
Originally Posted by OciXCrom View Post
Pretty sure the problem is caused by you deleting the default settings in the beginning of the file. Put them back and see if it still happens.

You can have a maximum of 20 menus by default. You can easily increase this by editing MAX_MENUS in the .sma file.

Actually, now that I think about it, exceeding the max number could cause that error. Try increasing it.

I just added them back and that is not the problem and i don't see the reason why it would be.
since i'm using the menu as you advised.

any reason why there is no cvar or config in the ini for the max menus?

i mean, you recommend no more than 20 menus for any particular performance reason or memory limit?

if i want to go nuts and add like 80 menus would it make any difference in performance?

HTML Code:
[Default Settings]
;These are the default settings for each menu created.
;You can add certain options in [Menu Settings] if you want to change them.
;Please note that every menu needs to have a different MENU_OPEN settings, therefore there's no default one.

MENU_TITLE = My Simple Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
;MENU_OPEN = say /menu, say_team /menu, amx_mymenu -- This must be set with a different value on every menu!
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_REOPEN = 0
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You have no access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND =

[New Menu = FULL ADMIN MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Admin Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminfullmenu, say_team /adminfullmenu, amx_adminfullmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Admin Menu" "say /adminmenu"
"Client Menu" "say /clientmenu"

[New Menu = ADMIN MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Admin Menu
MENU_TITLE_PAGE = 
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 0
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminmenu, say_team /adminmenu, amx_adminmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Server Menu" "say /adminservermenu"
"Buy Menu" "say /adminbuymenu"
"Money Menu" "say /adminmoneymenu"
"Map Menu" "say /adminmapmenu"
"Rank Menu" "say /adminrankmenu"
"Spectator Menu" "say /adminspectatormenu"
"Bot Menu" "say /adminbotmenu"
"Entity Menu" "say /adminentitymenu"
"Hud Menu" "say /adminhudmenu"

[New Menu = HUD MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Hud Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminhudmenu, say_team /adminhudmenu, amx_adminhudmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Hud Position" "amx_hudmenupos"
"Hud Color" amx_hudmenucolor"

[New Menu = SERVER MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Server Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminservermenu, say_team /adminservermenu, amx_adminservermenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Pause Server" "amx_pause"
"The Time" "say thetime"
"Timeleft" "say timeleft"
"Admin/Client Groups" "say /admincheckmenu"

[New Menu = BOT MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Bot Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminbotmenu, say_team /adminbotmenu, amx_adminbotmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Enable Bot Editor" "amx_spawn_editor 1"
"Disable Bot Editor" "amx_spawn_editor 0"
"Bot Editor Menu" "amx_editor_menu"
"Bot Test Menu" "amx_adminbottestmenu"

[New Menu = ENTITY MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Entity Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminentitymenu, say_team /adminentitymenu, amx_adminentitymenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Entity Editor" "brush_edit"

[New Menu = BUY MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Buy Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminbuymenu, say_team /adminbuymenu, amx_adminbuymenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Buy HealthKit" "say /buyrkit"
"Buy Bulletproof Helmet" "say /bphelmet"

[New Menu = MONEY MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Money Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminmoneymenu, say_team /adminmoneymenu, amx_adminmoneymenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Give/Request Money" "say /money"

[New Menu = MAP MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Map Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminmapmenu, say_team /adminmapmenu, amx_adminmapmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Current Map Name" "say /currentmap"
"Nextmap" "say nextmap"
"Map Lists" "say /adminmapfinder"

[New Menu = MAP LISTS]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Map Lists (For keywords use /mapfind "" in chat)
MENU_TITLE_PAGE = %newline%Page:\d 
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminmapfinder, say_team /adminmapfinder, amx_adminmapfinder
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"All Maps" "say /mapfind *"
"CS Maps" "say /mapfind CS"
"DE Maps" "say /mapfind DE"
"FY Maps" "say /mapfind FY"
"AWP Maps" "say /mapfind AWP"

[New Menu = RANK MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Rank Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminrankmenu, say_team /adminrankmenu, amx_adminrankmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Show XP & Rank" "say /xp"
"" "" "" ""
"" "" "" ""
"" "" "" ""
"" "" "" ""
"" "" "" ""
"Reset Admin Rank XP" "crxranks_reset_xp NQuarter"

[New Menu = SPECTATOR MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Spectator Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminspectatormenu, say_team /adminspectatormenu, amx_adminspectatormenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Spectator Info On/Off" "say /speclist"

[New Menu = BOT TEST MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Bot Test Menu (Use amx_botexec to run a specific command on test bot.)
MENU_TITLE_PAGE = %newline%Page:\d 
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /adminbottestmenu, say_team /adminbottestmenu, amx_adminbottestmenu
MENU_REOPEN = 1
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Add Test Bot" "amx_botadd Test"
"Delete Test Bot" "amx_botdel"
"Copy My Movements" "amx_botmove 1"
"Copy My Aim + Movements" "amx_botmove 2"
"Copy Opposite Movements" "amx_botmove 3"
"Stop Copying My Movements" "amx_botmove 0"

[New Menu = CLIENT MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Client Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientmenu, say_team /clientmenu, amx_clientmenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Server Menu" "amx_clientservermenu"
"Buy Menu" "amx_clientbuymenu"
"Money Menu" "amx_clientmoneymenu"
"Map Menu" "amx_clientmapmenu"
"Rank Menu" "amx_clientrankmenu"
"Spectator Menu" "amx_clientspectatormenu"

[New Menu = SERVER MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Server Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientservermenu, say_team /clientservermenu, amx_clientservermenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Pause Server" "amx_pause"
"The Time" "say thetime"
"Timeleft" "say timeleft"

[New Menu = BUY MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Buy Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientbuymenu, say_team /clientbuymenu, amx_clientbuymenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Buy HealthKit" "say /buyrkit"
"Buy Bulletproof Helmet" "say /bphelmet"

[New Menu = MONEY MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Money Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientmoneymenu, say_team /clientmoneymenu, amx_clientmoneymenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Give/Request Money" "say /money"

[New Menu = MAP MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Map Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientmapmenu, say_team /clientmapmenu, amx_clientmapmenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Current Map Name" "say /currentmap"
"Nextmap" "say nextmap"
"Map Lists" "say /clientmapfinder"

[New Menu = MAP LISTS]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Map Lists (For keywords use /mapfind "" in chat)
MENU_TITLE_PAGE = %newline%Page:\d 
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientmapfinder, say_team /clientmapfinder, amx_clientmapfinder
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"All Maps" "say /mapfind *"
"CS Maps" "say /mapfind CS"
"DE Maps" "say /mapfind DE"
"FY Maps" "say /mapfind FY"
"AWP Maps" "say /mapfind AWP"

[New Menu = RANK MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Rank Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientrankmenu, say_team /clientrankmenu, amx_clientrankmenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Show XP & Rank" "say /xp"

[New Menu = SPECTATOR MENU]

[Menu Settings]
;<settings> = <value>

MENU_TITLE = Spectator Menu
MENU_TITLE_PAGE = %newline%Page:\d
MENU_BACK = \yPrevious Page
MENU_NEXT = \yNext Page
MENU_EXIT = \rClose
MENU_FLAG = 0
MENU_TEAM = 0
MENU_ALIVEONLY = 0
MENU_ITEMS_PER_PAGE = 7
MENU_ITEM_FORMAT = %item%
MENU_PREFIX = !g[Simple Menu]!n
MENU_NOACCESS = You don't access to this menu.
MENU_NOTEAM = Your team isn't allowed to use this menu.
MENU_ALIVE = You need to be alive to use this menu.
MENU_DEAD = You need to be dead to use this menu.
MENU_SOUND = 
MENU_OPEN = say /clientspectatormenu, say_team /clientspectatormenu, amx_clientspectatormenu
MENU_REOPEN = 0
MENU_ALIVE = 0

[Menu Items]
;<Item Name> <Command> [Flag] [Team]
"Spectator Info On/Off" "say /speclist"
Ark_Procession is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 12-19-2020 , 07:27   Re: Simple Menu Builder
Reply With Quote #172

[SUGGESTION] Play sound when players don't have access required.

Code:
MENU_NOACCESS_SOUND =
Snake. is offline
Send a message via Skype™ to Snake.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-19-2020 , 07:42   Re: Simple Menu Builder
Reply With Quote #173

Quote:
I just added them back and that is not the problem and i don't see the reason why it would be.
since i'm using the menu as you advised.
Yup, just checked the code and there will be no problem caused if there are no default options.

Quote:
any reason why there is no cvar or config in the ini for the max menus?

i mean, you recommend no more than 20 menus for any particular performance reason or memory limit?

if i want to go nuts and add like 80 menus would it make any difference in performance?
The only reason is that the method I used to make the plugin requires it. I put 20 because I didn't expect anyone to ever use more than that and to avoid unused arrays for most people.

But yes, the error is indeed caused by you exceeding the number. The plugin is trying to access an invalid menu index, thus outputing "out of bounds" error.

You don't need to worry about any issues if you go nuts with it. The access to each menu is instant and isn't affected by how many there are. Heck, you can even use 1000 if you want.

Quote:
Originally Posted by Snake. View Post
[SUGGESTION] Play sound when players don't have access required.

Code:
MENU_NOACCESS_SOUND =
Added in my to-do list.
__________________

Last edited by OciXCrom; 12-19-2020 at 07:45.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-19-2020 , 10:00   Re: Simple Menu Builder
Reply With Quote #174

Quote:
Originally Posted by OciXCrom View Post
Yup, just checked the code and there will be no problem caused if there are no default options.



The only reason is that the method I used to make the plugin requires it. I put 20 because I didn't expect anyone to ever use more than that and to avoid unused arrays for most people.

But yes, the error is indeed caused by you exceeding the number. The plugin is trying to access an invalid menu index, thus outputing "out of bounds" error.

You don't need to worry about any issues if you go nuts with it. The access to each menu is instant and isn't affected by how many there are. Heck, you can even use 1000 if you want.



Added in my to-do list.

I understand, i tend to use the menu for everything so clients don't have to bind stuff and it's wonderful. never been so easy to make clients reach commands without a information motd or anything, just open the menu and browse it.


Changed :

HTML Code:
#define MAX_MENUS 20
to
HTML Code:
#define MAX_MENUS 1000
And as you said, the problem disappeared.

thanks for helping me.
Ark_Procession is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 06-08-2023 , 03:42   Re: Simple Menu Builder
Reply With Quote #175

MENU_TEAM
can this be used for both teams? like use 1 and 2 - "12"?
HowToRuski is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 11-12-2023 , 15:33   Re: Simple Menu Builder
Reply With Quote #176

If trying to bind certain commands like regame, rehlds ones

How to make it work with admin commands?

Otherwise i get this:

"couldn't execute privileged command"

but in console if i do rcon swapteams it works.

I added the command in two ways:
1) "Swap Teams" "swapteams" error is: command not recognized
1) "Swap Teams" "rcon swapteams" error is: "couldn't execute privileged command"
Ark_Procession 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 02:59.


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