mirror of
https://github.com/fortressforever/fortressforever-scripts.git
synced 2025-04-25 10:41:04 +00:00
Merge pull request #21 from fortressforever/features/ctf-security-timer
adds a timer on the HUD that reflects how long security is down for
This commit is contained in:
commit
b4d26d38c3
1 changed files with 10 additions and 0 deletions
|
@ -53,6 +53,13 @@ function security_off( team )
|
||||||
clip:SetClipFlags({ClipFlags.kClipTeamBlue})
|
clip:SetClipFlags({ClipFlags.kClipTeamBlue})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- add a timer for the security on HUD
|
||||||
|
if team == "red" then
|
||||||
|
AddHudTimerToAll( "red_sec_timer", SECURITY_LENGTH, -1, button_red.iconx, button_red.icony + 15, button_red.iconalign )
|
||||||
|
else
|
||||||
|
AddHudTimerToAll( "blue_sec_timer", SECURITY_LENGTH, -1, button_blue.iconx, button_blue.icony + 15, button_blue.iconalign )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- called when security gets turned on (team is a string prefix, like "red")
|
-- called when security gets turned on (team is a string prefix, like "red")
|
||||||
|
@ -75,6 +82,9 @@ function security_on( team )
|
||||||
clip:SetClipFlags(_G[clipname].clipflags)
|
clip:SetClipFlags(_G[clipname].clipflags)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- remove security timer
|
||||||
|
RemoveHudItemFromAll( team.."_sec_timer" )
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue