Configuring the resource

Configuring the Congestion Charge resource is simple!

Developer Mode

Enabling developerMode in the configuration file allows you to use the /cc command in-game to setup new cameras and delete existing ones, which will be covered in the next document.

developerMode = true,

Having developerMode enabled also enables blips by default, allowing you to see where the cameras are located.

Blip Settings

blips = {
        enabled = false, -- Blips will show if enabled here or if developer mode is set to true
        sprite = 184, -- This is the sprite of the blip
        colour = 66, -- This is the colour of the blip
        scale = 0.7, -- This is the scale of the blip
        display = 2, -- This is the display of the blip
    },

By default, blips are disabled, which will display the 400+ included locations around the city. In this section, you can enable blips and also configure the sprite, colour, scale and display.

Load Distance

loadDistance = 150.0,

This distance is the load distance for Congestion Cameras, meaning they will only appear when you are this close to them.

Vandalising Cameras

vandalising = {
        enabled = true,
        repairTimeMinutes = 60, -- in minutes
},

This section allows you to disable/enable the ability to vandalise cameras. Cameras can currently be vandalised by gun bullet however we are hoping to add more ways to vandalise them in the future.

The repairTime is set in minutes, so by default all cameras will be repaired after 1 hour (60 minutes).

Charges / Billing

charges = {
        -- Here you can define the default charge for a camera 
        -- The charge for each zone is defined when creating the cameras, but this value will be used if there is not one set
        defaultCharge = 10,
        
        -- Here you can set the framework to use to charge vehicles. We've included support for vRP, ESX and QBCore out of the box.
        framework = {
            vRP = false,
            ESX = false,    
            QBCore = false,
            okokBilling = {
                enabled = false,
                invoiceSource = "Congestion Charge",
                invoiceReason = "You entered a congestion zone.",
                invoiceSociety = "police",
                invoiceSocietyName = "LSPD",
            },
            mBilling = {
                enabled = false,
                society = "police",
                reason = "Congestion Charge"
            },
        }
    },

This section of the config allows you to configure the way players are charged, such as okokBilling or mBilling. Just enable your preferred resource, or integrate your own one in the sv_utils.lua file, or suggest an integration.

The defaultCharge property is not where you set the current charge for an existing zone, as that is done in the .json file and will be explained later.

Receipt

receipt = {
        enabled = true,
        textureDictionary = "receipt",
        textureName = "receipt",
        duration = 5000, -- milliseconds
    },

This section allows you to configure whether the on-screen receipt is displayed to the user after being charged by a Congestion Charge camera. By default, the receipt is configured to display for 5000 milliseconds (5 seconds) on the user's screen. To change the receipt texture, you'll need to open the .ytd file in OpenIV and export/import the textures.

Society Payment

society = {
        enabled = false,
        accountName = "accountnamehere",

        -- The contribution percent is the percentage of the charge that goes to the society
        -- If you set thid to 50% of a £5.00 charge then £2.50 would go to the society
        contributionPercent = 100.0,

        -- These are the societies we've built in for use straight out of the box
        -- You can add others in the sv_utils file
        integrations = {
            qbBossmenu = false,
            qbManagement = false,
            esxAddonAccount = false,
            okok = false,
            qbBanking = false,
        }
    },

Congestion Charge supports the ability for your chosen society to receive either the full Congestion Charge collected, or a percentage of it. To turn this on, firstly enable it at the top of the section, followed by setting the account name.

The contributionPercentage is the amount of each charge that will be provided to the society. For example, if you set this to 50%, only half of all collected charges will be paid to the society.

The integrations section allows you to enable your preferred society payment resource, such as qbBanking, okok banking, esxAddonAccount, qbManagement and qbBossMenu. If you want a resource that isn't included, feel free to edit the function in sv_utils.lua or suggest an integration.

Notification Support

notifications = {
        enabled = true, 
        framework = {
            ESX = false,
            QBCore = false,
            QBX = false,
            vRP = false,
            okok = false,
        }
    },

We've provided notification support straight out of the box for ESX, QBCore, QBX, vRP and okokNotify. If you have notifications enabled but do not select a framework, the resource will use base game notifications on top of the minimap.

Exemption Sets

The next part of the documentation will explain how to setup exempt vehicle models, jobs, permissions and vehicle classes. The exemptions in Congestion Charge work off exemption sets, which are essentially groups of vehicles, jobs and permissions under one name - such as a "police" exemption set, which you can see below:

exemptionSets = {

        ["police"] = {
            exemptVehicles = {`fbi`, `police4`}, -- These vehicle models will be exempt and will not be charged the charge

            exemptVehicleClasses = {17, 18},

            permissions = {
                acePermissions = {
                    enabled = false,
                    permissions = {"acePermissionHere"} -- A user can have any of the following permissions, allowing you to add multiple
                },
                ESX = {
                    enabled = false,
                    checkJob = {
                        enabled = true, -- Enable this to use ESX job check
                        jobs = {"police"} -- A user can have any of the following jobs, allowing you to add multiple
                    }
                },

                -- We've added vRP integration. All you need to do is enable it below. Then, configure if you wish to check for groups or permissions, or even both
                vRP = {
                    enabled = false,
                    checkGroup = {
                        enabled = false, -- Enable this to use vRP group check
                        groups = {"police"}, -- A user can have any of the following groups, meaning you can add different jobs
                    },
                    checkPermission = {
                        enabled = false, -- Enable this to use vRP permission check
                        permissions = {"charging.exempt"} -- A user can have any of the following permissions, allowing you to add multiple
                    },
                },

                -- We've added QBCore integration. All you need to do is enable it below. Then, configure if you wish to check for jobs or permissions, or even both
                QBCore = {
                    enabled = false,
                    checkJob = {
                        enabled = false, -- Enable this to use QBCore job check
                        jobs = {"police"}, -- A user can have any of the following jobs, meaning you can add different jobs
                    },
                    checkPermission = {
                        enabled = false, -- Enable this to use QBCore permission check
                        permissions = {"charging.exempt"}, -- A user can have any of the following permissions, allowing you to add multiple
                    },
                },
            }

        },
},

Exemption Set Name

Each exemption set must have a unique name, such as "police", which will be later referenced in the locations.json file (and will be discussed soon).

["police"] = {

Exemption Vehicle Classes

We've added the ability for you to make whole vehicle classes exempt, such as emergency vehicles (class 18). For a full list of vehicle classes, see here.

exemptVehicleClasses = {17, 18},

Permissions

In this section, you can enable permissions for ace permissions (base game), ESX, vRP and QBCore, allowing you to make certain jobs or permissions exempt under that set.

Adding an exemption set to an existing Congestion Zone

Most servers who use this resource will likely only use the pre-configured city zone, which is the default zone with over 400 cameras. Therefore, if you have added additional exemption sets other than the pre-configured "police" set, you will need to add these into the locations.json file.

To find this, open the data folder within the resource files and you'll find the locations.json file.

Next, find the Congestion Zone you wish to modify the exemption sets for, such as "city".

{
    "city": {
        "exemptionSets": [
            "police"
        ],

Let's say you wanted to add a new exemption set called "green", for fuel efficient vehicles on your server. You'd add it like this:

"exemptionSets": ["police", "green"],

Next, you'll need to save the file and restart the resource for the changes to apply.

Adding Cameras & Modifying Zones

To add cameras and modify zones (such as the price charged to drivers), see the next page.

Last updated