> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/editor-2/configuration.md).

# Configuration

#### Configuration Guide (`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.

```lua
-- SET TO TRUE: If you are using qf_multicharacter. 
-- The multicharacter script will manually command the spawn selector to open when needed.
Config.UseQFMulticharacter = 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   
```

{% hint style="danger" %}
**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.
{% endhint %}

**Defining Spawn Locations** Locations are defined in `config/default_data.lua`. You can restrict specific spawns to certain jobs or assign a cost to use a spawn point.

```lua
Config.Spawns = {
    {
        id = "lspd_hq",
        label = "Mission Row PD",
        description = "Authorized personnel only.",
        coords = vector4(425.1, -979.5, 30.7, 90.0),
        icon = "lock", 
        type = "free",
        -- JOB RESTRICTION: Only Police grade 0 or higher can see/use this spawn
        jobs = { 
            { name = "police", grade = 0 } 
        }
    },
    {
        id = "motel",
        label = "Pink Cage Motel",
        description = "A cheap place to crash.",
        coords = vector4(314.5, -278.5, 54.1, 0.0),
        icon = "dollar",
        type = "paid",
        price = 500 -- Deducts $500 from the player's bank/cash upon selection
    }
}
```


---

# 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:

```
GET https://wiki.qfdevelopers.com/scripts/editor-2/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
