Queue System
Configuration
Configuration
Files you can edit
| File | What is in it |
|---|---|
config.lua |
Every setting on this page |
secrets.lua |
Bot token + live embed webhook, if you don't put them in server.cfg (Installation → step 3) |
locales/en.lua, locales/es.lua |
Every text players see |
These files are not encrypted. All settings use the QueueConfig.* namespace — the bottom of config.lua maps them to the legacy Config.* namespace (don't edit that section).
Locale
QueueConfig.Locale = 'en' -- 'en' (English) | 'es' (Spanish)
Server behavior
QueueConfig.Server = {
ConnectionSpeed = 3, -- countdown shown to a player before they load in (seconds)
QueueSize = 10, -- queue list size (classic card)
LogToConsole = true, -- queue events in the server console
DeveloperMode = false, -- debug messages
AllowDuplicateDiscord = false, -- testing only: the same Discord twice in the queue
ConnectionDelay = 25, -- delay between connections when < 5 slots are free (seconds)
MinQueueTime = 10, -- minimum seconds in queue, even with free slots
-- Kept so older configs load; they have no effect:
-- StartupDelay, RefreshRate, ShowInServerName, KeepAliveInterval, MaxWaitTime, PreQueueCheck
-- Connection spam protection: repeated attempts within the window are rejected
ConnectionRateLimit = true, -- true = by IP. Behind a proxy/CDN use false (by license)
ConnectionRateLimitWindow = 10, -- seconds
DynamicDelay = true, -- scale the connection delay by free slots
DynamicDelayTiers = {
{ slots = 20, delay = 3 }, -- 20+ slots free → 3s between connections
{ slots = 10, delay = 8 }, -- 10-19 → 8s
{ slots = 5, delay = 15 }, -- 5-9 → 15s
-- < 5 slots → ConnectionDelay (25s)
},
ChatEnabled = true, -- chat between players in queue (Queue Chat button)
ChatMaxMessages = 8,
ChatRateLimit = 3, -- seconds between messages per player
ChatRefreshRate = 5000,
}
Behind a proxy or CDN (Playflare, Zap, Cloudflare…): every player arrives with the proxy's IP, so
ConnectionRateLimit = truemakes players block each other. Set it tofalse.
Priority system
QueueConfig.Priority = {
CombinePoints = true, -- stack multiple roles together
ReconnectGrace = {
Enabled = true,
BonusPoints = 40000, -- higher than any role for a fast reconnect
Duration = 3000, -- grace duration (seconds) = 50 min
},
BaseLevel = {
Points = 10, -- base priority for players without roles
Name = "Player",
},
-- Silent ban — players with this role NEVER leave the queue
PermanentQueue = {
Enabled = false,
Roles = {
000000000000000000, -- your "silent ban" Discord role ID
},
},
-- Discord accounts that are always first in line, whatever their roles (e.g. the owner)
AlwaysFirst = { 'discord:000000000000000000' },
}
Silent ban is the kill feature: tag a Discord role as "permanent queue" and give it to suspected cheaters. They see a normal queue and position updates, but they NEVER enter the server. They eventually quit thinking it's a slow server.
AlwaysFirst takes Discord IDs ('discord:123…' or just '123…'). Empty {} = nobody.
Discord bot
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, -- seconds
}
- The bot token is not here: it is read from
server.cfg(set suty_queue_bot_token "...") orsecrets.lua— see Installation → step 3. - Whitelist: the player needs the role of the
RoleHierarchyentry named exactlyWhitelist. Put your whitelist role ID there (and inWhitelistRole). - A player who is not in your Discord server gets no roles: with
UseWhitelist = truethey are rejected, otherwise they queue with the base priority.
Secrets
| Value | server.cfg (recommended) |
or secrets.lua |
|---|---|---|
| Bot token | set suty_queue_bot_token "..." |
BotToken = '...' |
| Live embed webhook | set suty_queue_webhook "..." |
LiveEmbedWebhook = '...' |
server.cfg wins when both are set. Always set — never setr / sets. The resource has no client scripts, so neither value ever reaches a player.
Role hierarchy (priority tiers)
QueueConfig.RoleHierarchy = {
{name = 'Owner', discordRole = 000000000000000000, value = 1000000},
{name = 'Admin', discordRole = 000000000000000000, value = 800000},
{name = 'Moderator', discordRole = 000000000000000000, value = 700000},
{name = 'VIP Diamond', discordRole = 000000000000000000, value = 200000},
{name = 'VIP Gold', discordRole = 000000000000000000, value = 150000},
{name = 'Streamer', discordRole = 000000000000000000, value = 75000},
{name = 'Booster', discordRole = 000000000000000000, value = 25000},
{name = 'Whitelist', discordRole = 000000000000000000, value = 100},
-- ...
}
Higher value = better position. With CombinePoints = true, a VIP + Streamer + Booster player gets the SUM of all three. The name is what the card shows as the player's priority.
Interface
QueueConfig.Interface = {
Design = 'autopista', -- 'autopista' (Highway) | 'embarque' (Boarding) | 'carrera' (Race) | 'classic'
Brand = '', -- small title above the animated card ('' = none: the sign already shows it)
Sign = 'YOUR SERVER', -- your name on the road sign / airport sign / start gantry (nil = locale text)
Accent = '#ff3b4d', -- main color of the animated cards
Accent2 = '#b3121f', -- second color (gradients)
HeaderImage = 'YOUR_BANNER_IMAGE_URL_HERE', -- banner (GIF/PNG) on the classic card and the queue chat
WelcomeMessage = L('WelcomeMessage'), -- welcome text on the classic card and the queue chat
Elements = {
QueueList = { -- "queue list" button (classic card; the animated cards show the list)
show = true,
text = L('QueueList'),
iconURL = 'https://cdn.n4.gg/queue.png',
style = 'destructive',
},
DiscordInvite = { -- Discord button (every design)
show = true,
text = 'Discord',
iconURL = 'https://cdn.n4.gg/discord.png',
link = 'https://discord.gg/YOUR_INVITE',
style = 'destructive',
},
},
}
What each design shows
| Highway / Boarding / Race | Classic | |
|---|---|---|
| Position | Big number, animated when it goes up | Text |
| Time in queue + priority | ✅ | ✅ |
| Queue list | First 10 + "N more" (your row always shows) | Queue list button |
| Discord button | ✅ (DiscordInvite) |
✅ |
| Queue Chat button | ✅ (ChatEnabled) |
✅ |
| Banner image | — | ✅ (HeaderImage) |
Card texts
The animated cards take their texts from locales/en.lua / locales/es.lua — the keys that start with Draw:
| Key | Default (en) |
|---|---|
DrawTitle |
You are in the queue |
DrawOfTotal |
of %d in queue |
DrawNextTitle / DrawNextSub |
You are next / Getting you in… |
DrawChipWaiting / DrawChipPriority |
IN QUEUE / PRIORITY |
DrawAhead |
THE QUEUE NOW |
DrawGap |
· · · %d more · · · |
DrawSign |
Sign text when Sign is nil |
DrawSignSub / DrawSignNext |
City entrance / Way in (Highway) |
DrawRunway / DrawRunwayNext |
Runway 01 · Arrivals / Runway clear · Land (Boarding) |
DrawRaceGp / DrawRaceTower / DrawRaceLive |
GRAND PRIX / ON TRACK / LIVE (Race) |
Live embed
QueueConfig.LiveEmbed = {
Enabled = false,
UpdateInterval = 3, -- min seconds between updates (Discord limit)
Color = 0xFF6B35,
Title = L('LiveEmbedTitle'),
FooterText = 'Queue System',
ServerName = 'My Server',
ShowPlayerList = true,
MaxPlayersShown = 15,
}
The webhook URL goes in server.cfg / secrets.lua (see Secrets above).
Force queue
QueueConfig.ForceQueue = {
Enabled = false, -- true = ALL players go through the queue even with empty slots
}
Useful to show your card to every connection (each player waits at least Server.MinQueueTime).
Test mode
QueueConfig.TestEnvironment = {
Activate = false, -- true holds EVERY player in the queue — never on a live server
MaxTestPlayers = 1,
}
The console command queuetest switches it on/off without a restart (Commands).
