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

Simple Menu Builder


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-24-2016 , 08:29   Simple Menu Builder
Reply With Quote #1



Simple Menu Builder


Description
  • With this plugin you can easily create server menus that will execute commands in the client's console.

Plugin Settings
  • You can change the settings from the file configs/SimpleMenu.ini, which looks like this:
  • [Default Settings] - In this section you can change the default settings that will be used for every new menu, in case you don't change a specific setting for a specific menu.
    • MENU_TITLE: Menu title.
    • MENU_TITLE_PAGE: The text that will be added in the title if the menu has more than one page.
    • MENU_BACK: Text for the "previous page" field.
    • MENU_NEXT: Text for the "next page" field.
    • MENU_EXIT: Text for the "exit menu" field.
    • MENU_OPEN: Commands that open the menu. Separate them with commans ( , ). Use say and say_team for chat commands. Bear in mind that you need to add this setting in every single menu, because two different menus can't be opened with the same command.
    • MENU_FLAG: If you want the menu to be available to players with a specific flag only, otherwise leave it "0".
    • MENU_TEAM: If you want the menu to be available for a certain team only (0 = all; 1 = T; 2 = CT; 3 = SPEC).
    • MENU_ALIVEONLY: Change it to "1" if you want the menu to be available to alive players only, or "2" - only for dead players.
    • MENU_ITEMS_PER_PAGE: Number of items per page. Change it to "0" to remove the previous and next page options, as well as the exit option and make the menu use one page only.
    • MENU_REOPEN: If you want the menu to reopen after being used.
    • MENU_ITEM_FORMAT: How are the items going to be displayed in the menu. Use %item% for the item's name.
    • MENU_PREFIX: The prefix for chat messages.
    • MENU_NOACCESS: The message that will show in chat if you don't have access to the menu.
    • MENU_NOTEAM: The message that will show in chat if your team doesn't have access to the menu.
    • MENU_ALIVE: The message that will show in chat if it's available for alive players only.
    • MENU_DEAD: The message that will show in chat if it's available for dead players only.
    • MENU_SOUND: If you want the menu to play a sound when you open it.
  • How to add a new menu:

    [New Menu = My Menu] - This tells the plugin that you're making a new menu and everything below this line will be related to that menu.
    [Menu Settings] - Below this line you can add the menu settings. Bear in mind that you don't have to add a certain settings if you want it to be the same as the one in the default settings. You must add the MENU_OPEN option.
    [Menu Items] - This section contains the menu items. There's no limit on how many items you can add. This is how you can add an item:
    • Name: This is the name of the item that will be displayed in the menu.
      Command: The command that will be executed when the menu option is chosen.
      Flag: If you want the item to be available for players with a certain flag only.
      Team: If you want the item to be available for a certain team only.
  • In order to add a blank line, use #blank 0/1 (1 = shift the numbering down; 0 = don't shift).
    You can also add a text with #text "your text" 0/1 (1 = shift the numbering down; 0 = don't shift).
    In order to make a players menu, use #addplayers "your command" "flags" (flags: "a" = don't add players who have immunity; "b" = add yourself; "c" = don't add dead players).
  • You can also make some menus or menu items appear on specific maps only. Use - mapname - for a specific map, - map_* - for map prefix and -#all - to use all maps again.
  • You can even execute a function from another plugin. You can do this by using do.func(plugin_name.amxx, function_name). Please note that you should use functions that have only one parameter, and that parameter should be the player's id.




Last edited by OciXCrom; 08-23-2018 at 06:52. Reason: Update v2.0 @ 14.01.2017
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-24-2016 , 08:39   Re: Simple Menu Builder
Reply With Quote #2

I am not sure how is this going to help server owners. Basically it just create a menu that can only trigger already registered commands, so you are pretty limited.
For such purpose one can use https://forums.alliedmods.net/showthread.php?t=216998

I would like to get some feedback from regular users.
__________________
HamletEagle is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-24-2016 , 08:45   Re: Simple Menu Builder
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
I am not sure how is this going to help server owners. Basically it just create a menu that can only trigger already registered commands, so you are pretty limited.
For such purpose one can use https://forums.alliedmods.net/showthread.php?t=216998

I would like to get some feedback from regular users.
I think this plugin is more usefull for players without any knowledge of pawn/amxx, that program you linked us is for coders with any knowledge of amxx.

But indeed the plugin is very limited as you said. I think if you could make some changes in that case that this plugin would indeed be very usefull.

Allthough, i didn't know that someone ever made a program like that, i will definitly try it.
__________________

Last edited by Napoleon_be; 06-24-2016 at 08:45.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-24-2016 , 09:49   Re: Simple Menu Builder
Reply With Quote #4

