In short
OneSync is the FiveM system that moves game world sync from players to the server. With OneSync off, a server accepts at most 32 players; with it on (formerly called OneSync Infinity), much higher slot counts are possible. With a free license key, OneSync servers can go up to 48 slots; anything above that requires a Cfx.re Element Club (formerly Patreon) subscription.
In this guide
- What is OneSync and what does it do?
- OneSync modes: off, Legacy and On (Infinity)
- How do you enable OneSync?
- Above 48 slots: Element Club and your license key
- How do more slots affect server resources?
- Writing scripts for a OneSync server
- Checklist before increasing slots
- Example scenario: going from 32 to 64 slots
- Next step: a server that fits your new slot count
OneSync is the FiveM system that syncs the state of vehicles, NPCs and players through the server rather than between players. A FiveM server with OneSync off accepts at most 32 players; to raise the slot count you must turn OneSync on, and to go above 48 slots you also need a Cfx.re Element Club (formerly Patreon) subscription. This guide covers the differences between the modes, how to enable OneSync, and how more slots affect server resources.
What is OneSync and what does it do?
In GTA V's original multiplayer architecture, world sync is managed by one of the players; that model works with few players but causes inconsistencies and cheating opportunities in crowded sessions. OneSync moves this responsibility to FXServer:
- The server knows the world state: the position and owner of every entity (vehicle, ped, prop) are kept on the server. Server-side scripts can query a player's position or vehicle directly.
- Server-side entity creation: vehicles and props can be created from the server, which makes spawning entities with cheats harder.
- State bag support: the modern way to distribute data attached to entities and players consistently to all clients.
- High slot counts: it removes the 32-player limit.
Today, current frameworks like ESX, QBCore and QBox and most popular scripts assume OneSync is on. So even if you run a small 32-slot server, keeping OneSync on is recommended.
OneSync modes: off, Legacy and On (Infinity)
| Mode | server.cfg value | Slots | When to use it |
|---|---|---|---|
| Off | set onesync off | Up to 32 | Only for very old scripts that are not OneSync-compatible |
| Legacy | set onesync legacy | Limited | Old compatibility mode; not recommended for new servers |
| On (Infinity) | set onesync on | Above 32, depending on license tier | The default choice for every new server |
What does OneSync Infinity mean?
"OneSync Infinity" is the old name for the mode enabled today with set onesync on. In this mode, the server sends each player only the players and entities near them (scoping/culling). This keeps the client load reasonable even at high slot counts. It has an important consequence for script authors:
- On the client side,
GetActivePlayers()returns only players in range. You cannot reach a player on the other side of the map from the client. - Tasks that involve all players (global blips, scoreboards, player lists) should be done server-side with
GetPlayers(), and the result sent to clients via events or state bags.
Problems in old scripts like "the blip of a distant player does not show up" usually come from this behavior.
How do you enable OneSync?
OneSync is enabled with a single line in server.cfg. Edit it together with the sv_maxclients line, which sets the slot count:
# OneSync on (Infinity behavior)
set onesync on
# Slot count: can go above 48 if your license tier allows it
sv_maxclients 48
# License key from the Cfx.re portal
sv_licenseKey "lisans_anahtariniz"If you manage your server with txAdmin, the OneSync setting can also be set in txAdmin's FXServer settings. Do not leave conflicting values in both places; managing it from a single source prevents errors. After the change you must fully restart the server; restarting a resource is not enough. For an explanation of every line, see the server.cfg settings guide.
Above 48 slots: Element Club and your license key
A server with OneSync on can run up to 48 slots with the free license key from the Cfx.re portal. To go above 48, the Cfx.re account the license key is tied to must have an Element Club (formerly FiveM Patreon) subscription. Subscription tiers map to different slot limits; since tier names and limits change over time, we recommend checking the current table on Cfx.re's official page.
- Verify the account: check in the portal which Cfx.re account your license key is registered to. For the steps to get a key, see the FiveM license key guide.
- Link the subscription to the same account: the Element Club subscription must match the account that owns the key.
- Raise the sv_maxclients value: do not exceed the limit your tier allows; if you do, the server will not start with the expected slot count.
- Restart the server and check the slot count shown in the server list.
Raising your slot count is a way to meet existing demand, not a way to attract players. If your 48 slots do not fill up regularly, focus on growing your community first.
How do more slots affect server resources?
Slot count alone does not consume RAM; the work generated by the players filling those slots does. Every additional player brings:
- More entities: vehicles, NPCs, props. OneSync tracks all of them on the server side.
- More events and script execution: inventory actions, job loops and phone messages are processed on the main server thread.
- More database queries: actions like saving, purchasing and taking out vehicles add load to MariaDB.
- More network traffic: sync data grows with player count and activity.
A guideline scale (for a medium-load roleplay server based on ESX/QBCore):
| Target slots | Recommended RAM | Recommended cores |
|---|---|---|
| 48 | 6-8 GB | 4 fast cores |
| 64 | 8 GB | 4 fast cores |
| 128 | 12-16 GB | 6 fast cores |
| 200+ | 24 GB or more | 8 or more fast cores |
Because most of the load lands on a single main thread, the CPU's single-core speed matters as much as RAM when you add slots. For a detailed table and calculation, see the guide on how much RAM and CPU a FiveM server needs.
Writing scripts for a OneSync server
To take advantage of what OneSync offers, your scripts need to be written for it too. Especially if you develop your own scripts, adopt these two patterns.
Create vehicles on the server side
Vehicles created on the client depend on the connection of the player who created them and are open to duplication through cheats. With OneSync, you can create the vehicle from the server:
-- server.lua
local model = `adder`
local veh = CreateVehicleServerSetter(model, 'automobile', 215.0, -810.0, 30.7, 90.0)
-- To send the vehicle's network ID to the client
local netId = NetworkGetNetworkIdFromEntity(veh)Use state bags for shared data
Instead of sending information like fuel, lock state or a player's on-duty status to all clients with a flood of events, write it to state bags attached to the entity or player. OneSync distributes that data to the relevant clients on its own:
-- server.lua
Entity(veh).state:set('yakit', 100, true)
Player(source).state:set('gorevde', true, true)
-- client.lua
local yakit = Entity(vehicle).state.yakitThe true in the last parameter means the value is replicated to clients. At high slot counts, these two patterns reduce both network traffic and the load on the server thread.
Checklist before increasing slots
- If you see
server thread hitch warningin the console, fix the problem before adding slots; a bigger crowd makes this warning worse. - Confirm on a test server that your scripts work with OneSync on.
- Add indexes to frequently queried database tables.
- Set up scheduled restarts in txAdmin.
- Make sure your RAM usage stays around 70-75 percent even at peak hours.
Example scenario: going from 32 to 64 slots
Imagine a roleplay server running with OneSync off at 32 slots that wants to grow to 64. The recommended order is:
- Turn on OneSync in a test environment and try all your scripts for at least one evening. Note any errors related to the player list, blips and sync.
- Update incompatible scripts or replace them with current alternatives; move code that loops through all players on the client to the server.
- Go live with 48 slots first. The free license lets you go up to this limit, so you can measure how the load changes.
- Monitor resource usage. If RAM and tick time are comfortable at peak hours, move to 64 slots with an Element Club subscription.
This gradual path lets you catch potential problems with a smaller player base. At each stage, weigh console warnings and player feedback together; if something goes wrong, going back to the previous slot count is a one-line change.
Next step: a server that fits your new slot count
If you plan to go from 48 slots to around 100, the OB-FIVEM-5 FiveM server, with 6 CPUs, 12 GB DDR5 RAM and an 80 GB NVMe disk, is sized to handle the growing entity and script load. For smaller or larger targets, compare all OyunBulut FiveM server plans. Plans are hosted in Istanbul and come with DDoS protection and automatic setup; right after setup you can configure OneSync and slots on your high-slot FiveM plan using the steps in this guide.
Frequently asked questions
Is OneSync paid?
Turning on OneSync is free, and it can be used up to 48 slots with a free license key. Above 48 slots, a Cfx.re Element Club subscription is required.
Are OneSync and OneSync Infinity the same thing?
Yes. The mode enabled today with set onesync on is the one formerly known as OneSync Infinity. The server sends each player only the players and entities near them.
How many players can join with OneSync off?
A FiveM server with OneSync off accepts at most 32 players.
Some of my scripts broke after I enabled OneSync. Why?
Old scripts assume the client can access all players. With OneSync on, the client only sees nearby players, so those operations need to move to the server side.
I set sv_maxclients to 64 but the server stays at 48. Why?
The Cfx.re account your license key is tied to may not have an Element Club subscription that allows more than 48 slots. Check that the subscription is on the same account as the key, then restart the server.