We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After calling the native function GetClosestObjectOfType on a non-networked object, the object unexpectedly becomes networked.
GetClosestObjectOfType
The object should remain non-networked unless NetworkRegisterEntityAsNetworked is explicitly called.
-- client.lua RegisterCommand('test', function() local hash = `p_watertower_sm_03_base` local coords = GetEntityCoords(PlayerPedId()) RequestModel(hash) while not HasModelLoaded(hash) do Wait(0) end local object = CreateObjectNoOffset(hash, coords.x + 2.0, coords.y, coords.z) while not DoesEntityExist(object) do Wait(0) end Wait(1000) while not NetworkGetEntityIsNetworked(object) do Wait(0) GetClosestObjectOfType(coords.x, coords.y, coords.z, 10.0, hash) end DeleteEntity(object) end)
There's a workaround
RedM, Natives
RedM ver.10011/prod & ver.10191/canary Server (Windows) 7290 & 10191
No response
The text was updated successfully, but these errors were encountered:
See: https://redm.disquse.me/natives/?_0xE143FA2249364369
The last parameter (networkObject) needs to be false to avoid having the object registered as a network object.
networkObject
false
e.g. GetClosestObjectOfType(coords.x, coords.y, coords.z, 10.0, hash, false, false, false)
GetClosestObjectOfType(coords.x, coords.y, coords.z, 10.0, hash, false, false, false)
Sorry, something went wrong.
The problem still occurs as before even with additional parameterization.
No branches or pull requests
What happened?
After calling the native function
GetClosestObjectOfType
on a non-networked object, the object unexpectedly becomes networked.Expected result
The object should remain non-networked unless NetworkRegisterEntityAsNetworked is explicitly called.
Reproduction steps
Importancy
There's a workaround
Area(s)
RedM, Natives
Specific version(s)
RedM ver.10011/prod & ver.10191/canary
Server (Windows) 7290 & 10191
Additional information
No response
The text was updated successfully, but these errors were encountered: