55 |
new CurrentMenuFunction[33] = { -1,... }; |
new CurrentMenuFunction[33] = { -1,... }; |
56 |
|
|
57 |
new CurrentCommand[33][32]; |
new CurrentCommand[33][32]; |
58 |
|
new cvarmenu_cmdid; |
59 |
|
new cmdmenu_cmdid; |
60 |
|
|
61 |
new ExplicitPlugin[33]; |
new ExplicitPlugin[33]; |
62 |
|
|
67 |
register_dictionary("common.txt"); |
register_dictionary("common.txt"); |
68 |
register_dictionary("pausecfg.txt"); // Needed for PAUSE_COULDNT_FIND |
register_dictionary("pausecfg.txt"); // Needed for PAUSE_COULDNT_FIND |
69 |
|
|
70 |
register_clcmd("amx_plugincvarmenu", "CvarMenuCommand", ADMIN_CVAR, " - displays the plugin cvar menu"); |
cvarmenu_cmdid=register_clcmd("amx_plugincvarmenu", "CvarMenuCommand", ADMIN_CVAR, " - displays the plugin cvar menu"); |
71 |
register_clcmd("amx_plugincmdmenu", "CommandMenuCommand", ADMIN_MENU, " - displays the plugin command menu"); |
cmdmenu_cmdid=register_clcmd("amx_plugincmdmenu", "CommandMenuCommand", ADMIN_MENU, " - displays the plugin command menu"); |
72 |
|
|
73 |
register_clcmd("amx_changecvar","CommandChangeCvar"); |
register_clcmd("amx_changecvar","CommandChangeCvar"); |
74 |
register_clcmd("amx_executecmd","CommandExecuteCommand"); |
register_clcmd("amx_executecmd","CommandExecuteCommand"); |
81 |
// Add these menus to the amxmodmenu |
// Add these menus to the amxmodmenu |
82 |
public plugin_cfg() |
public plugin_cfg() |
83 |
{ |
{ |
84 |
|
set_task(0.1, "addToMenuFront"); |
85 |
|
} |
86 |
|
public addToMenuFront() |
87 |
|
{ |
88 |
new PluginFileName[64]; |
new PluginFileName[64]; |
89 |
|
|
90 |
get_plugin(-1, PluginFileName, charsmax(PluginFileName)); |
get_plugin(-1, PluginFileName, charsmax(PluginFileName)); |
91 |
AddMenuItem("Plugin Cvars", "amx_plugincvarmenu", ADMIN_CVAR, PluginFileName); |
new cvarflags; |
92 |
AddMenuItem("Plugin Commands", "amx_plugincmdmenu", ADMIN_MENU, PluginFileName); |
new cmdflags; |
93 |
|
new garbage[1]; |
94 |
|
new cmd[32]; |
95 |
|
|
96 |
|
get_concmd(cmdmenu_cmdid, cmd, charsmax(cmd), cmdflags, garbage, charsmax(garbage), -1); |
97 |
|
|
98 |
|
if (strcmp(cmd, "amx_plugincmdmenu") != 0) |
99 |
|
{ |
100 |
|
// this should never happen, but just incase! |
101 |
|
cmdflags = ADMIN_MENU; |
102 |
|
} |
103 |
|
get_concmd(cvarmenu_cmdid, cmd, charsmax(cmd), cvarflags, garbage, charsmax(garbage), -1); |
104 |
|
|
105 |
|
if (strcmp(cmd, "amx_plugincvarmenu") != 0) |
106 |
|
{ |
107 |
|
// this should never happen, but just incase! |
108 |
|
cvarflags = ADMIN_CVAR; |
109 |
|
} |
110 |
|
|
111 |
|
AddMenuItem("Plugin Cvars", "amx_plugincvarmenu", cvarflags, PluginFileName); |
112 |
|
AddMenuItem("Plugin Commands", "amx_plugincmdmenu", cmdflags, PluginFileName); |
113 |
} |
} |
114 |
|
|
115 |
// Reset all fields for each client as they connect. |
// Reset all fields for each client as they connect. |