Skip to content

Commit

Permalink
core: fix errors with menu10 after player vote
Browse files Browse the repository at this point in the history
config fixes
  • Loading branch information
Mistrick committed Jul 23, 2023
1 parent 058b717 commit 50b4733
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions cstrike/addons/amxmodx/configs/map_manager.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ mapm_rtv_ignore_spectators "0"
// EN: Nomination type.
// 0 - standard, allows players to nominate multiple maps, of which a few random ones will be voted.
// 1 - fixed, the first players fill the nomination slots and no one else can nominate.
// RU: Тип номинации.
// RU: Тип номинирования.
// 0 - стандартный, позволяет игрокам номировать несколько карт, из которых несколько случайных попадут в голосование.
// 1 - фиксированный, первые игроки забивают слоты номинации и больше никто номинировать не может.
// 1 - фиксированный, первые игроки забивают слоты номинирования и больше никто номинировать не может.
mapm_nom_type "0"

// EN: The maximum number of nominated maps in a vote.
Expand All @@ -230,32 +230,32 @@ mapm_nom_maps_in_vote "3"
mapm_nom_maps_per_player "3"

// EN: Do not close the nomination menu if the player has nominated the maximum number of cards.
// RU: Не закрывать меню номинации, если игрок номировал максимум карт.
// RU: Не закрывать меню номинирования, если игрок номировал максимум карт.
// 0 - disable, 1 - enable
mapm_nom_dont_close_menu "1"

// EN: Nomination spam protection. Forbids to remove the nomination more often than indicated in the cvar.
// RU: Защита от спама номинацией. Запрещает снимать номинацию чаще чем указано в кваре.
// RU: Защита от спама номинированием. Запрещает снимать номинирование чаще чем указано в кваре.
// seconds
mapm_nom_denominate_time "5"

// EN: Display maps in random order in the nomination menu.
// RU: Вывод карт в случайном порядке в меню номинации.
// RU: Вывод карт в случайном порядке в меню номинирования.
// 0 - disable, 1 - enable
mapm_nom_random_sort "0"

// EN: Delete maps from the nomination that are not in the new list of maps. Occurs when "Advanced lists" changes the current map list.
// RU: Удалять карты из номинации, которых нет в новом списке карт. Происходит, когда "Advanced lists" меняет текущий список карт.
// RU: Удалять карты из номинирования, которых нет в новом списке карт. Происходит, когда "Advanced lists" меняет текущий список карт.
// 0 - disable, 1 - enable
mapm_nom_remove_maps "1"

// EN: In the nomination menu, display active map lists (from "Advanced lists")
// RU: В меню номинации выводить активные списки карт (из "Advanced lists")
// RU: В меню номинирования выводить активные списки карт (из "Advanced lists")
// 0 - disable, 1 - enable
mapm_nom_show_lists "0"

// EN: Enables a nomination for writing part of the map name in chat.
// RU: Включает номинацию по написанию части названия карты в чате.
// RU: Включает номинирование по написанию части названия карты в чате.
// 0 - disable, 1 - enable
mapm_nom_fast_nomination "1"

Expand Down
5 changes: 3 additions & 2 deletions cstrike/addons/amxmodx/scripting/map_manager_core.sma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#endif

#define PLUGIN "Map Manager: Core"
#define VERSION "3.2.0"
#define VERSION "3.2.1"
#define AUTHOR "Mistrick"

#pragma semicolon 1
Expand Down Expand Up @@ -602,6 +602,7 @@ custom_items_builder()
new ci_size = ArraySize(g_aCustomItems);
g_iCustomItemsKeys = 0;
arrayset(g_bCustomItemSkipNum, false, sizeof(g_bCustomItemSkipNum));
arrayset(g_iCustomItemsIndex, 0, sizeof(g_iCustomItemsIndex));

for(new i; i < ci_size; i++) {
ArrayGetArray(g_aCustomItems, i, custom_item);
Expand Down Expand Up @@ -760,7 +761,7 @@ public show_votemenu(id)
public votemenu_handler(id, key)
{
// custom items
if(key >= g_iVoteItems + g_bCanExtend) {
if(g_iCustomItemsIndex[0] && key >= g_iVoteItems + g_bCanExtend) {
new item = key - (g_iVoteItems + g_bCanExtend);
new ci_handler = g_iCustomItemsHandlers[item];

Expand Down

0 comments on commit 50b4733

Please sign in to comment.