> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_spawnselector/configuration.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Configuration

All settings live in `config.lua`.

<mark style="color:$primary;">**Framework**</mark>

```lua
Config.Framework = "auto"   -- "auto" | "qbcore" | "qbox" | "esx"
```

Leave on `"auto"` unless you need to force a specific framework.

<mark style="color:$primary;">**Multi-character**</mark>

```lua
Config.UseMultiChar = true
```

`true` — the selector opens only when triggered by your multicharacter system.\
`false` — the selector opens automatically on the framework's player-loaded event (for servers with no multicharacter system).

<mark style="color:$primary;">**Housing**</mark>

```lua
Config.ApartmentSystem   = "qb-apartments"  -- "qb-apartments" | "qbx_properties" | "ps-housing" | "none" | "custom"
Config.SkipNewCharacters = false
```

{% hint style="info" %}
Set to match your housing script. New characters will see its starting-apartment list automatically. Set to `"none"` if you don't use one — new characters fall back to <mark style="color:$info;">`Config.DefaultSpawn`</mark> or <mark style="color:$info;">`Config.Locations`</mark>.
{% endhint %}

<mark style="color:$primary;">**Clothing**</mark>

```lua
Config.ClothingSystem = "qb-clothing"  -- "qb-clothing" | "illenium-appearance" | "esx_skin" | "none" | "custom"
```

Only needed if your setup doesn't already load clothing through the framework's player-loaded event (most multicharacter systems handle this already). Leave on <mark style="color:$info;">`"none"`</mark> unless you're calling <mark style="color:$info;">`Tefox.Open.ApplyPlayerAppearance`</mark> manually.

<mark style="color:$primary;">**Spawn locations**</mark>

```lua
Config.Locations = {
    {
        id             = "last_location",
        name           = "Last Location",
        description    = "Resume from your last position",
        icon           = "history",
        isLastLocation = true,
    },
    {
        id          = "legion_square",
        name        = "Legion Square",
        description = "Downtown Los Santos",
        icon        = "map-pin",
        coords      = vector4(195.17, -933.77, 30.69, 144.0),
    },
    -- add or remove entries freely
}
```

Shown to **existing characters only**. Add as many as you like, or trim the list down to just <mark style="color:$info;">`last_location`</mark> for a stricter, more serious roleplay setup — no coding required.

<mark style="color:$primary;">**New-character default spawn**</mark>

```lua
Config.DefaultSpawn = vector4(195.17, -933.77, 30.69, 144.0)
```

{% hint style="info" %}
Used only when `Config.ApartmentSystem` is `"none"` and no housing locations are available. Set to `nil` to show `Config.Locations` to new characters instead.
{% endhint %}

***

#### 🧩 Extending the Script

The entire <mark style="color:yellow;">`client/open/`</mark> folder ships **unencrypted**. Each file handles one system and exits immediately if it isn't active:

```
client/open/
├── shared.lua   — appearance and new-character model helpers
├── qbcore.lua   — qb-apartments integration
├── qbox.lua     — qbx_properties integration
├── ps-housing.lua  — ps-housing integration
└── esx.lua      — Last Location resolution for ESX
```

{% hint style="info" %}
Running a housing system that isn't listed above? Just reach out on [Discord](https://discord.gg/rPmGKBzJkW) and we'll add support for it.
{% endhint %}
