Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugins/doors/entities/weapons/nut_keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ function SWEP:PrimaryAttack()
data.filter = self.Owner
local entity = util.TraceLine(data).Entity

if (hook.Run("KeyLockOverride",self:GetOwner(),entity)) then
return
end

--[[
Locks the entity if the contiditon fits:
1. The entity is door and client has access to the door.
Expand Down Expand Up @@ -192,6 +196,9 @@ function SWEP:SecondaryAttack()
data.filter = self.Owner
local entity = util.TraceLine(data).Entity

if (hook.Run("KeyUnlockOverride",self:GetOwner(),entity)) then
return
end

--[[
Unlocks the entity if the contiditon fits:
Expand Down