PEACESCRIPT Documentation
StoreDiscord
  • 👋Introduction
  • 📸PEACE-Speedcamera
    • 📜Config File
    • 📂Unlocked File
      • 🖥️Server
        • QBCore
        • ESX
        • QBOX
        • Custom
      • 💻Client
        • QBCore
        • ESX
        • QBOX
        • Custom
  • 📄PEACE-JobMenu
    • 📜Config File
    • 📂Unlocked File
      • 💻Client
        • QBCore
        • ESX
        • Custom
  • 📊PEACE-DutyLog
    • 📜Config File
    • 📂Unlocked File
      • 💻Client
        • QBCore
        • ESX
        • QBOX
        • Custom
        • Target
      • 🖥️Server
        • QBCore
        • ESX
        • QBOX
        • Custom
  • 🖋️PEACE-PropsManager
    • ⬇️Installation
    • 📜Configuration
    • ❓FAQ
    • 📂Unlocked File
      • 🖥️Server
        • QBCore
        • ESX
        • Custom
      • 💻Client
        • QBCore
        • ESX
        • Custom
Powered by GitBook
On this page
  1. PEACE-DutyLog

Config File

Here you can find the latest available config file for Peace-JobsMenu

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
}
PreviousPEACE-DutyLogNextUnlocked File

Last updated 4 months ago

📊
📜