Merge pull request #38 from Luiggi33/patch-1

CanPermaProp hook
This commit is contained in:
Malboro 2023-11-11 17:19:42 +01:00 committed by GitHub
commit 0eeca85282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,9 @@ function TOOL:LeftClick(trace)
if ent:IsPlayer() then ply:ChatPrint( "That is a player !" ) return end
if ent.PermaProps then ply:ChatPrint( "That entity is already permanent !" ) return end
local canPermaProp = hook.Run("PermaProps.CanPermaProp", ply, ent, self)
if canPermaProp ~= nil and canPermaProp == false then return end
local content = PermaProps.PPGetEntTable(ent)
if not content then return end