Queues and priority for full FiveM servers

10 min read4 sections · 4 questions answered
Short answer

A queue resource holds players in playerConnecting deferrals, sorts them by priority and join time, updates each one’s position every few seconds with deferrals.update, and admits the first player whenever the online count drops below sv_maxclients. Priority comes from identifiers, Discord roles or database flags. Give crashed players a short grace period, keep a slot or two for staff, and publish your priority rules.

When a server is full at peak time, players either give up or wait. A queue turns “Server is full” into “You are 12th in line, about 4 minutes” — and a priority system lets staff, long-time members or supporters skip ahead. Done badly, it becomes the most-hated part of a server.

How a queue works

  1. 1Player connects → the queue calls deferrals.defer() and adds them to a list with their priority and join time.
  2. 2A loop sorts the list and sends each player deferrals.update('Position 5/23 – about 3 min').
  3. 3When the number of players online is below sv_maxclients, the first entry gets deferrals.done().
  4. 4Players who cancel are removed when their deferral is dropped.

Deferral basics: deferrals.

Where priority comes from

SourceExample
Identifier listStaff licences in a config file
Discord rolesA bot checks roles; each role maps to a priority value
DatabasePriority stored per player, set by staff or purchases
Time-basedPlayers who crashed in the last few minutes get back in first

Fairness rules that work

  • Cap priority levels (for example 3) so the top tier cannot starve the rest.
  • Show the reason: “Priority: Staff” or “Priority: Reconnect”.
  • Give a 3–5 minute reconnect grace after a crash.
  • Keep one or two slots for staff so moderation is always possible.

When the queue gets stuck

SymptomCheck
Queue never movesPlayer count includes ghosts — compare with GetNumPlayerIndices()
Players join then drop instantlyAnother resource refuses them later in the deferral chain
Positions jump aroundPriority recalculated each loop from slow API calls — cache it
Queue works, players stuck on ConnectingA deferral path without done

Common questions

How do FiveM queues work?

A resource holds connecting players in deferrals, orders them by priority and join time, and admits one whenever a slot frees up.

How do I give Discord roles queue priority?

Look up the player’s roles with a Discord bot during connecting and map each role to a priority value in the queue.

Can I reserve slots for staff?

Yes — most queue resources can admit staff when the server is full or keep slots free for them.

Why does my queue not move?

Usually the online count is wrong or another resource refuses players. Check the player count and the deferral chain.

Want a loading screen you never have to debug?

Build it in the browser, export once, and edit it whenever — no HTML, no re-uploads.

Start free

More guides