чуть чуть накосячил на проверке.
local time_nlr = 10
local end_nlr = 0
local CurTime = CurTime
local draw_SimpleTextOutlined = draw.SimpleTextOutlined
local TEXT_ALIGN_CENTER = TEXT_ALIGN_CENTER
local TEXT_ALIGN_TOP = TEXT_ALIGN_TOP
local COLOR_WHITE = Color(255, 255, 255)
local COLOR_BLACK = Color(0, 0, 0)
local w = ScrW()
local h = ScrH()
surface.CreateFont('TheShitFont',
{ font = "Trebuchet24", size = (h + w) * .011, weight = 300, blursize = 0, scanlines = 0, antialias = false, underline = false, italic = false, strikeout = false,
symbol = false, rotary = false, shadow = true, additive = false, outline = false,
} )
gameevent.Listen("entity_killed")
local Format = Format
local math_floor = math.floor
local function FormatTime(time)
local m = math_floor(time / 60)
local s = time
return Format('%sм:%sс', m, math_floor(s - m * 60))
end
hook.Add( "entity_killed", "entity_killed_example", function(data)
local index = data.entindex_killed
if index ~= LocalPlayer():EntIndex() then return end
end_nlr = CurTime() + time_nlr
hook.Add( "HUDPaint", "NLR_simple", function()
local cur = CurTime()
if end_nlr <= cur then
hook.Remove("HUDPaint", "NLR_simple")
return
end
draw_SimpleTextOutlined("NLR " .. FormatTime(end_nlr - cur), 'TheShitFont', w / 2, 60, COLOR_WHITE, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, COLOR_BLACK)
end )
end )