Queue System
Installation
Installation
1. Drop the resource
Extract suty-queue into resources/[suty]/suty-queue.
2. Discord bot
You need a Discord application + bot token:
- Go to discord.com/developers/applications
- Create application → Bot → Reset Token → copy it
- Turn on the Server Members privileged intent (Bot tab → Privileged Gateway Intents)
- Invite the bot to your Discord server with the
View Memberspermission - Right-click your Discord server → Copy Server ID (Developer Mode must be on)
3. Put the token in server.cfg (not in the config)
Version 1.6.0 and newer. On an older version the token still goes in
config.lua(QueueConfig.DiscordBot.Token) — update to get the safer setup below.
The token lets anyone act as your bot, so it goes in server.cfg. That file lives outside the resource folder, so the token never travels with the script when you update it, send it to someone or upload it. Add these lines before ensure suty-queue:
set suty_queue_bot_token "YOUR_BOT_TOKEN"
set suty_queue_webhook "https://discord.com/api/webhooks/..." # only if you use the live embed (step 8)
Use set, never setr or sets: those are sent to every player / shown in the server list.
Prefer a file? Leave server.cfg alone and fill secrets.lua in the resource folder instead (same two values). It is a server script: FiveM never sends it to players. If both are set, server.cfg wins.
If the token ever leaks: Developer Portal → your app → Bot → Reset Token, then update
server.cfg.
4. Ensure FIRST in server.cfg
The queue intercepts the connection handshake — it MUST boot before any framework or login systems.
set suty_queue_bot_token "YOUR_BOT_TOKEN"
ensure suty-queue
ensure qbx_core # or qb-core / es_extended
5. Set the slot count
In server.cfg:
sv_maxclients 64
The queue uses this to know when the server is full.
6. Discord settings in config.lua
QueueConfig.DiscordBot = {
Active = true,
RequireLink = true, -- player must have Discord linked to FiveM
MustBeInServer = true, -- player must be in your Discord server
UseWhitelist = true, -- only players with the Whitelist role get in
WhitelistRole = 000000000000000000, -- your whitelist role ID
ServerID = 'YOUR_DISCORD_SERVER_ID',
CacheUsers = true,
CacheExpiry = 120,
}
There is no Token here anymore: it is read from server.cfg / secrets.lua (step 3).
7. Priority roles
QueueConfig.RoleHierarchy = {
{name = 'Owner', discordRole = 000000000000000000, value = 1000000},
{name = 'Admin', discordRole = 000000000000000000, value = 800000},
{name = 'VIP', discordRole = 000000000000000000, value = 150000},
{name = 'Whitelist', discordRole = 000000000000000000, value = 100},
-- ... add as many tiers as you need
}
Higher value = better queue position. Role values stack if CombinePoints = true.
With UseWhitelist = true, the player needs the role of the entry named exactly Whitelist — keep that entry, with your whitelist role ID.
8. Pick a design
QueueConfig.Interface = {
Design = 'autopista', -- 'autopista' | 'embarque' | 'carrera' | 'classic'
Brand = '', -- small title above the card ('' = none: the sign already shows it)
Sign = 'YOUR SERVER', -- your server name on the sign / airport / start gantry
Accent = '#ff3b4d', -- main color
Accent2 = '#b3121f', -- second color (gradients)
-- ...
}
All options: Configuration → Interface.
9. (Optional) Live Discord embed
QueueConfig.LiveEmbed = {
Enabled = true,
UpdateInterval = 3, -- seconds (Discord rate-limits ~30/min)
ShowPlayerList = true,
MaxPlayersShown = 15,
}
The webhook URL goes in server.cfg (set suty_queue_webhook "...", step 3) or in secrets.lua.
10. Verify
Test the look without filling your server, from the server console:
queuetest # test mode ON: everyone is held in the queue
queuefill 20 # 20 fake players, to see a full list
queueclear # remove the fake players
queuetest # test mode OFF again
Then connect: you should see the animated card with your position. Try with multiple roles to check the priority.
Keep
QueueConfig.TestEnvironment.Activate = falseon a live server — while test mode is on, nobody gets in.
Updating from an older version
- Copy your settings over to the new
config.lua, so you get the new options (Design,Brand,Sign,Accent,Accent2,AlwaysFirst). An old config withoutDesignkeeps the classic card. - An old config with
Token/WebhookURLstill works, but the console asks you to move them: put them inserver.cfg(step 3) and delete them fromconfig.lua.
