mirror of
https://github.com/MalboroDEV/PermaProps.git
synced 2025-03-04 03:13:21 -05:00
feat: CanPermaProp hook
Return false to prevent a player from perma propping a ent
This commit is contained in:
parent
7a92d6f2bd
commit
28f6681f89
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user