It's indeed limited, but as Napoleon_be said, it's very helpful for newbies. Many servers have a menu that only uses client commands, basically for server "navigation" and letting other players know what commands the server uses. Owners struggle with simple menus like this because they have no knowledge of scripting, so this could make their lives easier.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-24-2016 , 10:45   Re: Simple Menu Builder
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
I would like to get some feedback from regular users.
This looks similar to the 'custommenuitems.cfg' I use from the AMXX.
Code:
// Here you can add menu items from any plugin to Menus Front-End plugin, aka "amxmodmenu".
// You can also add menu items to the normal non-admin client menu "amx_menu".
//
// Adding to "amxmodmenu":
// Usage: "amx_addmenuitem <menu text> <menu command> <access flags> <plugin name>"
//
// Adding to "amx_menu":
// Usage: "amx_addclientmenuitem <menu text> <menu command> <access flags> <plugin name>"
//
// <menu text>: This is the text displayed in the menu itself for this item.
// <menu command>: This is the client command used to access the menu.
// <access flags>: Specify what access flags admins must have to use this menu item. (Check users.ini for access flags.)
// <plugin name>: This must be the _exact_ (though case insensitive) name of the plugin which holds the menu command. (Use "amxx plugins" in server console, plugin names are listed in Name column.)
//
// Example: (be sure to use quotes around parameters with spaces!)
//
// amx_addmenuitem "Weapon Arena" "weaponarena_menu" "hu" "Weapon Arena"
// amx_addclientmenuitem "Warcraft 3" "war3menu" "" "Warcraft 3 XP"
//
amx_addclientmenuitem "Commands" "say /comandos" "" "Server Rules"
amx_addclientmenuitem "Rules" "say /regras" "" "AMXX Public server rules"
amx_addclientmenuitem "Fake C4" "amx_fakec4" "" "Fake C4"
amx_addclientmenuitem "Open Jail" "open_jail" "" "Jail Opener"
amx_addclientmenuitem "Radio Menu" "say /hlmp" "" "HL Media Player"
amx_addclientmenuitem "Mp3 Menu" "say /mp3" "" "Mp3 Player"
amx_addclientmenuitem "Voteban Menu" "say /voteban" "" "voteban menu"
amx_addclientmenuitem "Warcraft 3" "war3menu" "" "UWC3"
1) The difference is that to open it you basically need to use 'amx_menu' on console, and this one you can personalize more easily.
2) The next, previous and menu's titles uses the AMXX multilingual, on this one you need to type them.
3) The 'custommenuitems.cfg' is just one menu, but this plugin can create more than one.
4) This has the disadvantage against the 'custommenuitems.cfg', to do not disable the menu option when the plugin is not running.

So, looks like this plugin is somehow useful and could be easily used by non-coders allowing creating more menus than 'AMXX Menu Generator v1.3'.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 06-24-2016 at 21:10. Reason: misspelling
addons_zz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-25-2016 , 10:38   Re: Simple Menu Builder
Reply With Quote #6

When I think about it, making it "more advanced" would require the owner to have knowledge of PAWN. Actually, it's the same at the moment - if you have some knowledge, you can easily make a command that will execute some function and add that command to a menu from this plugin. The goal of this plugin is to make everything through a .ini file, so adding more stuff to it will probably require editing the code itself.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 06-28-2016 , 10:52   Re: Simple Menu Builder
Reply With Quote #7

you cant do that . I thought once about that but its impossible i think.
For example if you write in your .ini file
give_item ( id, "weapon_awp")
then you cant make sma read this as function.
If someone knew how to make it then it would ve great.
siriusmd99 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-28-2016 , 11:49   Re: Simple Menu Builder
Reply With Quote #8

Quote:
Originally Posted by siriusmd99 View Post
you cant do that . I thought once about that but its impossible i think.
For example if you write in your .ini file
give_item ( id, "weapon_awp")
then you cant make sma read this as function.
If someone knew how to make it then it would ve great.
There must be a way to do that, just don't ask me how. I'm sure xPaw or Exolent would've known how to do that, but i'm certain there's still someone else around who would know how to do this.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-28-2016 , 12:55   Re: Simple Menu Builder
Reply With Quote #9

I don't think that's possible as well. I was thinking about a .inc file, so you can make sub-plugins, but it's pointless if you don't know how to script.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2016 , 14:16   Re: Simple Menu Builder
Reply With Quote #10

Update v1.2 @ 04.07.2016: added options to add a blank line to the menu (#blank 0/1), as well as a random text (#text "your text" 0/1).
My next goal is to add player menus in it.
I'm also open to any suggestions for make it more advanced.
__________________

Last edited by OciXCrom; 07-04-2016 at 14:20.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 12:33.


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