搜索
查看: 3952|回复: 4

[AMXX 带源码] super_meun 怎么呼出菜单

[复制链接]
发表于 2017-6-14 17:39:03 | 显示全部楼层 |阅读模式 来自 中国–四川–成都
   

下了个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);
}
发表于 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 | 显示全部楼层 来自 中国–四川–成都
附件在此,能否帮忙看看

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

发表于 2017-6-15 17:47:37 | 显示全部楼层 来自 中国–广东–深圳–龙岗区
-我靠 发表于 2017-6-15 09:43
附件在此,能否帮忙看看

我这边测试是可以正常使用的。
1.命令必须在控制台输入,按【~】打开控制台
2.最好在【users.ini】这个文件里面加入权限
; 管理员帐号格式:
; <名字|ip|steamid> <管理员密码> <权限等级> <帐号类型>
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表