Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomination - added multilang in show_lists_menu #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cstrike/addons/amxmodx/data/lang/mapmanager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ MAPM_SECOND_VOTE = Second vote.
MAPM_CHANGELEVEL_NEXTROUND = Map will change in next round.
MAPM_EARLY_FINISH_VOTE = All players have voted, so we are ending voting^3 early^1.
MAPM_FORCE_VOTE_BY_ONLINE = Forced voting to change the map. Current map does not match the current map online.
MAPM_MENU_LIST_TITLE = Maps Lists

[pl]
MAPM_VOTE_WILL_BEGIN = Glosowanie rozpocznie sie w nastepnej rundzie.
Expand Down Expand Up @@ -97,6 +98,7 @@ MAPM_SECOND_VOTE = Drugie glosowanie.
MAPM_CHANGELEVEL_NEXTROUND = Mapa zostanie zmieniona w nastepnej rundzie.
MAPM_EARLY_FINISH_VOTE = Wszyscy gracze oddali juz glosy. Konczymy glosowanie^3 wczesniej^1.
MAPM_FORCE_VOTE_BY_ONLINE = Wymuszone głosowanie w sprawie zmiany mapy. Obecna mapa nie zgadza się z aktualną mapą online.
MAPM_MENU_LIST_TITLE = Lista map

[ru]
MAPM_VOTE_WILL_BEGIN = Голосование начнется в следующем раунде.
Expand Down
11 changes: 8 additions & 3 deletions cstrike/addons/amxmodx/scripting/map_manager_nomination.sma
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,13 @@ public clcmd_mapslist(id)
show_nomination_menu(id, g_aMapsList);
}
}

show_lists_menu(id)
{
new text[64];
// TODO: add ML
new menu = menu_create("Maps lists:", "lists_handler");
formatex(text, charsmax(text), "%L", id, "MAPM_MENU_LIST_TITLE");

new menu = menu_create(text, "lists_handler");

new list[32], size = mapm_advl_get_active_lists();
for(new i; i < size; i++) {
Expand All @@ -407,9 +409,10 @@ show_lists_menu(id)
menu_setprop(menu, MPROP_NEXTNAME, text);
formatex(text, charsmax(text), "%L", id, "MAPM_MENU_EXIT");
menu_setprop(menu, MPROP_EXITNAME, text);

menu_display(id, menu);
}

public lists_handler(id, menu, item)
{
if(item == MENU_EXIT) {
Expand All @@ -431,6 +434,7 @@ public lists_handler(id, menu, item)

return PLUGIN_HANDLED;
}

show_nomination_menu(id, Array:maplist, custom_title[] = "")
{
new text[64];
Expand Down Expand Up @@ -491,6 +495,7 @@ show_nomination_menu(id, Array:maplist, custom_title[] = "")

menu_display(id, menu);
}

bool:in_array(Array:array, index)
{
for(new i, size = ArraySize(array); i < size; i++) {
Expand Down