AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Help Menu v0.3 (7/10) (https://forums.alliedmods.net/showthread.php?t=72576)

chundo 06-10-2008 23:42

Help Menu v0.3 (7/10)
 
2 Attachment(s)
Help Menu v0.3 (7/10)

Displays a help menu to users when they type "!helpmenu" in chat. Help menus can be fully customized via a config file. Also displays two standard help menus: Current Map Rotation, and Online Admins.

Configuration is in configs/helpmenu.cfg. CONFIGURATION HAS CHANGED SIGNIFICANTLY SINCE 0.2 - you will need to update your config file when you upgrade.

The new configuration format removes the old "standard" menus for Rules, Clan Info, and Chat Commands and instead lets you specify arbitrary custom help menus. Each section of the file is its own menu, using the following format:

Code:

"Menu Name"
{
    "title"      "Menu Title"
    "type"    "list"
    "items"
    {
        ""      "Here's an informational item"
        "sm_browse www.mysite.com"  "This launches a client command when selected"
    }
}

You can also specify a "text" type to avoid displaying line numbers in the menu if you just want a wall of text and don't need to execute any commands. Please look through the attached configuration for examples.

CVars:

sm_helpmenu_version - Plugin version.
sm_helpmenu_welcome - Display a welcome message when users connect, telling them they can type "!helpmenu" to view the menu. 1 is on, 0 is off. (default 1)
sm_helpmenu_admins - Display a list of online admins in the help menu. 1 is on, 0 is off. (default 1)

Commands:

sm_helpmenu - Show the help menu.

Installing:

helpmenu.smx -> addons/sourcemod/plugins/
helpmenu.sp -> addons/sourcemod/scripting/
helpmenu.cfg -> addons/sourcemod/configs/
plugin.helpmenu.cfg (optional, create if you need to customize cvars) -> cfg/sourcemod/

Changelog:

0.1 - Initial release
0.2 - Fixed some timer bugs
0.3 - Revamped config format to add flexibility

r3dh3adkid 06-11-2008 00:19

Re: Help Menu v0.1 (6/10)
 
Installed on my server, will tell you how it goes!

I love this idea and cant wait to get some testing w/ it. There are so many possibilities with it

FunTF2Server 06-11-2008 03:33

Re: Help Menu v0.1 (6/10)
 
can you make it for in addition to !helpmenu, they can also type:

!help
!cmd
/help
/cmd
!menu
!cmdlist
/cmdlist
/menu
!motd
/motd
!rtfm


and those will also trigger the help menu.

Because I see people join my server and type those all the time, but I've never see anyone type !helpmenu

ratty 06-11-2008 05:21

Re: Help Menu v0.1 (6/10)
 
Or simply "help" without a ! or /

PStar 06-11-2008 06:30

Re: Help Menu v0.1 (6/10)
 
HY i got this in my logs:
Quote:

L 06/11/2008 - 12:22:09: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/11/2008 - 12:22:09: [SM] Invalid data handle 1 (error 1) passed during timer end
L 06/11/2008 - 12:22:09: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/11/2008 - 12:22:09: [SM] Invalid data handle 2 (error 7) passed during timer end
L 06/11/2008 - 12:25:10: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/11/2008 - 12:25:10: [SM] Invalid data handle 1 (error 1) passed during timer end

FunTF2Server 06-11-2008 19:40

Re: Help Menu v0.1 (6/10)
 
Ahh PStar my old arch nemesis

SixSicSix 06-12-2008 18:58

Re: Help Menu v0.1 (6/10)
 
Quote:

Originally Posted by FunTF2Server (Post 637523)
can you make it for in addition to !helpmenu, they can also type:

!help
!cmd
/help
/cmd
!menu
!cmdlist
/cmdlist
/menu
!motd
/motd
!rtfm


and those will also trigger the help menu.

Because I see people join my server and type those all the time, but I've never see anyone type !helpmenu


Modify it yourself as such:

RegConsoleCmd("sm_helpmenu", Command_HelpMenu, "Display the help menu.", FCVAR_PLUGIN);

change it to

RegConsoleCmd("sm_menu", Command_HelpMenu, "Display the help menu.", FCVAR_PLUGIN);

for !menu to work

Copy, paste, salt and pepper to your liking.


In sourcemod, commands work in chat with an ! or a /. Usually, ! adds an sm_ to the front of the string to register a console command...

if that makes sense.

chundo 06-12-2008 22:33

Re: Help Menu v0.1 (6/10)
 
Yeah, I think that's kind of out of scope for this plugin. It advertises itself to newly-connected users and tells them what to type for help, so it's pretty self-explanatory. If you want other chat triggers, either modify the plugin or use another plugin that allows you to customize chat triggers (like Mani's commandlist.cfg, does such a thing exist for SM yet? If not I'll write it, but I'd rather make it more generic and not tie it into this.)

DontWannaName 06-12-2008 23:12

Re: Help Menu v0.1 (6/10)
 
Ya there is already a trigger and website plugin.

r3dh3adkid 06-14-2008 23:28

Re: Help Menu v0.1 (6/10)
 
Hey

I havent noticed any problems with the plugin persay but my error log is constantly being spammed with errors. It seems to be the same errors as posted above.

Here are a few examples:
Code:

L 06/14/2008 - 23:12:40: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/14/2008 - 23:12:40: [SM] Invalid data handle 1 (error 1) passed during timer end
L 06/14/2008 - 23:13:36: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/14/2008 - 23:13:37: [SM] Invalid data handle 2 (error 7) passed during timer end
L 06/14/2008 - 23:14:17: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/14/2008 - 23:14:17: [SM] Invalid data handle 3 (error 1) passed during timer end
L 06/14/2008 - 23:17:56: [SM] Plugin "helpmenu.smx" encountered error 23: Native detected error
L 06/14/2008 - 23:17:56: [SM] Invalid data handle 1 (error 1) passed during timer end

Any idea on what could be causing this?


All times are GMT -4. The time now is 20:00.

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