1
0
Fork 0
forked from Simnation/Main
Main/resources/[tools]/mt_lib/modules/createProp/client.lua
2025-06-25 00:04:15 +02:00

17 lines
No EOL
537 B
Lua

---@param model string
---@param coords table
---@param heading number
---@return integer | nil
local createProp = function(model, coords, heading)
lib.requestModel(model, 5)
local prop = CreateObject(GetHashKey(model), coords.x, coords.y, coords.z, false, false, false)
if DoesEntityExist(prop) then
SetEntityHeading(prop, heading)
FreezeEntityPosition(prop, true)
return prop
else
print("Failed to create prop: " .. model)
return nil
end
end
exports("createProp", createProp)