mirror of
https://github.com/fortressforever/fortressforever-scripts.git
synced 2024-11-25 14:00:56 +00:00
gives a player fortress points and displays a HUD message whenever a player disables security
This commit is contained in:
parent
c001832e96
commit
827af8a859
1 changed files with 5 additions and 0 deletions
|
@ -88,6 +88,8 @@ function button_common:allowed( allowed_entity )
|
|||
if IsPlayer( allowed_entity ) then
|
||||
local player = CastToPlayer( allowed_entity )
|
||||
if player:GetTeamId() == self.team and player:IsAlive() then
|
||||
player:AddFortPoints(100, "disabled security")
|
||||
ObjectiveNotice( player, "disabled security" )
|
||||
return EVENT_ALLOWED
|
||||
end
|
||||
end
|
||||
|
@ -212,6 +214,9 @@ function base_security_trigger:ontrigger( player )
|
|||
-- only take sec down if its up currently
|
||||
local button = _G[self.button]
|
||||
if button and button.sec_up then
|
||||
local player = CastToPlayer( player )
|
||||
player:AddFortPoints(100, "disabled security")
|
||||
ObjectiveNotice( player, "disabled security" )
|
||||
self:onsecuritydown( player )
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue