Skip to main content
The n4_queue resource ships as a folder named n4_queue.
At the root of that folder is a config.cfg file with sane defaults.
By default, you should execute this file before starting the resource:
You can also copy any of the set "queue:..." convars into any other .cfg file (for example, your main server.cfg) as long as that file is executed before ensure n4_queue.

Core behavior

queue:manual_connection (advanced)

  • When 0 (default): n4_queue automatically hooks the playerConnecting event and manages the entire join flow. You just install the resource and configure convars; it is plug‑and‑play.
  • When 1:
    • n4_queue exposes a server export HandleConnection(name, source, deferrals, identifier?).
    • You must create your own playerConnecting handler and call HandleConnection last, after all your own checks (bans, frameworks, whitelists, etc.).
    • Once HandleConnection is called, the queue takes over and runs its normal connection logic (deferrals, queue UI, etc.).
Basic CfxLua 5.4 example:
Use this mode if you need full control over the connection pipeline; otherwise, leave queue:manual_connection at 0 for the simplest setup.

Grace priority

Discord integration

For queue:discord:prio_roles, do not put a comma after the last role ID, and do not include comments inside the object.

Card, UI & timing

Placeholders available in cards include {{logo_url}}, {{position}}, {{queueLength}}, {{points}}, {{timeEmoji}}, {{hours}}, {{minutes}}, {{seconds}}, {{estimatedWait}}, {{card_*}}, {{website_url}}, {{discord_url}}, {{server_name}}, {{max_slots}}, {{reserved_slots}}, and {{available_slots}}. For Queue List / View Points / Back to work actions, use Action.Submit with ids players_card, points_card, or go_back. See cards/example.json in the resource.

Slots, bypass & logging

These convars are used by the queue for website and Discord links shown on the card.
You can set them here or reuse the same values across other resources:

Full example configuration

Below is a full example you can paste into server.cfg and then adjust for your server: