|
下了个AMX_Super Menu.amxx 就是调不出菜单来。有谁知道帮助帮助,谢谢。
#define PLUGIN "AMX_Super Menu"
#define AUTHOR "SuperCentral.co"
#define VERSION "5.0.2"
enum
{
ALLTALK = 1,
LOCK,
UNLOCK,
EXTEND,
GRAVITY,
FIRE,
FLASH,
DISARM,
ROCKET,
UBERSLAP,
REVIVE,
QUIT,
DRUG,
TEAMSWAP,
HEAL,
ARMOR,
STACK,
BURY,
UNBURY,
SLAY,
GOD,
NOCLIP,
SPEED,
UNAMMO,
SWAP,
SETMONEY,
BADAIM,
GAG,
UNGAG,
MAXVALUE
}
new const g_szDisabledCmdsFilename[] = "disabled_cmds.ini";
new Trie:g_tDisabledCmds;
new g_hMainMenu, g_hAllTalkMenu, g_hExtendMenu, g_hGravityMenu;
new g_pMenuEnabled;
new g_iMenuPosition[33], g_iMenuPlayers[33][35], g_iMenuPlayersNum[33], g_iMenuProperties[33], g_iMenuProperties2[33], g_iMenu[33];
new g_szMenuPlayerName[33][32];
new g_szMenuName[64];
new g_iAllKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9;
new g_hCallback;
new Array:g_aValueArray[MAXVALUE];
new g_iAccessLevel[MAXVALUE];
new g_szMenuCommands[][128] =
{
"status",
"amx_alltalk %s",
"amx_lock %s",
"amx_unlock %s",
"amx_extend %s",
"amx_gravity %s",
"amx_fire ^"%s^"",
"amx_flash ^"%s^"",
"amx_disarm ^"%s^"",
"amx_rocket ^"%s^"",
"amx_uberslap ^"%s^"",
"amx_revive ^"%s^"",
"amx_quit ^"%s^"",
"amx_drug ^"%s^" 1",
"amx_teamswap",
"amx_heal ^"%s^" %d",
"amx_armor ^"%s^" %d",
"amx_stack ^"%s^" %d",
"amx_bury ^"%s^"",
"amx_unbury ^"%s^"",
"amx_slay2 ^"%s^" %d",
"amx_godmode ^"%s^" %d",
"amx_noclip ^"%s^" %d",
"amx_speed ^"%s^" %d",
"amx_unammo ^"%s^" %d",
"amx_swap ^"%s^" ^"%s^"",
"amx_money ^"%s^" %d",
"amx_badaim ^"%s^" %d 0",
"amx_gag ^"%s^" %s %d",
"amx_ungag ^"%s^""
};
new g_szCommands[][64] =
{
"nothing",
"amx_alltalk",
"amx_lock",
"amx_unlock",
"amx_extend",
"amx_gravity",
"amx_fire",
"amx_flash",
"amx_disarm",
"amx_rocket",
"amx_uberslap",
"amx_revive",
"amx_quit",
"amx_drug",
"amx_teamswap",
"amx_heal",
"amx_armor",
"amx_stack",
"amx_bury",
"amx_unbury",
"amx_slay2",
"amx_godmode",
"amx_noclip",
"amx_speed",
"amx_unammo",
"amx_swap",
"amx_money",
"amx_badaim",
"amx_gag",
"amx_ungag"
};
new bool:g_bCommandManagerEnabled;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("amx_super_menu",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY);
g_pMenuEnabled = register_cvar("amx_supermenu_enabled", "1");
register_dictionary("amx_super_menu.txt");
register_dictionary("common.txt");
// Register New Menus
format(g_szMenuName, charsmax(g_szMenuName), "%L", LANG_PLAYER, "AMXSUPER_MENU0");
g_hMainMenu = menu_create(g_szMenuName, "MainMenuHandler");
format(g_szMenuName, charsmax(g_szMenuName), "%L", LANG_PLAYER, "AMXSUPER_MENU1");
g_hAllTalkMenu = menu_create(g_szMenuName, "AllTalkMenuHandler");
format(g_szMenuName, charsmax(g_szMenuName), "%L", LANG_PLAYER, "AMXSUPER_MENU4");
g_hExtendMenu = menu_create(g_szMenuName, "ExtendMenuHandler");
format(g_szMenuName, charsmax(g_szMenuName), "%L", LANG_PLAYER, "AMXSUPER_MENU5");
g_hGravityMenu = menu_create(g_szMenuName, "GravityMenuHandler");
g_tDisabledCmds = TrieCreate();
g_bCommandManagerEnabled = is_plugin_loaded("AMX Super Cmd Manager") == -1 ? false : true;
// Register g_hCallbacks
g_hCallback = menu_makecallback("MenuCallback");
// Register Old Menus
register_menucmd(register_menuid("Lock Menu"), g_iAllKeys, "LockMenuHandler");
register_menucmd(register_menuid("Player1 Menu"), g_iAllKeys, "Player1MenuHandler");
register_menucmd(register_menuid("Player2 Menu"), g_iAllKeys, "Player2MenuHandler");
register_menucmd(register_menuid("Gag Menu"), g_iAllKeys, "GagMenuHandler");
register_clcmd("say", "HandleSay");
register_clcmd("say_team", "HandleSay");
register_concmd("supermenu", "HandleCmd", ADMIN_MENU, " - Bring up the menu for AMX_Super");
register_concmd("amx_supermenu", "HandleCmd", ADMIN_MENU, " - Bring up the menu for AMX_Super");
register_concmd("supermenu_edit", "HandleCmd", ADMIN_MENU, " - Allows you to edit the values the menu displays");
register_concmd("amx_supermenu_edit", "HandleCmd", ADMIN_MENU, " - Allows you to edit the values the menu displays");
register_concmd("amx_reloadcmds", "CmdReloadCmds", ADMIN_CVAR, "Reloads all amx super commands. (see disabled_cmds.ini)");
arrayset(g_iAccessLevel, -2, MAXVALUE);
AddMenuItem("AMX_Super Menu", "amx_supermenu", ADMIN_MENU, PLUGIN);
CmdReloadCmds(0, 0, 0);
} |
|