# Full Configuration Guide

### 1. Debug Configuration

```lua
Config.Debug = false
```

#### Purpose

Controls debug output in the server console.

#### Behavior

* `true`: Enables detailed debug logs (useful for testing and troubleshooting)
* `false`: Disables debug logs (recommended for production servers)

***

### 2. Core Framework Configuration

```lua
Config.Core = 'esx'
```

#### Purpose

Defines which framework the scoreboard integrates with.

#### Supported Values

* `'qb'` → QB-Core
* `'esx'` → ESX
* `'qbx'` → QBox

#### Important

This value **must match your server framework exactly**. Incorrect selection will cause job counts and player data to malfunction.

***

### 3. Scoreboard Display Name

```lua
Config.ScoreboardName = "YourRP Name"
```

#### Purpose

Sets the title displayed at the top of the scoreboard UI.

#### Usage

Replace this with your server’s roleplay name.

Example:

```lua
Config.ScoreboardName = "nm1 Roleplay"
```

***

### 4. Scoreboard Toggle Key

```lua
Config.ToggleKey = "F10"
```

#### Purpose

Defines the keyboard key used to open and close the scoreboard.

#### Notes

* Accepts FiveM control key names
* Common values include `F10`, `F9`, `HOME`, etc.

***

### 5. Scoreboard Position

```lua
Config.ScoreboardPosition = 'right'
```

#### Purpose

Determines where the scoreboard appears on the screen.

#### Options

* `'left'` → Left side of the screen
* `'right'` → Right side of the screen

***

### 6. Default Page on Open

```lua
Config.DefaultPage = 'players'
```

#### Purpose

Specifies which page is shown when the scoreboard is opened.

#### Options

* `'players'` → Player list page
* `'jobs_heists'` → Jobs and heists overview

***

### 7. Page Visibility Control

```lua
Config.HidePages = {
    players = false,
    jobs_heists = false
}
```

#### Purpose

Allows disabling specific scoreboard pages.

#### Behavior

* `true`: Page is hidden from the UI
* `false`: Page is visible

Example:

```lua
jobs_heists = true
```

This removes the Jobs/Heists page entirely.

***

### 8. Staff Roles Configuration

```lua
Config.StaffRoles = {
    ['admin'] = {
        label = "Administrator",
        color = "#FFD700"
    }
}
```

#### Purpose

Displays staff roles next to player names in the scoreboard.

#### Key Rules

* The role key (`admin`, `mod`, etc.) must match:
  * ESX group
  * QB permission
  * ACE permission
* `label` is the text shown in the UI
* `color` must be a valid CSS color value

***

### 9. Job Categories (Online Job Counts)

```lua
Config.JobCategories = {
    { name = "police", label = "Police Department" }
}
```

#### Purpose

Tracks and displays the number of online players per job.

#### Fields

* `name`: Exact job name from your framework configuration
* `label`: Display name shown in the scoreboard

#### Notes

* Job names are case-sensitive
* Only listed jobs are tracked

***

### 10. Heist Evaluation Configuration

```lua
Config.HeistEvaluation = {
    Jobs = { 'police', 'lspd' },
    CombineJobs = true
}
```

#### Purpose

Defines how law-enforcement jobs are counted for heist availability.

#### Jobs

* Lists all jobs considered enforcement
* Must match framework job names exactly

#### CombineJobs

* `true`: All listed jobs are summed together
* `false`: Only the first job in the list is counted

Recommended:

* Use `true` for multi-department servers

***

### 11. Heist Definitions

```lua
Config.Heists = {
    { name = "Store Robbery", isRobbery = true, minPolice = 2 }
}
```

#### Purpose

Defines all heists and how their availability is evaluated.

#### Fields

* `name`: Display name of the heist
* `isRobbery`:
  * `true`: Requires police count check
  * `false`: Always available
* `minPolice` (optional):
  * Minimum enforcement required for that specific heist

#### Notes

* If `minPolice` is not set, the global fallback value is used
* Non-robbery entries ignore police requirements

***

### 12. Global Minimum Police Requirement (Fallback)

```lua
Config.MinPoliceForRobbery = 1
```

#### Purpose

Acts as a fallback police requirement.

#### Behavior

* Used only if a robbery does not define its own `minPolice`
* Per-heist values always override this setting

***

### 13. UI Color Customization

```lua
Config.Colors = {
    PrimaryBackground = "#0A0F1A"
}
```

#### Purpose

Controls the entire visual theme of the scoreboard.

#### Customizable Elements

* Backgrounds
* Text
* Headers
* Borders
* Hover effects
* Status indicators

#### Notes

* Changes apply automatically to the UI
* No code changes required
* Accepts standard CSS color formats

***
