Configuration
Page dedicated to how to configure our Spawn Selector [V2]
Configuration Guide (config/config.lua & config/default_data.lua)
Behavioral Settings The script's behavior drastically changes depending on whether you are using a character selection screen before it.
-- SET TO TRUE: If you are using qf_identity.
-- qf_identity will manually command the spawn selector to open when needed.
Config.UsingQFIdentity = true
-- Event fired by the "Back" button when you are NOT using qf_identity.
-- e.g. "esx:relog", "qb-multicharacter:client:chooseChar"
Config.RelogEvent = "esx:relog"
-- Shows the "Back" button that returns the player to the character selection.
Config.EnableBackButton = true
-- SET TO TRUE: ONLY if you are NOT using a multicharacter script.
-- This forces the spawn selector to automatically trigger the moment the player connects.
Config.AutoOpen = false
-- Toggles the iconic GTA V "zoom out to clouds, zoom into ground" cinematic camera effect.
Config.UseGTASwitch = true
-- Allows the player to select the exact coordinate where they previously disconnected.
Config.AllowLastLocation = true
-- Camera position while the player is choosing a spawn.
Config.SelectionCoords = vector4(-862.8547, -1606.7404, 52.8938, 353.5509)Danger: Conflicting Triggers If Config.AutoOpen is set to true while a multicharacter script is active, players will experience overlapping UIs, broken cameras, and potential soft-locks. Ensure AutoOpen is strictly false when paired with multicharacter systems.
Appearance & Language
Cinematic Spawn The camera flight played once the player has confirmed their choice.
Defining Spawn Locations
Locations are defined in config/default_data.lua, in the global table DefaultSpawns. You can restrict specific spawns to certain jobs or assign a cost to use a spawn point.
Fields
id
yes
Unique key. Also the primary key in the database.
label
yes
Title shown in the list. name is accepted as an alias.
description
no
Subtitle. desc is accepted as an alias. Only shown for unlocked spawns — paid and locked display a translated line instead.
type
no
unlocked, paid or locked. Defaults to unlocked.
price
no
Only used by paid. Taken from cash first, then from the bank.
coords
yes
vector4, the w component is the heading.
category
no
Free text grouping.
icon
no
Any Iconify name (lucide:tree-pine) or a key of Config.Icons (location, dollar, lock). Falls back to the icon of the type.
jobs
no
List of { name = "police", grade = 0 }. Absent or empty means visible to everyone. The player needs the job and at least that grade.
Spawn types
unlocked— open to everyone, subject tojobs.free,openandpublicare accepted as aliases, and any unrecognised value falls back tounlocked.paid— costsprice. Hidden for a brand new character, since a fresh character cannot pay for it yet.locked— shown greyed out and cannot be selected. Use it as a teaser for locations you unlock later.
default_data.lua is only imported into an empty database. On the first start the spawns are copied into the qf_spawnselector_spawns table, and from that moment the database is the source of truth — later edits to the file appear to do nothing.
While you are building your spawn list, set Config.AlwaysSyncDefaultSpawns = true. The file is then written over the stored rows on every restart. Turn it back off once you are done, otherwise it overwrites changes made in /spawnadmin.
Editing in game
/spawnadmin opens the admin panel, where spawns can be created, edited, reordered, deactivated and deleted — including their job restrictions and icons. Changes are written to the database and pushed to connected players immediately.
Last updated

