From e94a0481821587bf6cff2f12d892d2fff7743096 Mon Sep 17 00:00:00 2001 From: Karol Szuster Date: Fri, 18 Aug 2017 00:33:59 +0200 Subject: [PATCH] Use fmt in menus --- amxmodx/scripting/ctw.sma | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/amxmodx/scripting/ctw.sma b/amxmodx/scripting/ctw.sma index 1e56b46..8abb7e3 100644 --- a/amxmodx/scripting/ctw.sma +++ b/amxmodx/scripting/ctw.sma @@ -249,7 +249,6 @@ ReadWiresFromFile() while (!feof(hFile)) { fgets(hFile, szLine, charsmax(szLine)); - trim(szLine); if(!szLine[0] || szLine[0] == ';' || (szLine[0] == '/' && szLine[1] == '/')) @@ -263,12 +262,10 @@ ReadWiresFromFile() MakeMenu() { - new szItem[32]; g_hMenu = menu_create("Choose a wire", "MenuWiresHandler"); for (new i = 0; i < g_iWires; i++) { - ArrayGetString(g_arrayWires, i, szItem, charsmax(szItem)); - menu_additem(g_hMenu, szItem); + menu_additem(g_hMenu, fmt("%a", ArrayGetStringHandle(g_arrayWires, i))); } } @@ -288,7 +285,6 @@ HideMenu(id) SetupTitle(id) { - static szTitle[32]; - LookupLangKey(szTitle, charsmax(szTitle), "CHOOSE_WIRE", id); - menu_setprop(g_hMenu, MPROP_TITLE, szTitle); + SetGlobalTransTarget(id); + menu_setprop(g_hMenu, MPROP_TITLE, fmt("%l", "CHOOSE_WIRE")); }