# Configuration

Open `config.lua` and set at minimum:

```lua
Config.Framework = "auto"   -- or: "esx", "qbcore", "qbox", "standalone"
Config.Language  = "en"     -- en, es, fr, it, pt-br
```

***

### Configuration

All options live in `config.lua`. Below is a full breakdown.

#### General

```lua
Config.Framework   = "auto"       -- Framework detection: auto | esx | qbcore | qbox | standalone
Config.Language    = "en"         -- UI language
Config.Prefix      = "char"       -- ESX only: identifier prefix (char1:<license>, char2:<license>, ...)
Config.DeleteCharacter = true     -- Allow players to delete their own characters
Config.BaseSlots   = 4            -- Base number of character slots per player
Config.DefaultSpawn = vector4(x, y, z, heading)  -- Fallback spawn if no other spawn is set
```

#### Relog Screenshots

```lua
Config.Upload.method     = "discord"      -- "discord" or "fivemanage"
Config.Upload.upload_url = "WEBHOOK_URL"  -- Discord webhook URL or FiveManage API key
```

#### Relog Command

```lua
Config.Relog = {
    enable      = true,
    commandName = "relog",    -- Command players use to relog (/relog)
    waitTime    = 10000,      -- Cooldown in milliseconds before relog is allowed
    instant     = false       -- true = no wait time enforced
}
```

#### Spawn Selector

```lua
Config.SpawnSelector = {
    enable = true,
    show = {
        always      = true,   -- Show every time a character is loaded
        onlyNewChar = true    -- Show only when creating a new character (if always = false)
    }
}
```

#### Spawn Points

Edit `Config.SpawnPoints` to add or remove spawn locations:

```lua
Config.SpawnPoints = {
    {
        label  = "Last Location",       -- Display name in UI
        coords = nil,                   -- nil = use character's last saved location
        image  = "https://...",         -- Preview image URL
    },
    {
        label  = "City Center",
        coords = vector4(x, y, z, h),
        image  = "https://...",
    },
}
```

#### Starter Items

```lua
Config.StarterItems = {
    enable = true,
    items  = {
        { name = "burger",      quantity = 1 },
        { name = "water_bottle", quantity = 1 },
    }
}
```

#### Admin Panel

```lua
Config.AdminPanel = {
    command    = "charpanel",           -- In-game command to open the panel
    permission = {                      -- Which groups can access the panel
        admin  = true,
        mod    = true,
        helper = true,
    }
}
```

#### QB Apartments

```lua
Config.UseQbAppartments = false   -- true = use QB/QBox apartment system for spawn
```

#### Character Showcase Positions

`Config.PosPeds` defines where each character slot is displayed on the character selection screen. See `config_presets.lua` for ready-made presets:

```lua
Config.PosPeds = {
    Presets.PosPeds.preset_lastPosition,   -- Character appears at their last location
    Presets.PosPeds.preset_fixedPos_1,     -- Fixed position at scene 1
    Presets.PosPeds.preset_fixedPos_2,
    Presets.PosPeds.preset_fixedPos_3,
}
```
