> For the complete documentation index, see [llms.txt](https://feron-scripts.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://feron-scripts.gitbook.io/welcome/scripts/feron-spawnselector/config.md).

# Config

Full annotated `config.lua` for both editions.

{% tabs %}
{% tab title="QBCore" %}

```lua
-- ============================================================
-- config.lua — Feron Spawn Selector
-- ============================================================

Config = {}

-- -------------------------------------------------------
-- FRAMEWORK
-- "newqb"  → Modern QBCore (exports["qb-core"])
-- "oldqb"  → Legacy QBCore (TriggerEvent based)
-- "esx"    → ESX (exports["es_extended"])
-- -------------------------------------------------------
Config.Framework = "newqb"

-- -------------------------------------------------------
-- CLIENT NOTIFY
-- Customize this to use your own notification system.
-- -------------------------------------------------------
Config.Notify = function(text, notifType)
    QBCore.Functions.Notify(text, notifType)
end

-- -------------------------------------------------------
-- SPAWN LOCATIONS
-- Each location has a camera position for preview.
-- cam = { coords, pointAt } — camera position + look-at target
-- -------------------------------------------------------
Config.SpawnLocations = {
    {
        id       = "apartments",
        label    = "Apartments",
        desc     = "Start at your apartment",
        icon     = "building",
        coords   = vector4(-269.4, -955.3, 31.2, 205.0),
        default  = true,
        cam      = {
            coords  = vector3(-269.4, -955.3, 180.0),
            pointAt = vector3(-269.4, -955.3, 31.2),
        },
    },
    {
        id       = "legion",
        label    = "Legion Square",
        desc     = "Downtown Los Santos",
        icon     = "city",
        coords   = vector4(195.17, -933.77, 30.69, 144.0),
        cam      = {
            coords  = vector3(195.17, -933.77, 180.0),
            pointAt = vector3(195.17, -933.77, 30.69),
        },
    },
    {
        id       = "sandy",
        label    = "Sandy Shores",
        desc     = "Desert town in Blaine County",
        icon     = "sun",
        coords   = vector4(1848.73, 3689.98, 34.27, 112.0),
        cam      = {
            coords  = vector3(1848.73, 3689.98, 180.0),
            pointAt = vector3(1848.73, 3689.98, 34.27),
        },
    },
    {
        id       = "paleto",
        label    = "Paleto Bay",
        desc     = "Quiet town up north",
        icon     = "tree",
        coords   = vector4(-112.23, 6322.46, 31.48, 222.0),
        cam      = {
            coords  = vector3(-112.23, 6322.46, 180.0),
            pointAt = vector3(-112.23, 6322.46, 31.48),
        },
    },
    {
        id       = "lastlocation",
        label    = "Last Location",
        desc     = "Spawn where you left off",
        icon     = "pin",
        coords   = nil,
        isLastLocation = true,
        -- cam is resolved at runtime from saved position
    },
}

-- -------------------------------------------------------
-- SETTINGS
-- -------------------------------------------------------
Config.AutoSpawnTimeout   = 30    -- seconds (0 = disabled)
Config.EnableLastLocation = true  -- show "last location" option
Config.DefaultTheme       = "dark" -- "dark" or "light"
Config.EnableThemeToggle  = true  -- show theme toggle button
Config.EnableScreenBlur   = true  -- blur game view when selector is open
Config.EnableEdgeStreaks   = true  -- animated edge decorations
Config.EnableHighlight    = true  -- location highlight dot on screen

-- -------------------------------------------------------
-- DEFAULT CAMERA (initial overview before any selection)
-- -------------------------------------------------------
Config.Camera = {
    coords  = vector3(1171.54, -3422.14, 627.85),
    rotX    = 0.0,
    rotY    = 0.0,
    rotZ    = 0.0,
    fov     = 60.0,
}

-- -------------------------------------------------------
-- CAMERA TRANSITION
-- -------------------------------------------------------
Config.CameraTransitionTime = 1500  -- ms for smooth camera move between locations

-- -------------------------------------------------------
-- EVENTS — Customize if you use different housing scripts
-- -------------------------------------------------------
Config.Events = {
    -- Fired after player spawns
    serverPlayerLoaded  = "QBCore:Server:OnPlayerLoaded",
    clientPlayerLoaded  = "QBCore:Client:OnPlayerLoaded",

    -- Housing/apartment interior restore (set to false to disable)
    houseLastLocation   = "qb-houses:client:LastLocationHouse",      -- event(houseId)
    apartmentLastLocation = "qb-apartments:client:LastLocationHouse", -- event(type, id)

    -- Clear inside metadata on normal spawn (set to false to disable)
    clearHouseMeta      = "qb-houses:server:SetInsideMeta",          -- serverEvent(0, false)
    clearApartmentMeta  = "qb-apartments:server:SetInsideMeta",      -- serverEvent(0, 0, false)
}

-- -------------------------------------------------------
-- TRANSLATIONS
-- -------------------------------------------------------
Config.Translate = {
    title              = "CHOOSE YOUR SPAWN",
    subtitle           = "Select a location to begin",
    btnSpawn           = "SPAWN",
    lastLocation       = "Last Location",
    lastLocationDesc   = "Spawn where you left off",
    autoSpawnIn        = "Auto-spawn in %ds",
    noLastLocation     = "No last location saved",
}
```

{% endtab %}

{% tab title="ESX" %}

```lua
-- ============================================================
-- config.lua — Feron Spawn Selector
-- ============================================================

Config = {}

-- -------------------------------------------------------
-- FRAMEWORK — ESX via exports["es_extended"]:getSharedObject()
-- -------------------------------------------------------
Config.Framework = "esx"

-- -------------------------------------------------------
-- CLIENT NOTIFY
-- -------------------------------------------------------
Config.Notify = function(text, notifType)
    ESX.ShowNotification(text)
end

-- -------------------------------------------------------
-- SPAWN LOCATIONS
-- Each location has a camera position for preview.
-- cam = { coords, pointAt } — camera position + look-at target
-- -------------------------------------------------------
Config.SpawnLocations = {
    {
        id       = "apartments",
        label    = "Apartments",
        desc     = "Start at your apartment",
        icon     = "building",
        coords   = vector4(-269.4, -955.3, 31.2, 205.0),
        default  = true,
        cam      = {
            coords  = vector3(-269.4, -955.3, 180.0),
            pointAt = vector3(-269.4, -955.3, 31.2),
        },
    },
    {
        id       = "legion",
        label    = "Legion Square",
        desc     = "Downtown Los Santos",
        icon     = "city",
        coords   = vector4(195.17, -933.77, 30.69, 144.0),
        cam      = {
            coords  = vector3(195.17, -933.77, 180.0),
            pointAt = vector3(195.17, -933.77, 30.69),
        },
    },
    {
        id       = "sandy",
        label    = "Sandy Shores",
        desc     = "Desert town in Blaine County",
        icon     = "sun",
        coords   = vector4(1848.73, 3689.98, 34.27, 112.0),
        cam      = {
            coords  = vector3(1848.73, 3689.98, 180.0),
            pointAt = vector3(1848.73, 3689.98, 34.27),
        },
    },
    {
        id       = "paleto",
        label    = "Paleto Bay",
        desc     = "Quiet town up north",
        icon     = "tree",
        coords   = vector4(-112.23, 6322.46, 31.48, 222.0),
        cam      = {
            coords  = vector3(-112.23, 6322.46, 180.0),
            pointAt = vector3(-112.23, 6322.46, 31.48),
        },
    },
    {
        id       = "lastlocation",
        label    = "Last Location",
        desc     = "Spawn where you left off",
        icon     = "pin",
        coords   = nil,
        isLastLocation = true,
        -- cam is resolved at runtime from saved position
    },
}

-- -------------------------------------------------------
-- SETTINGS
-- -------------------------------------------------------
Config.AutoSpawnTimeout   = 30    -- seconds (0 = disabled)
Config.EnableLastLocation = true  -- show "last location" option
Config.DefaultTheme       = "dark" -- "dark" or "light"
Config.EnableThemeToggle  = true  -- show theme toggle button
Config.EnableScreenBlur   = true  -- blur game view when selector is open
Config.EnableEdgeStreaks   = true  -- animated edge decorations
Config.EnableHighlight    = true  -- location highlight dot on screen

-- -------------------------------------------------------
-- DEFAULT CAMERA (initial overview before any selection)
-- -------------------------------------------------------
Config.Camera = {
    coords  = vector3(1171.54, -3422.14, 627.85),
    rotX    = 0.0,
    rotY    = 0.0,
    rotZ    = 0.0,
    fov     = 60.0,
}

-- -------------------------------------------------------
-- CAMERA TRANSITION
-- -------------------------------------------------------
Config.CameraTransitionTime = 1500  -- ms for smooth camera move between locations

-- -------------------------------------------------------
-- EVENTS — Customize if you use different housing scripts
-- -------------------------------------------------------
Config.Events = {
    -- Fired after player spawns (ESX doesn't have a standard post-spawn event — leave empty if unused)
    serverPlayerLoaded  = false,  -- set to your server event name or false
    clientPlayerLoaded  = false,  -- set to your client event name or false

    -- Housing script integration (set to false to disable)
    houseLastLocation   = false,  -- event(houseId)
    apartmentLastLocation = false, -- event(type, id)

    -- Clear inside metadata on normal spawn (set to false to disable)
    clearHouseMeta      = false,  -- serverEvent(0, false)
    clearApartmentMeta  = false,  -- serverEvent(0, 0, false)
}

-- -------------------------------------------------------
-- TRANSLATIONS
-- -------------------------------------------------------
Config.Translate = {
    title              = "CHOOSE YOUR SPAWN",
    subtitle           = "Select a location to begin",
    btnSpawn           = "SPAWN",
    lastLocation       = "Last Location",
    lastLocationDesc   = "Spawn where you left off",
    autoSpawnIn        = "Auto-spawn in %ds",
    noLastLocation     = "No last location saved",
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://feron-scripts.gitbook.io/welcome/scripts/feron-spawnselector/config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
