Queue System
Installation
Installation
1. Drop the resource
Extract suty-queue into resources/[suty]/suty-queue.
2. Ensure FIRST in server.cfg
The queue intercepts the connection handshake — it MUST boot before any framework or login systems.
ensure suty-queue
ensure qbx_core # or qb-core / es_extended
3. Set the slot count
In server.cfg:
sv_maxclients 64
The queue uses this to determine when the server is full.
4. Discord bot setup
You need a Discord application + bot token:
- Go to discord.com/developers/applications
- Create application → Bot → copy token
- Bot needs the Server Members privileged intent (toggle in Bot tab)
- Invite the bot to your Discord guild with
View Memberspermission - Right-click your guild → Copy Server ID (Developer Mode must be on)
Then in config.lua:
QueueConfig.DiscordBot = {
Active = true,
RequireLink = true, -- player must have Discord linked to FiveM
MustBeInServer = true, -- player must be IN your guild
UseWhitelist = true, -- require WhitelistRole to enter queue
WhitelistRole = 1422487076003119114, -- Discord role ID
Token = 'YOUR_BOT_TOKEN',
ServerID = 'YOUR_GUILD_ID',
}
5. Configure priority roles
QueueConfig.RoleHierarchy = {
{name = 'Owner', discordRole = 1320233886214787072, value = 850000},
{name = 'Admins', discordRole = 1320234519873323082, value = 200000},
{name = 'VIP', discordRole = 1320237013395443794, value = 150000},
-- ... add as many tiers as you need
}
Higher value = better queue position. Role values stack if CombinePoints = true.
6. (Optional) Live Discord embed
QueueConfig.LiveEmbed = {
Enabled = true,
WebhookURL = 'https://discord.com/api/webhooks/...',
UpdateInterval = 3, -- seconds (Discord rate-limits ~30/min)
ShowPlayerList = true,
MaxPlayersShown = 15,
}
Posts a live-updating embed in a Discord channel showing who's in queue right now.
7. Verify
- Fill the server past
sv_maxclients(or setForceQueue.Enabled = trueto test with empty slots) - New connections should see the welcome card with queue position
- Try with multiple roles to verify priority works
