@@ -30,11 +30,6 @@ enum {
3030 CHANGE_MAP_END
3131};
3232
33- enum {
34- EXTEND_MINUTES,
35- EXTEND_ROUNDS
36- };
37-
3833enum Cvars {
3934 CHANGE_TYPE,
4035 TIMELEFT_TO_VOTE,
@@ -92,6 +87,8 @@ public plugin_init()
9287 register_concmd (" mapm_start_vote" , " concmd_startvote" , ADMIN_MAP);
9388 register_concmd (" mapm_stop_vote" , " concmd_stopvote" , ADMIN_MAP);
9489
90+ register_clcmd (" votemap" , " clcmd_votemap" );
91+
9592 register_event (" TeamScore" , " event_teamscore" , " a" );
9693 register_event (" HLTV" , " event_newround" , " a" , " 1=0" , " 2=0" );
9794 // register_event("TextMsg", "event_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in");
@@ -106,6 +103,7 @@ public plugin_natives()
106103 register_library (" map_manager_scheduler" );
107104
108105 register_native (" map_scheduler_start_vote" , " native_start_vote" );
106+ register_native (" is_vote_will_in_next_round" , " native_vote_will_in_next_round" );
109107}
110108public native_start_vote (plugin, params)
111109{
@@ -118,6 +116,10 @@ public native_start_vote(plugin, params)
118116
119117 return 1 ;
120118}
119+ public native_vote_will_in_next_round (plugin, params)
120+ {
121+ return g_bVoteInNewRound;
122+ }
121123public plugin_end ()
122124{
123125 if (g_fOldTimeLimit > 0 .0 ) {
@@ -177,6 +179,11 @@ public concmd_stopvote(id, level, cid)
177179
178180 return PLUGIN_HANDLED;
179181}
182+ public clcmd_votemap ()
183+ {
184+ // Block default vote
185+ return PLUGIN_HANDLED;
186+ }
180187public task_checktime ()
181188{
182189 if (is_vote_started () || is_vote_finished () || get_float (TIMELIMIT) <= 0 .0 ) {
@@ -234,6 +241,10 @@ public event_restart()
234241*/
235242public event_intermission ()
236243{
244+ if (task_exists (TASK_DELAYED_CHANGE)) {
245+ log_amx (" Double intermission, how?" );
246+ return ;
247+ }
237248 set_task (get_float (CHATTIME), " delayed_change" , TASK_DELAYED_CHANGE);
238249}
239250public delayed_change ()
0 commit comments