Add AdvDupe2_PreCreateEntity hook. (#458)

I need it to fix model path change in my model pack.
This commit is contained in:
stepa2 2024-01-22 23:43:17 +03:00 committed by GitHub
parent ddd8b76af5
commit f2936d5315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -903,6 +903,7 @@ local function IsAllowed(Player, Class, EntityClass)
end
local function CreateEntityFromTable(EntTable, Player)
hook.Run("AdvDupe2_PreCreateEntity", EntTable, Player)
local EntityClass = duplicator.FindEntityClass(EntTable.Class)
if not IsAllowed(Player, EntTable.Class, EntityClass) then