Configure OneSync and the FiveM slot count
Enable OneSync and adjust sv_maxclients to scale up to 128 slots without network hitching.
Configure OneSync and the FiveM slot count
OneSync is FiveM’s network synchronization system that lets you push past the native 32-player limit. Configuring it comes down to two lines in server.cfg.
Cause / The problem
Past 32 players, GTA Online’s vanilla network cannot keep up: invisible entities, vehicle desync, latency. OneSync fixes these issues but must be explicitly enabled and paired with a consistent sv_maxclients.
Solution
- Enable OneSync in
server.cfgby adding one of these lines:onesync on— Infinity mode, recommended (every player sees every entity).onesync legacy— backward compatibility with older scripts.
- Set the slot count with
sv_maxclients. The value must be a power of 2:- 32 slots: available to everyone.
- 64 slots: requires OneSync enabled.
- 128+ slots: requires the Element Club (Cfx.re Patreon subscription).
- Optimize the network for large slot counts:
set onesync on set sv_maxclients 64 set sv_enforceGameBuild 3095 - Check your scripts: some old scripts use
GetPlayerPed(-1)which no longer works under OneSync. UseGetPlayerPed(source)instead. - Use routing buckets to isolate zones or instances (race sessions, inventory menus) and relieve the network.
Restart the server after every server.cfg change.