Repository navigation
[Bug] Clients Unable to Spawn Mission Entities When SetRoutingBucketPopulationEnabled is false. #418
Replies: 3 comments
|
Thanks, we are looking into this. |
|
This is still happening on server One thing I found that might help: it isn't population being off that blocks client spawning. It's a player being in the bucket when it gets switched off. Players who enter the bucket after the change are fine.
When it's stuck, the client creates the entity, networks it, gets a network ID and owns it. I've personally hit this because our race system takes a bucket, switches its population off, and moves the racers in during the same tick. So every car created for a race never reaches the server to be networked for everyone in the bucket. Repro
server.lua local nextBucket = 40000
RegisterCommand('repro', function(source, args)
local bucket = nextBucket
nextBucket = nextBucket + 1
if args[1] ~= 'control' then
SetRoutingBucketPopulationEnabled(bucket, false)
end
SetPlayerRoutingBucket(source, bucket)
print(('player moved to bucket %s (%s), spawning a car'):format(bucket, args[1] or 'population off'))
TriggerClientEvent('repro:spawn', source)
end, false)
AddEventHandler('entityCreating', function(entity)
print(('server received entity %s in bucket %s'):format(entity, GetEntityRoutingBucket(entity)))
end)client.lua RegisterNetEvent('repro:spawn', function()
local model = `adder`
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
local coords = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 6.0, 0.5)
local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, 0.0, true, false)
Wait(1000)
print(('[repro] client created vehicle netId=%s'):format(NetworkGetNetworkIdFromEntity(vehicle)))
end)WorkaroundPre-assign each bucket's population before any player enters it. In my server, I made it so that every bucket's population is disabled at resource start, then only call |
|
Hello, |
Uh oh!
There was an error while loading. Please reload this page.
Summary
When
SetRoutingBucketPopulationEnabled(0, false)is applied, clients are unable to spawn networkedmissionentities, even though disabling population should only prevent nonmissionentities from spawning. (Ex. "AI" peds and vehicles)As a side note, using
CreateVehicleRPC (Server) still works as intended. SettingSetRoutingBucketEntityLockdownModetoinactivehas no effect on the issue. (Works as intended)This affects all entities including pickups, peds, objects, and vehicles.
Issue type
Both / Unsure
Repro rate
Always
Server build version
FXServer-early-access b119 win32
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
Windows
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
Yes
Hosting provider
Self-hosted
Machine type
Dedicated
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
SetRoutingBucketPopulationEnabled(0, false)CreateVehicleor equivalent on the client (netMissionEntity, isNetwork astrue)Expected Behavior
SetRoutingBucketPopulationEnabledshould only control the spawning of nonmissionentities within the specified bucket.See: https://docs.fivem.net/natives/?_0xCE51AC2C
Actual Behavior
Setting
SetRoutingBucketPopulationEnabledtofalsefor a routing bucket, such as bucket 0, disables all client-side entity spawning. Client side spawning should instead be controlled bySetRoutingBucketEntityLockdownMode.Evidence
2026-08-15.08-45-18_compressed.mp4
Additional Context
Server (Repo Test)
Client (Repo Test)
All reactions