Fixed translating in class menu.
This commit is contained in:
parent
5ee1395fb1
commit
b89dac76f4
@ -43,7 +43,8 @@ ClassMenuMain(client)
|
|||||||
new Handle:menu = CreateMenu(ClassMenuMainHandle);
|
new Handle:menu = CreateMenu(ClassMenuMainHandle);
|
||||||
|
|
||||||
SetGlobalTransTarget(client);
|
SetGlobalTransTarget(client);
|
||||||
SetMenuTitle(menu, "%t\n", "Classes menu title");
|
|
||||||
|
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||||
|
|
||||||
decl String:zombieclass[MENU_LINE_REG_LENGTH];
|
decl String:zombieclass[MENU_LINE_REG_LENGTH];
|
||||||
decl String:humanclass[MENU_LINE_REG_LENGTH];
|
decl String:humanclass[MENU_LINE_REG_LENGTH];
|
||||||
@ -81,7 +82,6 @@ ClassMenuMain(client)
|
|||||||
if (ClassPlayerInAdminMode[client])
|
if (ClassPlayerInAdminMode[client])
|
||||||
{
|
{
|
||||||
// Notify the player.
|
// Notify the player.
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(inadminmnode, sizeof(inadminmnode), "%t\n", "Classes admin mode enabled");
|
Format(inadminmnode, sizeof(inadminmnode), "%t\n", "Classes admin mode enabled");
|
||||||
AddMenuItem(menu, "", inadminmnode, ITEMDRAW_RAWLINE);
|
AddMenuItem(menu, "", inadminmnode, ITEMDRAW_RAWLINE);
|
||||||
}
|
}
|
||||||
@ -98,13 +98,11 @@ ClassMenuMain(client)
|
|||||||
// Get name of previous class index and format item text.
|
// Get name of previous class index and format item text.
|
||||||
ClassGetName(nextzombie, nextzombiename, sizeof(nextzombiename), ZR_CLASS_CACHE_MODIFIED);
|
ClassGetName(nextzombie, nextzombiename, sizeof(nextzombiename), ZR_CLASS_CACHE_MODIFIED);
|
||||||
|
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(zombieselect, sizeof(zombieselect), "%t", "Classes menu zombie next", zombieclass, nextzombiename);
|
Format(zombieselect, sizeof(zombieselect), "%t", "Classes menu zombie next", zombieclass, nextzombiename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use current class name and format item text.
|
// Use current class name and format item text.
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(zombieselect, sizeof(zombieselect), "%t", "Classes menu zombie current", zombieclass);
|
Format(zombieselect, sizeof(zombieselect), "%t", "Classes menu zombie current", zombieclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,13 +122,11 @@ ClassMenuMain(client)
|
|||||||
// Get name of previous class index and format item text.
|
// Get name of previous class index and format item text.
|
||||||
ClassGetName(nexthuman, nexthumanname, sizeof(nexthumanname), ZR_CLASS_CACHE_MODIFIED);
|
ClassGetName(nexthuman, nexthumanname, sizeof(nexthumanname), ZR_CLASS_CACHE_MODIFIED);
|
||||||
|
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(humanselect, sizeof(humanselect), "%t", "Classes menu human next", humanclass, nexthumanname);
|
Format(humanselect, sizeof(humanselect), "%t", "Classes menu human next", humanclass, nexthumanname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use current class name and format item text.
|
// Use current class name and format item text.
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(humanselect, sizeof(humanselect), "%t", "Classes menu human current", humanclass);
|
Format(humanselect, sizeof(humanselect), "%t", "Classes menu human current", humanclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,13 +148,11 @@ ClassMenuMain(client)
|
|||||||
{
|
{
|
||||||
// Get name of previous class index and format item text.
|
// Get name of previous class index and format item text.
|
||||||
ClassGetName(nextadmin, nextadminname, sizeof(nextadminname), ZR_CLASS_CACHE_MODIFIED);
|
ClassGetName(nextadmin, nextadminname, sizeof(nextadminname), ZR_CLASS_CACHE_MODIFIED);
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(adminselect, sizeof(adminselect), "%t", "Classes menu admin next", adminclass, nextadminname);
|
Format(adminselect, sizeof(adminselect), "%t", "Classes menu admin next", adminclass, nextadminname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use current class name and format item text.
|
// Use current class name and format item text.
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(adminselect, sizeof(adminselect), "%t", "Classes menu admin current", adminclass);
|
Format(adminselect, sizeof(adminselect), "%t", "Classes menu admin current", adminclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,12 +162,10 @@ ClassMenuMain(client)
|
|||||||
// Set admin mode status string.
|
// Set admin mode status string.
|
||||||
if (ClassPlayerInAdminMode[client])
|
if (ClassPlayerInAdminMode[client])
|
||||||
{
|
{
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(adminmode, sizeof(adminmode), "%t", "On");
|
Format(adminmode, sizeof(adminmode), "%t", "On");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(adminmode, sizeof(adminmode), "%t", "Off");
|
Format(adminmode, sizeof(adminmode), "%t", "Off");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,11 +173,13 @@ ClassMenuMain(client)
|
|||||||
AddMenuItem(menu, "", " ", ITEMDRAW_RAWLINE);
|
AddMenuItem(menu, "", " ", ITEMDRAW_RAWLINE);
|
||||||
|
|
||||||
// Show admin mode toggle option.
|
// Show admin mode toggle option.
|
||||||
SetGlobalTransTarget(client);
|
|
||||||
Format(toggleadminmode, sizeof(toggleadminmode), "%t\n %s", "Classes menu admin mode toggle", adminmode);
|
Format(toggleadminmode, sizeof(toggleadminmode), "%t\n %s", "Classes menu admin mode toggle", adminmode);
|
||||||
AddMenuItem(menu, "", toggleadminmode, admin_itemdraw);
|
AddMenuItem(menu, "", toggleadminmode, admin_itemdraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Format(title, sizeof(title), "%t\n", "Classes menu title");
|
||||||
|
SetMenuTitle(menu, title);
|
||||||
|
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user