diff --git a/docs/hooks/plugin.lua b/docs/hooks/plugin.lua index c4aca3e69..69c16bb70 100644 --- a/docs/hooks/plugin.lua +++ b/docs/hooks/plugin.lua @@ -323,8 +323,12 @@ end function CanPlayerUseDoor(client, entity) end ---- @realm server -function CanPlayerUseVendor(activator) +--- Determines whether a player can use a vendor. +-- @realm server +-- @player activator The player attempting to use the vendor +-- @entity vendor The vendor entity being used +-- @treturn bool Returns false if the player can't use the vendor +function CanPlayerUseVendor(activator, vendor) end --- @realm client diff --git a/plugins/vendor/entities/entities/ix_vendor.lua b/plugins/vendor/entities/entities/ix_vendor.lua index 175a1bf3a..2ec6831eb 100644 --- a/plugins/vendor/entities/entities/ix_vendor.lua +++ b/plugins/vendor/entities/entities/ix_vendor.lua @@ -171,7 +171,7 @@ if (SERVER) then function ENT:Use(activator) local character = activator:GetCharacter() - if (!self:CanAccess(activator) or hook.Run("CanPlayerUseVendor", activator) == false) then + if (!self:CanAccess(activator) or hook.Run("CanPlayerUseVendor", activator, self) == false) then if (self.messages[VENDOR_NOTRADE]) then activator:ChatPrint(self:GetDisplayName()..": "..self.messages[VENDOR_NOTRADE]) else