Configuration

Below we have explained some of the key features found in our Config file within the Speed Camera Script.


Framework

Select your framework (by default the script will auto detect)

Config.Framework = 'auto' -- 'auto', 'esx', 'qbcore', 'standalone'

Speed Detection Characteristics

The detection characteristics will depend on your servers HUD settings. This is because some servers use MPH and others use KPH.

Config.SpeedReading = 'mph' -- Options: 'kph' or 'mph'

Authorised Licenses

You can set the Allowed members that will be authorised to place, edit and delete your Speed Cameras. You can grab you License from your TxAdmin Console.

Config.AllowedLicenses = {
    ["license:############"] = true, -- Set to true to allow
    ["license:############"] = false, -- Set to false to disable
    ["license:############"] = false,
}

Quick Speed Settings

This setting allows you to configure default speeds to the placement UI, this will then show as buttons rather than you or your staff needing to type it out each time.

Config.SpeedOptions = {
    10, 20, 30, 40, 50, 60, 70 -- Feel free to add/remove speeds here
}

Keybindings

The Keybindings to move the prop around during placement and editing can be customised in the Config file to ensure it doesn't clash with other script you may have. The keybinds can be found here -> CLICK HERE

Config.Buttons = {
    MoveForwards = 111,
    MoveBackwards = 112,
    MoveLeft = 108,
    MoveRight = 109,
    MoveUp = 172,
    MoveDown = 173,
    RotateForwards = 117,
    RotateBackwards = 118,
    RotateLeft = 175,
    RotateRight = 174,
    SnapToGround = 143,
    SaveProp = 176,
    CycleModel = 246,
}

Vehicle Configuration

In this section you can set the vehicles you wish to ALLOW to travel through the Speed zones without being charged. This is useful to stop your emergency vehicles being charged when responding to calls or when tracking down criminals.

Config.IgnoredVehicles = {
    [`police`] = true,
    [`police2`] = true,
    [`police3`] = true,
    [`fbi`] = true,
    [`ambulance`] = true,
    [`firetruk`] = true
}

Config File before edits

Config = {}
Config.Debug = false
Config.ShowSpeedZoneBlips = false -- Set to false to disable map blips
Config.Framework = 'auto' -- 'auto', 'esx', 'qbcore', 'standalone'
Config.SpeedReading = 'mph' -- Options: 'kph' or 'mph'
Config.Currency = "£"
Config.IgnoredVehicles = {
    [`police`] = true,
    [`police2`] = true,
    [`police3`] = true,
    [`fbi`] = true,
    [`ambulance`] = true,
    [`firetruk`] = true
}

Config.SpeedOptions = {
    10, 20, 30, 40, 50, 60, 70 -- Feel free to add/remove speeds here
}

Config.Billing = {
    enabled = true,
    method = 'bank', -- 'bank', 'cash', 'both'
    checkFundsFirst = true, -- Check if player has enough money before allowing charging
    notifications = {
        enabled = true, -- Enable/disable billing notifications
        showOnComplete = true, -- Show notification when charging completes
        showOnCancel = true, -- Show notification when charging is cancelled
        showPaymentMethod = true -- Show which payment method was used (bank/cash)
    }
}

-- Notification settings --
Config.Notifications = {
    type = 'qbcore', -- 'chat', 'mythic', 'ox_lib', 'esx', 'qbcore', 'okokNotify', 'pNotify', 'NotificationV2', 'custom'
    position = 'top-right', -- Position for certain notification systems
    duration = 5000, -- Duration in milliseconds (5 seconds)
    sound = true, -- Play sound with notifications (if supported)
    
    -- Notification filtering - only show important notifications
    showLevel = 'important', -- 'all', 'important', 'critical'
    -- 'all' = Show everything (inform, success, error, warning)
    -- 'important' = Show success, error, warning (skip basic info)
    -- 'critical' = Show only error and warning (critical issues only)
}

-- Placement Menu Options --
Config.AllowedLicenses = {
    ["license:############"] = true, -- Set to true to allow
    ["license:############"] = false, -- Set to false to disable
    ["license:############"] = false,
}
Config.EnableAutoEditDetection = true
Config.AutoEditDistance = 2.0
Config.Buttons = {
    MoveForwards = 111,
    MoveBackwards = 112,
    MoveLeft = 108,
    MoveRight = 109,
    MoveUp = 172,
    MoveDown = 173,
    RotateForwards = 117,
    RotateBackwards = 118,
    RotateLeft = 175,
    RotateRight = 174,
    SnapToGround = 143,
    SaveProp = 176,
    CycleModel = 246,
}

Last updated