From 827af8a8596a10799ad167bdac9912c5691092e1 Mon Sep 17 00:00:00 2001 From: alaswell Date: Sun, 17 May 2015 19:16:20 -0600 Subject: [PATCH] gives a player fortress points and displays a HUD message whenever a player disables security --- maps/includes/base_shutdown.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maps/includes/base_shutdown.lua b/maps/includes/base_shutdown.lua index ff17040..7319e8f 100644 --- a/maps/includes/base_shutdown.lua +++ b/maps/includes/base_shutdown.lua @@ -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