alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
499 stars 203 forks source link

menu_create multi language param not work #880

Closed SmileYzn closed 4 years ago

SmileYzn commented 4 years ago

Help us help you

Environment

Description

menu_create multi language param not work. I used test code from here: https://github.com/alliedmodders/amxmodx/pull/593#issue-217270055

Someone can confirm? I'm using latest amxmodx 1.10

Problematic Code (or Steps to Reproduce)

#include <amxmodx>

new StaticMenuHandle;

public plugin_init()
{
    buildStaticMenu();

    register_dictionary("menutest.txt");
    register_clcmd("menu", "@OnCommandDisplayMenu");
}

public plugin_end()
{
    StaticMenuHandle && menu_destroy(StaticMenuHandle);
}

@OnCommandDisplayMenu(const player)
{
    menu_display(player, StaticMenuHandle);

    return PLUGIN_HANDLED;
}

buildStaticMenu()
{
    new const menu = menu_create("MENU_NAME", "@OnStaticMenu", .ml = true);

    menu_additem(menu, "ITEM_1");
    menu_additem(menu, "ITEM_2");
    menu_additem(menu, "ITEM_3");
    menu_additem(menu, "ITEM_4");

    StaticMenuHandle = menu;
}

@OnStaticMenu(const player, const menu, const item)
{

}

Logs

No logs are given

Arkshine commented 4 years ago

That you see the translation in-game means it works. If you say that the language is incorrect, then check your language setting. Or did I miss something?

SmileYzn commented 4 years ago

I just uses directly given plugin without others, and what Multi-Lingual System plugin do in amxx lang system? nothing i think

@Arkshine Just not works at all.

SmileYzn commented 4 years ago

Already fixed it, i has replaced amxx 1.9 dll into amxx 1.10 install.

Ps. I thought that amxx 1.9 already have translation into menus, but no!

SmileYzn commented 4 years ago

Did you read the comment? I had replaced accidentally the 1.10 DLL by 1.90.