-我靠 发表于 2017-6-14 17:39:03

super_meun 怎么呼出菜单

   

下了个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, g_iMenuPlayers, g_iMenuPlayersNum, g_iMenuProperties, g_iMenuProperties2, g_iMenu;
new g_szMenuPlayerName;

new g_szMenuName;
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;
new g_iAccessLevel;

new g_szMenuCommands[] =
{
        "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[] =
{
        "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);
}

tly111222 发表于 2017-6-15 09:09:15

1.amx_super-cmdmanager.amxx amx_super-fun.amxx amx_super-menu.amxx amx_super-others.amxx amx_super-serious.amxx 确认插件开启并配置正确
2.确认自己有管理员权限(users.ini)

-我靠 发表于 2017-6-15 09:38:38

tly111222 发表于 2017-6-15 09:09
1.amx_super-cmdmanager.amxx amx_super-fun.amxx amx_super-menu.amxx amx_super-others.amxx amx_super-s ...

AMXX版本1.8,权限没有问题,输入amx_supermenu调不出菜单

-我靠 发表于 2017-6-15 09:43:45

附件在此,能否帮忙看看

tly111222 发表于 2017-6-15 17:47:37

-我靠 发表于 2017-6-15 09:43
附件在此,能否帮忙看看

我这边测试是可以正常使用的。
1.命令必须在控制台输入,按【~】打开控制台
2.最好在【users.ini】这个文件里面加入权限
; 管理员帐号格式:
; <名字|ip|steamid> <管理员密码> <权限等级> <帐号类型>
页: [1]
查看完整版本: super_meun 怎么呼出菜单