# Config File

```
Locales = {}

Config = {
    framework = 'QB', -- 'QB' or 'ESX' or 'QBOX'
    UseQBisBoss = false, -- For QB framework, the boss grade can access PanelCompany
    Command = 'dutylog', -- Command to open the panel
    target = 'qb-target', -- 'qb-target', 'ox-target', 'qtarget', 'luck-contextmenu', 'custom', or set false
    WasabiScripts = false, -- If you use the wasabi_police or wasabi_ambulance scripts, set to true https://store.wasabiscripts.com/
    KeyMappingSettings = {
        Active = false, -- Enable or disable keybind support
        Label = "Duty Log", -- Label for keybind
        -- If you want to use a keybind, use the following format: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
        Key = "F4",
    },
    notificationType = "QBCore", -- Type of notification to display (ESX, QBCore, BasicNotification, or bulletin)
    lang  = 'en', -- 'fr', 'en'
    debug = false,
    DeleteLogSQL = true, -- Delete player logs in dutylog after going off duty
    TransactionLog = true, -- Saves all service end times and durations in a TransactionDutyLog SQL table
    StaffWebhook  = {
        OnStaffWebhooks = true, -- Staff receives webhooks for all start and end times of all jobs
        WebHooks = '',
    },
    LogMessages = {
        DutyOn = true, -- If false, no webhook is sent when duty is turned ON
        DutyOff = true, -- If false, no webhook is sent when duty is turned OFF
        PlayerDropped = true, -- If false, no webhook is sent when a player disconnects while on duty
        
        Discord = true, -- Include Discord ID in log messages
        License = true, -- Include license information in log messages
        EndDate = true, -- Include end date in log messages
        StartDate = true, -- Include start date in log messages
        ServiceDuration = true, -- Include service duration in log messages
        PlayerName = true, -- Include player name in log messages
        
        LeaveServiceUnusual = true, -- If false, the reason for disconnection is not displayed if the player disconnects while on duty
    },
}

-- Duty toggle events for different frameworks

-- QBCore
-- Event = 'QBCore:ToggleDuty',
-- ClientOrServer = 'server',

-- ESX
-- Event = 'esx_service:activateService',
-- ClientOrServer = 'client',

-- QBox
-- Event = 'QBCore:ToggleDuty',
-- ClientOrServer = 'server',

Config.Jobs = {
    ['example_job'] = {
        Interact = {
            PanelCompany = true, -- Enables access for the player to view their duty hours by Interact
            OnDuty = {
                Active = true, -- Enables ON Duty for the ped or prop
                Event = 'Example:ToggleDuty', -- Event name to toggle duty status
                ClientOrServer = 'server', -- Side to trigger the event (client/server)
            },
            Ped = {
                Active = true,
                PedModel = 's_m_y_worker_01', -- Example PED model
                pos = vec4(0.0, 0.0, 0.0, 0.0), -- Example PED position
                target = true, -- Enables target on the PED
            },
            Props = {
                Active = true,
                PropsModel = 'prop_tool_box_01', -- Example props model
                pos = vector4(0.0, 0.0, 0.0, 0.0), -- Example props position
                target = true, -- Enables target on the prop
            },
        },
        PanelCompanyConfig = {
            Activate = true, -- Activates the panel company feature
            GradeAllowed = {1, 2, 3}, -- Example grades allowed to access panel company
        },
        DiscordConfig = {
            Title = 'Example Services', -- Example title
            Color = {
                OnDuty = 255, -- Example color for ON Duty
                OffDuty = 16711680, -- Example color for OFF Duty
            },
            IconURL = 'https://example.com/logo.png', -- Example logo URL
        },
        WebHooks = 'https://example.com/webhook', -- Example webhook URL
    },
    -- Add other jobs here
}

Config.MarkerESX = { -- ONLY FOR ESX (as no basic duty support)
    ['police'] = {
        ESX = {
            Pos = vector3(289.84, -570.44, 43.06),
            Size = {x = 2.5, y = 2.5, z = 0 },
            Color = { r = 0, g = 255, b = 0 },  
            Type = 27,
            Activate = true,
        },
    },
    ['mechanic'] = {
        ESX = {
            Pos = vector3(287.64, -572.88, 43.16),
            Size = {x = 2.5, y = 2.5, z = 0 },
            Color = { r = 0, g = 255, b = 0 },  
            Type = 27,
            Activate = true,
        },
    },

    -- Add other jobs here
}

Config.notification = { -- Notification options (only for notificationType: bulletin) ---> https://github.com/Mobius1/bulletin
    title = 'Notification',
    subject = '',
    icon = '',
    timeout = 5000,
    Position = "bottomleft",
    Progress = false,
    Queue = 5,
    Stacking = false,
    ShowStackedCount = false
}
```


---

# 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://peacescript.gitbook.io/peacescript/peace-dutylog/config-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.
