local respawn_delay = 5000 function death_timer_init(e) end function death_timer_main(e) if g_PlayerHealth > 1 then StartTimer(e) elseif GetTimer(e) < respawn_delay then FreezePlayer() FreezeAI() TextCenterOnX(50,45,4,"You are dead, respawning in") TextCenterOnX(50,49,4,round((respawn_delay-GetTimer(e))/1000)) else UnFreezePlayer() UnFreezeAI() end end function death_timer_exit(e) end function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end