77#endif
88
99#define PLUGIN "Map Manager: Scheduler"
10- #define VERSION "0.0.8 "
10+ #define VERSION "0.0.9 "
1111#define AUTHOR "Mistrick"
1212
1313#pragma semicolon 1
@@ -131,6 +131,7 @@ public plugin_natives()
131131
132132 register_native("map_scheduler_start_vote", "native_start_vote");
133133 register_native("is_vote_will_in_next_round", "native_vote_will_in_next_round");
134+ register_native("is_last_round", "native_is_last_round");
134135}
135136public native_start_vote(plugin, params)
136137{
@@ -147,6 +148,10 @@ public native_vote_will_in_next_round(plugin, params)
147148{
148149 return g_bVoteInNewRound;
149150}
151+ public native_is_last_round(plugin, params)
152+ {
153+ return g_bChangeMapNextRound;
154+ }
150155public plugin_end()
151156{
152157 if(g_fOldTimeLimit > 0.0) {
@@ -294,7 +299,7 @@ public event_newround()
294299 mapm_start_vote(g_iVoteType);
295300 }
296301
297- if(is_vote_finished() && ( g_bChangeMapNextRound || get_num(LAST_ROUND)) ) {
302+ if(is_vote_finished() && g_bChangeMapNextRound) {
298303 new nextmap[MAPNAME_LENGTH]; get_string(NEXTMAP, nextmap, charsmax(nextmap));
299304 client_print_color(0, print_team_default, "%s^1 %L^3 %s^1.", g_sPrefix, LANG_PLAYER, "MAPM_NEXTMAP", nextmap);
300305 intermission();
@@ -465,6 +470,8 @@ public mapm_vote_finished(const map[], type, total_votes)
465470 // What if timelimit 0?
466471 g_fOldTimeLimit = get_float(TIMELIMIT);
467472 set_float(TIMELIMIT, 0.0);
473+ g_bChangeMapNextRound = true;
474+
468475 client_print_color(0, print_team_default, "%s^1 %L", g_sPrefix, LANG_PLAYER, "MAPM_LASTROUND");
469476
470477 log_amx("[vote_finished]: last round - saved timelimit is %f", g_fOldTimeLimit);
0 commit comments