Skip to content

Commit ce9f2bf

Browse files
committed
core: allow block vote in mapm_prepare_votelist
1 parent e83fe95 commit ce9f2bf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cstrike/addons/amxmodx/scripting/include/map_manager.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ forward mapm_countdown(type, time);
256256
*
257257
* @param type Type of vote, used const VOTE_BY_*
258258
*
259-
* @noreturn
259+
* @return Return 1 to block the vote
260260
*/
261261
forward mapm_prepare_votelist(type);
262262

cstrike/addons/amxmodx/scripting/map_manager_core.sma

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#endif
88

99
#define PLUGIN "Map Manager: Core"
10-
#define VERSION "3.3.0"
10+
#define VERSION "3.3.1"
1111
#define AUTHOR "Mistrick"
1212

1313
#pragma semicolon 1
@@ -136,7 +136,7 @@ public plugin_init()
136136

137137
g_hForwards[MAPLIST_LOADED] = CreateMultiForward("mapm_maplist_loaded", ET_IGNORE, FP_CELL, FP_STRING);
138138
g_hForwards[MAPLIST_UNLOADED] = CreateMultiForward("mapm_maplist_unloaded", ET_IGNORE);
139-
g_hForwards[PREPARE_VOTELIST] = CreateMultiForward("mapm_prepare_votelist", ET_IGNORE, FP_CELL);
139+
g_hForwards[PREPARE_VOTELIST] = CreateMultiForward("mapm_prepare_votelist", ET_CONTINUE, FP_CELL);
140140
g_hForwards[VOTE_STARTED] = CreateMultiForward("mapm_vote_started", ET_IGNORE, FP_CELL);
141141
g_hForwards[VOTE_CANCELED] = CreateMultiForward("mapm_vote_canceled", ET_IGNORE, FP_CELL);
142142
g_hForwards[ANALYSIS_OF_RESULTS] = CreateMultiForward("mapm_analysis_of_results", ET_CONTINUE, FP_CELL, FP_CELL);
@@ -561,6 +561,10 @@ prepare_vote(type)
561561
new ret;
562562
ExecuteForward(g_hForwards[PREPARE_VOTELIST], ret, type);
563563

564+
if(ret) {
565+
return 0;
566+
}
567+
564568
if(g_iExternalMaxItems) {
565569
vote_max_items = g_iExternalMaxItems;
566570
g_iExternalMaxItems = 0;

0 commit comments

Comments
 (0)