AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Issues with amx_addmenuitem (https://forums.alliedmods.net/showthread.php?t=206224)

Doc-Holiday 01-19-2013 23:39

Issues with amx_addmenuitem
 
1 Attachment(s)
I am trying to access my botmenu via the amxmodxmenu frontend.

Code:

// Adding to "amxmodmenu":
// Usage: "amx_addmenuitem <menu text> <menu command> <access flags> <plugin name>"

// 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"

This is my entry to the "custommenuitems.cfg"
Code:

amx_addmenuitem "Bot Control" "botmenu" "u" "botcontrol"
and attached is the very simple plugin that is used as the menu.

For both full admin and member admin
Code:

Full admin:
abcdefghijklmnopqrstu

Member Admin:
cdefiju

It displays on the menu but is disabled for both.

any ideas on what i am doing wrong?


EDIT: So The examples are wrong it needs the .amxx as the plugin name....... Corrected below
Code:

amx_addmenuitem "Bot Control" "botmenu" "u" "botcontrol.amxx"

fysiks 01-20-2013 13:54

Re: Issues with amx_addmenuitem
 
Quote:

Originally Posted by Doc-Holiday (Post 1876630)
EDIT: So The examples are wrong it needs the .amxx as the plugin name....... Corrected below

Does this imply that you have it working now? Also, it can be either one, the name of the plugin or the plugin's filename. See the documentation for is_plugin_loaded().

Doc-Holiday 01-21-2013 00:05

Re: Re: Issues with amx_addmenuitem
 
Quote:

Originally Posted by fysiks (Post 1876943)
Does this imply that you have it working now? Also, it can be either one, the name of the plugin or the plugin's filename. See the documentation for is_plugin_loaded().

Yea worked now after I placed it with .amxx I copied and pasted the name from the file and the register plugin neither worked then I found a plugin that explained how to do it for his plugin and it worked

YamiKaitou 01-21-2013 00:21

Re: Issues with amx_addmenuitem
 
Plugin Name works just fine, menufront uses it to internally build the default choices. Your problem is that you are not using the correct value. You should be using "Bot Control Menu" as that is the name of your plugin, not "botcontrol"


All times are GMT -4. The time now is 13:24.

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