Alka's code will not work. I believe he just thought that you need to check if mp_roundtime CVar value is equal to 0. But this is not the case here.
This is the only way to do it
Code:
#include <amxmodx>
#define TASK_ID 934279423
new g_pcvar_mp_roundtime
public plugin_init() {
register_event("HLTV", "remove_existing_task", "a", "1=0", "2=0")
register_logevent("logevent_round_start", 2, "1=Round_Start")
register_logevent("remove_existing_task", 3, "2=Planted_The_Bomb")
g_pcvar_mp_roundtime = get_cvar_pointer("mp_roundtime")
}
public logevent_round_start() {
set_task(float(floatround(get_pcvar_float(g_pcvar_mp_roundtime) * 60.0, floatround_floor)), "time_is_up", TASK_ID)
}
public time_is_up() {
set_cvar_num("sv_restart", 1)
}
public remove_existing_task() {
if (task_exists(TASK_ID))
remove_task(TASK_ID)
}