small update

target got a print if onSelect or action are nil

also added groups in fixoptions for sleepless

client entities using return for loadmodel
This commit is contained in:
Mr.Crowley committed 2025-07-24 05:03:07 -05:00
1 parent 07b76868f2
commit 2ad1f4669c
4 files changed
+16 -12

No files matched your search

+3 -3
View File
@@ -12,15 +12,15 @@ local function SpawnEntity(entityData)
-- for k, v in pairs(entityData.args) do
-- print(string.format("SpawnEntity %s: %s", k, v))
-- end
local model = entityData.model and type(entityData.model) == 'string' and GetHashKey(entityData.model) or entityData.model
if model and not Utility.LoadModel(model) then
local loaded, model = Utility.GetModel(entityData.model)
if not loaded then
print(string.format("[ClientEntity] Failed to load model %s for entity %s", entityData.model, entityData.id))
return
end
local entity = nil
local coords = entityData.coords
local rotation = entityData.rotation or vector3(0.0, 0.0, 0.0) -- Default rotation if not provided
local rotation = entityData.rotation or vector3(0.0, 0.0, entityData.heading or 0.0) -- Default rotation if not provided
if entityData.entityType == 'object' then
entity = CreateObject(model, coords.x, coords.y, coords.z, false, false, false)