Skip to main content
Everything lives in nex_queue/config.lua. It’s split into five sections:
  1. Config.Server — bot token, IDs, timings
  2. Config.Interface — branding, theme, button row
  3. Config.Tiers — Discord role → tier label
  4. Config.Whitelist — optional role-gated access
  5. Config.Permissions — bypass roles + priority points
Restart nex_queue after editing (restart nex_queue in the console) so changes take effect.

Config.Server — runtime

KeyTypeWhat it does
DiscordServerIDstringYour Discord guild ID. Required.
DiscordBotTokenstringYour bot token. Required. Server-side only.
ReservedSlotsnumberHow many slots off the top of sv_maxclients to keep free for bypassed staff. 0 = use every slot.
HaltDurationnumber (seconds)After a queued player joins, the slot stays “reserved” this long so the next player has time to load in. Default 30.
EmptyQueueWaitnumber (seconds)Fast-track: if a player is the only one in the queue and the server has room, they get in after this many seconds instead of the full wait. 0 = effectively instant.
RefreshRatenumber (ms)How often the player’s queue card re-renders. Default 1000.
SaveFrequencynumber (ms)How often the queue snapshot is persisted to KVP.
DataExpirynumber (seconds)Stale snapshots older than this are discarded on boot.
EnableLiveFeedboolTurn the auto-updating Discord embed on/off.
LiveFeedChannelIDstringChannel ID for the live embed. Required when EnableLiveFeed = true.
DebugModeboolVerbose console logging. Turn off in production.
You do not set the player cap here. NEX Queue reads sv_maxclients directly from your server.cfg. ReservedSlots only carves slots off the top of that number for staff bypass.

Config.Interface — branding

The card the player sees while they wait.

Text

KeyWhat it does
ServerShortNameShort label shown on Boarding Pass / FactSet / Cards themes (e.g. "Divine LA").
TitleThe card’s title bar (e.g. "Queue System").
HeaderHeader text used by the Classic theme.
PosLabel, PrioLabel, TimeLabel, TierLabelTranslate these to your community language if you need.
StatusQueueStatus string while the player is waiting (e.g. "In Priority Queue").
StatusBoardingStatus string when the player is being let in (e.g. "Now Boarding").

Images

KeyRecommended
BannerImageWide banner shown at the top of most themes. Leave "" to hide. ~1500×500 PNG.
ServerIconSquare server logo. Top-left of every card. ~128×128 PNG with transparency.
LoadingGifSpinner used by the Classic theme.
DefaultAvatarFallback avatar for queued players with no Discord avatar set.
AvatarSize"Small", "Medium", or "Large".
Use a CDN or r2.fivemanage.com — Discord-hosted images may rate-limit.

Theme

Config.Interface.Theme = "compactbar"
One of: classic, banner, factset, boardingpass, compactbar, minimal, centered, cards. See Themes for previews.

Buttons

The action-row at the bottom of every theme. Two shapes:
{ title = "Shop",      url    = "https://yourstore.com/" }   -- opens a URL
{ title = "Wait List", action = "waitlist" }                 -- opens an in-card panel listing everyone in queue
You can have up to 3. Use Buttons = {} to hide them.

Config.Tiers — Discord role → tier label

Sets what label shows under the player’s name (Diamond, Gold, etc.). Order matters — the first tier whose role the player holds wins. Put your highest tier on top.
Config.Tiers = {
    { name = "Diamond Tier",  role = "ROLE_ID" },
    { name = "Platinum Tier", role = "ROLE_ID" },
    -- ...
}

Config.DefaultTier = "Standard"   -- shown when the player has none of the roles
This is display only — it doesn’t affect ordering. Ordering comes from Config.Permissions.PriorityLevels below.

Config.Whitelist

Config.Whitelist = {
    Enabled = false,
    Roles = { "ROLE_ID", "ROLE_ID" },
    KickMessage = "This server is whitelist only..."
}
Flip Enabled = true to refuse anyone who doesn’t hold one of Roles. Bypass roles still get in. See Whitelist & priority for details.

Config.Permissions

Config.Permissions = {
    BypassRoles = { "STAFF_ROLE_ID" },

    PriorityLevels = {
        ["DIAMOND_ROLE_ID"]  = 8500,
        ["PLATINUM_ROLE_ID"] = 5000,
        -- ...
    }
}
  • BypassRoles — anyone in any of these roles skips the queue entirely (and the whitelist).
  • PriorityLevelsroleId → points. A player’s effective priority is the sum of points across all matching roles they hold. Higher = served first.
Full breakdown in Whitelist & priority.

Persistence — how the queue survives restarts

The queue is held in memory and a snapshot is written to KVP every SaveFrequency ms. On boot, snapshots older than DataExpiry seconds are thrown away, so a player who disconnected hours ago won’t magically reappear at the front. You don’t manage any files — there’s nothing to back up.

Restart vs. hot-reload

ChangeNeeds restart nex_queue?
Anything in Config.ServerYes
Config.Interface.ThemeNo — see Themes — hot-swap
Any other Config.Interface text/image keyYes
Config.TiersYes
Config.WhitelistYes
Config.PermissionsYes

Runtime exports

You can read queue state from your other scripts. All exports are namespaced to nex_queue.
ExportReturns
exports.nex_queue:GetNexQueueCount()Total players currently in queue
exports.nex_queue:GetNexQueueFullList()Sorted list of waiters (highest priority first)
exports.nex_queue:GetPlayerNexStatus(src)Per-player snapshot (priority, tier, position, etc.)
exports.nex_queue:GetNexThemeList()List of every valid theme name
exports.nex_queue:GetNexActiveTheme()The currently active theme
exports.nex_queue:SetNexActiveTheme("themeName")Swap theme without a restart
exports.nex_queue:GetDiscordName(src)The connecting player’s Discord username
exports.nex_queue:GetDiscordNickname(src)Their server nickname
exports.nex_queue:GetDiscordAvatar(src)URL to their avatar
exports.nex_queue:GetDiscordRoles(src)Array of role IDs they hold
exports.nex_queue:GetGuildName()Your guild name
exports.nex_queue:GetGuildMemberCount()Approximate member count
exports.nex_queue:GetGuildOnlineMemberCount()Approximate online count
exports.nex_queue:GetGuildIcon()URL to your guild icon
exports.nex_queue:GetGuildRoleList()The full role list, cached from Discord
Useful for things like an in-game /online command, a dashboard widget, or wiring tier info into your hud.