🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

FiveM OneSync Setup – Infinity vs Legacy & server.cfg Guide

Quick answer: Enable OneSync in server.cfg for 32+ players – use Infinity for new RP servers, Legacy for older scripts. Set onesync on and pick the right mode.

OneSync is FiveM's synchronization system that increases the player count beyond the original 32 slots and improves network performance. This guide explains the different modes, their advantages and disadvantages, and how to set them up optimally for your server.

Note: More guides on server optimization and troubleshooting can be found in the left navigation.

What is OneSync?

OneSync replaces the original GTA V network system with a more efficient, server-controlled synchronization. It enables:

The Three OneSync Modes

Mode Max Players Distance Culling Recommended For
Off 32 No Test servers, very old scripts
Legacy 48 No (global sync) Old ESX servers, scripts from 2017-2019
Infinity 1024+ Yes (424 units radius) Modern servers, QBCore, recommended

OneSync Infinity vs. Legacy

Infinity (Recommended)

Infinity uses distance-based streaming – players only receive data from entities in their vicinity. This massively reduces network load and enables larger player counts. All modern frameworks like QBCore are optimized for it.

Legacy

In Legacy, all player data is synchronized globally – every player gets data from everyone else. This puts more strain on the network, but is compatible with older scripts that rely on global player queries.

Configuring OneSync in server.cfg

Basic Configuration

# Enable OneSync Infinity (recommended)
set onesync on

# Maximum number of players
sv_maxclients 64

Advanced Configuration

# OneSync Infinity
set onesync on

# Legacy mode (only if necessary)
# set onesync legacy

# Enable population (NPCs)
set onesync_population true

# Enable distance culling (on by default)
set onesync_culling true

# Vehicle culling (hide vehicles outside view range)
set onesync_distanceCullVehicles false

# Culling distance in units (default: 424)
set onesync_distanceCull 500

# Adjust frequency based on distance
set onesync_radiusFrequency true

# Vehicle culling for occupied vehicles
set onesync_vehicleCulling false

Important OneSync Configuration Variables

Variable Default Description
onesync off OneSync mode: on (Infinity), legacy, off
onesync_population false Enable NPC population on the server
onesync_culling true Distance-based hiding of entities
onesync_radiusFrequency true Adjust sync frequency based on distance
onesync_distanceCull 424 Distance in units at which entities are hidden
onesync_vehicleCulling false Enable culling for occupied vehicles
onesync_distanceCullVehicles true Hide vehicles outside view range

Routing Buckets – Dividing Players into Zones

Routing Buckets are an advanced OneSync feature that lets you divide players into separate synchronization zones. Players in different buckets don't see each other:

-- Move a player to a different bucket
SetPlayerRoutingBucket(playerId, bucketId)

-- Query current bucket
GetPlayerRoutingBucket(playerId)

-- Enable population in a bucket
SetRoutingBucketPopulationEnabled(bucketId, true)

This is useful for:

Common Problems and Solutions

Players don't see each other on the map / Blips missing:

Invisible players:

NPCs don't spawn:

Synchronization issues after switching from Legacy to Infinity:

Recommended OneSync Configuration

For most servers we recommend these settings:

# === ONESYNC (Recommended for modern servers) ===
set onesync on
set onesync_population true
set onesync_culling true
set onesync_radiusFrequency true
set onesync_distanceCull 500
set onesync_distanceCullVehicles false
set onesync_vehicleCulling false

For servers with very old scripts that need global player visibility:

# === ONESYNC LEGACY (Only for old scripts) ===
set onesync legacy
set onesync_population true

Frequently asked questions (FAQ)

What is OneSync in FiveM?
OneSync is FiveM's sync system for more than 32 players and better network performance through distance culling.
OneSync Infinity or Legacy?
Infinity for new RP servers with many players (64–128+). Legacy for older scripts. Off only for testing or very old setups.
Where do I enable OneSync?
In server.cfg: onesync on (or onesync_enableInfinity 1 for Infinity mode).

NexoraHost

Order your game server

Minecraft, ARK, FiveM & 24+ games – 1-click install, mods allowed, from €4.99/mo.

nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime