Quote:
Originally Posted by v120kaaimcfg
Make the round infinite with mp_round_infinite and set mp_roundtime to a number higher than your_roundtime_cvar(doesn't hurt to be double safe).
Every round start get your_roundtime_cvar value in a global var and create a repeating "b" task with 1.0 sec interval.
Each task call decrement(--) the global var and send a "RoundTime" msg to all players with the global var as the time.
When your global var becomes <= 0 end the round with rg_round_end or a similar function.
This way you'll have "full" control over the round time and you can call any functions whenever during the round.
There could be some visual glitches in the roundtime hud but it'll work.
Seems like a roundabout way of doing it but I can't find a better way so feel free to explore/wait for other replies.
|
I did that:
Code:
public plugin_init(){
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start()
{
new Float:first_count = get_cvar_float("mp_freezetime")
new Float:round_minutes = get_cvar_float("mp_roundtime")
new Float:seconds_per_minutes = 60.0
set_task(first_count + round_minutes * seconds_per_minutes, "task_end_game", TASK_CHECKEND)
}