1. Client (production/canary) and FXServer version
Client: Production
FXServer: Linux 3352
2. What you expected to happen
Expecting CreateObject() on the server to return the Object ID handle
3. What actually happens
CreateObject() returns the model hash that was given to it
4. Category of Bug
OneSync Infinity - Server
5. Reproducible steps, preferably with example script(s)
RegisterCommand('testobject', function(ply,a,r)
local pos = vector3(-447.72,6350.47,12.63)
if ply ~= 0 then pos = GetEntityCoords(GetPlayerPed(ply)) end
local mdl = GetHashKey("prop_waterwheela")
local obj = CreateObject(mdl, pos, true, true, false)
if DoesEntityExist(obj) then print("^1Object Exists.^7")
else print("^1Object does NOT exist.^7")
end
print("Player: ", ply);print("Position: ", pos)
print("Model: ", mdl);print("Object: ", obj)
Citizen.Wait(12000)
DeleteEntity(obj)
end)
Result from the console typed from within game:
Result from the console when typed in the terminal:
According to the citizenfx/five repo, CreateObject is supposed to be a OneSync native. I’m fairly confident it’s not user error, since CreateObject returns zero if it fails, not the model hash that was given to it. But, I’ve been wrong before. Happy to help where I can. Appreciate all you guys do.
Note: The object doesn’t appear in game.