# Configuration File

### Config Files <a href="#config-files" id="config-files"></a>

{% code title="config.lua" overflow="wrap" lineNumbers="true" fullWidth="false" expandable="true" %}

```lua
Config = {}

-- Debug Mode:
-- Set to true to enable debug prints in the server console.
-- Set to false to disable them.
Config.Debug = false -- Set to true or false

-- Core Framework Configuration:
-- Set to 'qb' for QB-Core or 'esx' for ESX or 'qbx' for QBox
-- This determines which framework's functions the script will use.
Config.Core = 'esx' -- Options: 'qb', 'esx' , 'qbx'

-- Scoreboard Display Name:
-- This name will be displayed at the top of the scoreboard.
Config.ScoreboardName = "YourRP Name" -- As per user request, but customizable.

-- Keybind to Toggle Scoreboard:
-- Default is F10 (keyboard code 288). You can find key codes online.
-- https://docs.fivem.net/docs/game-references/controls/
Config.ToggleKey = "F10" -- Default: F10 

-- Scoreboard Position:
-- Determines if the scoreboard appears on the 'left' or 'right' side of the screen.
Config.ScoreboardPosition = 'right' -- Options: 'left', 'right'

-- Default Page on Open:
-- The page that is shown when the scoreboard is first opened.
Config.DefaultPage = 'players' -- Options: 'players', 'jobs_heists'

-- Hide Specific Pages:
-- Set to true to hide a page from the scoreboard UI.
Config.HidePages = {
    players = false,      -- Set to true to hide the Players page
    jobs_heists = false   -- Set to true to hide the Jobs/Heists page
}

-- Staff Roles Configuration:
-- Define custom roles for staff members with specific labels and colors.
-- The key should match the permission group/identifier from your framework (e.g., 'admin', 'moderator').
-- The 'color' should be a valid CSS color string (e.g., '#FF0000', 'rgb(255,0,0)').
Config.StaffRoles = {
    ['admin'] = {
        label = "Administrator",
        color = "#FFD700" -- Gold
    },
    ['mod'] = {
        label = "Moderator",
        color = "#8A2BE2" -- BlueViolet
    },
    ['support'] = {
        label = "Support",
        color = "#00BFFF" -- DeepSkyBlue
    },
    -- Add more roles as needed
}

-- Job Categories to Track:
-- List the job names (as defined in your QB-Core/ESX jobs config) that you want to count online players for.
-- The label is what will be displayed on the scoreboard.
Config.JobCategories = {
    { name = "police", label = "Police Department" },
    { name = "ambulance", label = "EMS" },
    { name = "taxi", label = "Taxi" },
    { name = "mechanic", label = "Mechanic" },
    -- Add more jobs as needed
}

Config.HeistEvaluation = {
    -- Default jobs used to count enforcement
    -- Can be one job or multiple jobs
    Jobs = {
        'police',        -- LSPD
        'lspd',       -- BCSO
        -- 'state',      -- add if needed
    },

    -- If true, sum all listed jobs
    -- If false, only the FIRST job is used
    CombineJobs = true
}

-- Heists/Operations Configuration:
-- Define heists with their names.
-- 'isRobbery': Set to true if this is a robbery and its availability depends on police count.
-- 'minPolice': (Optional, only for isRobbery = true) The minimum number of police required for this specific robbery.
--              If not set for a robbery, it will default to 0, effectively always available.
Config.Heists = {
    { name = "Gang Territory Capture", isRobbery = false },
    { name = "Vangelico Elite Robbery", isRobbery = true, minPolice = 1 },
    { name = "Black Market Delivery", isRobbery = false },
    { name = "Museum Artifact Theft", isRobbery = true, minPolice = 6 },
    { name = "Store Robbery", isRobbery = true, minPolice = 2 },   -- Requires 2 police
    { name = "Bank Robbery", isRobbery = true, minPolice = 5 },    -- Requires 5 police
    { name = "Pacific Bank", isRobbery = true, minPolice = 7 },    -- Requires 7 police
    { name = "Jewellery Robbery", isRobbery = true, minPolice = 3 }, -- Requires 3 police
    { name = "Drug Run", isRobbery = false },       -- Example of a non-robbery heist (always available unless set otherwise)
    -- Add more heists as needed
}

-- Minimum Police Count for Robberies (GLOBAL FALLBACK):
-- This setting is now a fallback. If a specific robbery in Config.Heists does NOT have
-- a 'minPolice' defined, this global value will be used for that robbery.
-- If a robbery has its own 'minPolice', that value will take precedence.
Config.MinPoliceForRobbery = 1 -- Default: 1 police officer required if not specified per heist

-- Customizable Colors for UI Elements:
-- These colors will be used in the HTML/CSS to easily theme the scoreboard.
Config.Colors = {
    PrimaryBackground   = "#0A0F1A", -- Deep navy-black background
    SecondaryBackground = "#111826", -- Slightly lighter navy tone
    AccentColor         = "#4A90E2", -- Cool steel-blue accent (matches left part of logo)
    TextColor           = "#E6E6E6", -- Soft silver-white for readability
    HeaderColor         = "#C7D0E0", -- Light metallic silver-blue tone
    ButtonHover         = "#1E2A40", -- Dark muted blue for hover effect
    SuccessColor        = "#6FA8FF", -- Soft glowing blue (instead of green)
    DangerColor         = "#FF5C5C", -- Light red-pink works universally
    BorderColor         = "#2A3347", -- Desaturated navy-gray border
}


```

{% endcode %}


---

# Agent Instructions: 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://docs.nm1scripts.in/classy-series/advanced-scoreboard/full-configuration-guide/configuration-file.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.
