Setting for flag alerts
This commit is contained in:
parent
f7890cdf66
commit
92d813b090
@ -28,8 +28,12 @@ end)
|
||||
|
||||
ctf.hud.register_part(function(player, name, tplayer)
|
||||
-- Check all flags
|
||||
local alert = "Punch the enemy flag! Protect your flag!"
|
||||
local alert = nil
|
||||
local color = "0xFFFFFF"
|
||||
if ctf.setting("flag.alerts") then
|
||||
if ctf.setting("flag.alerts.neutral_alert") then
|
||||
alert = "Punch the enemy flag! Protect your flag!"
|
||||
end
|
||||
local claimed = ctf_flag.collect_claimed()
|
||||
for _, flag in pairs(claimed) do
|
||||
if flag.claimed.player == name then
|
||||
@ -45,6 +49,7 @@ ctf.hud.register_part(function(player, name, tplayer)
|
||||
color = "0xFF0000"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Display alert
|
||||
if alert then
|
||||
|
@ -10,6 +10,8 @@ ctf.register_on_init(function()
|
||||
ctf._set("flag.capture_mode", "take")
|
||||
ctf._set("flag.drop_time", 7*60)
|
||||
ctf._set("flag.drop_warn_time", 60)
|
||||
ctf._set("flag.alerts", true)
|
||||
ctf._set("flag.alerts.neutral_alert", true)
|
||||
ctf._set("gui.team.teleport_to_flag", true)
|
||||
ctf._set("gui.team.teleport_to_spawn", false)
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user