Перейти к контенту

Худ


Serafim12

Рекомендуемые сообщения

Знающий

Оригинальная функция выглядит так.

-- Выводим время на HUD

function show_time()
local hud = get_hud()

-- hud:AddCustomStatic("hud_time_tex", true)

local time_h = sr_timer.time2str(level.get_time_hours())
local time_m = sr_timer.time2str(level.get_time_minutes())
hud:AddCustomStatic("hud_timer_text1", true)
cs = hud:GetCustomStatic("hud_timer_text1"):wnd()
cs:SetText(time_h..":"..time_m)

end

 

 

Чтобы отключить часы функция должна выглядить так.

local time_stop = 0

-- Выводим время на HUD
function show_time()
if time_stop==0 then
return
end
local hud = get_hud()

-- hud:AddCustomStatic("hud_time_tex", true)

local time_h = sr_timer.time2str(level.get_time_hours())
local time_m = sr_timer.time2str(level.get_time_minutes())
hud:AddCustomStatic("hud_timer_text1", true)
cs = hud:GetCustomStatic("hud_timer_text1"):wnd()
cs:SetText(time_h..":"..time_m)

end

 

  • Спасибо 1

Поделиться этим сообщением


Ссылка на сообщение
  • Недавно просматривали   0 пользователей

    • Ни один зарегистрированный пользователь не просматривает эту страницу.
×
×
  • Создать...