What OneSync does and how to configure it
OneSync is FiveM’s server-side synchronisation. Without it, clients sync with each other through the server as a relay; with it, the server knows about every entity and decides what each player receives. Almost every modern script expects it, and large player counts require it.
Short answer: Set set onesync on in server.cfg. “On” gives full state awareness and server-determined routing; “legacy” is a compatibility mode for old scripts that expect every player to exist on every client and is not recommended; “off” disables it. Infinity (onesync_enableInfinity, default true) is needed for large player counts — more than 64 slots require OneSync on. It also enables server-side entity natives, entity lockdown and routing buckets.

#The modes
| Mode | Meaning |
|---|---|
on | Full state awareness; the server routes entities to players |
legacy | Compatibility for scripts that expect all players on every client; not recommended |
off | No state awareness; peer-to-peer style relay |
From Cfx.re’s server command documentation.
#Related convars
| Convar | Default | Effect |
|---|---|---|
onesync_enableInfinity | true | Large-scale entity sync; startup only |
onesync_population | true | AI population (traffic, peds) |
onesync_distanceCulling | true | Stops syncing far, out-of-view entities |
onesync_distanceCullVehicles | false | Applies culling to vehicles too |
onesync_forceMigration | true | Migrates entities when the owner leaves |
#What changes for scripts
- A client only knows players and entities near it —
GetActivePlayers()is not everyone on the server. - Send network IDs, not handles — see entity ownership.
- Many natives work on the server:
GetEntityCoords,SetEntityCoords,CreateVehicleServerSetter… - Player data for distant players should come from the server (state bags, events).
#Features that need OneSync
- More than 32 player slots — see max players.
sv_entityLockdownagainst spawned entities.- Routing buckets — see routing buckets.
- Server-side game event filtering (explosions, weapon damage).
Questions
How do I enable OneSync?
set onesync on to server.cfg (txAdmin recipes usually set it for you).What is OneSync Infinity?
onesync_enableInfinity; required for big player counts.Should I use onesync legacy?
Why can my script not see all players?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.