Code:
new Float:new_round_time;
public plugin_init()
{
register_logevent("on_new_round", 2, "1=Round_Start");
return PLUGIN_CONTINUE;
}
public on_new_round()
{
new_round_time = halflife_time();
return PLUGIN_CONTINUE;
}
stock Float:round_time_left()
{
return get_cvar_float("mp_roundtime") - (halflife_time() - new_round_time);
}
This could help you if you want to spare some lines. You can also replace halflife_time by get_systime function to get less precise integer result. Round_time_left should return round time left in seconds.
__________________