Configuration

Below we have explained some of the key features found in our Config file within the Vehicle Road Tax Script.


Framework

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

Config.Framework = 'qbcore' -- 'qbcore', 'qbox'

Inventory

If you have an inventory system that is not one of the listed types then this means the script doesn't support

it as of this moment in time.

Config.InventorySystem = 'qs' --'qb' = [qb-inventory], 'ox' = [ox_inventory], 'qs' = [qs-inventory]

Target System

The script supports both qb-target and ox_target to allow the 3rd eye functions within this script.

Config.Target = 'auto' -- 'qb-target', 'ox_target', or 'auto' for auto-detection

Location

Location setting is critical to allowing your players to get access to the Road Tax interface, the default location is inside Big Bank in Vinewood. If you have an interior you wish to place the ped in you can always set it here.

Config.RoadTaxLocation = {
    coords = vector4(238.88, 221.55, 106.29, 272.3), --vector4(243.63, 226.25, 106.29, 157.3)
    blipSprite = 606,
    blipColor = 3,
    blipScale = 0.8,
    blipLabel = "Vehicle RoadTax"
}

Road Tax Prices

You can set the vehicles Road Tax price by category in the config file. This allows you reduce the amount or increase to suit your economy.

Config.RoadTaxPrices = {
    compacts = 50,
    sedans = 75,
    suvs = 100,
    coupes = 85,
    muscle = 120,
    sportsclassics = 150,
    sports = 200,
    super = 300,
    motorcycles = 40,
    offroad = 90,
    industrial = 80,
    utility = 60,
    vans = 70,
    cycles = 50,
    boats = 250,
    helicopters = 500,
    planes = 750,
    service = 60,
    emergency = 100,
    military = 200,
    commercial = 150,
    trains = 1000
}

Road Tax Duration

Your players will have the option to tax their vehicles for 2 periods, these periods by default are every 6 weeks or every 12 weeks. You can adjust this to suit your economy and ensure you utilise the script as often as possible.

Config.RoadTaxDurations = {
    { label = "6 Weeks", weeks = 6 },
    { label = "12 Weeks", weeks = 12 } -- default
}

Using qs-inventory

If you are using qs-inventory you will need to add the following code to qs-inventory -> shared -> items.lua.

        ['vehicle_roadtax_certificate']                  = {
        ['name'] = 'vehicle_roadtax_certificate',
        ['label'] = 'Vehicle Road Tax Certificate',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'vehicle_roadtax_certificate.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Certificate of road tax on personal vehicle'},

To Display Metadata and depending on your version of qs-inventory you will need to add the following snippet below the existing id_card in this file qs-inventory -> config -> metadata.js.

        } else if (itemData.name == "vehicle_roadtax_certificate") {
            $(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
            $(".item-info-description").html(
                "<p><strong>Vehicle Road Tax Certificate</strong></p>" +
                "<p><strong>Vehicle: </strong><span>" +
                (itemData.info.vehicleName !== undefined ? itemData.info.vehicleName : 'Unknown') +
                "</span></p><p><strong>License Plate: </strong><span>" +
                (itemData.info.vehiclePlate !== undefined ? itemData.info.vehiclePlate : 'Unknown') +
                "</span></p><p><strong>Expiry Date: </strong><span>" +
                (itemData.info.expiryDate !== undefined ? itemData.info.expiryDate : 'Unknown') +
                "</span></p><p><strong>Citizen ID: </strong><span>" +
                (itemData.info.citizenID !== undefined ? itemData.info.citizenID : 'Unknown')
            );

Using ox_intentory

If you are using ox_inventory you will need to add the following code to ox_inventory -> data -> items.lua.

['vehicle_roadtax_certificate'] = {
    label = 'Vehicle Roadtax Certificate',
    weight = 50,
    stack = false,
    close = true,
    description = '',
    metadata = {
        plate = 'UNKNOWN',
        expiry = 'N/A',
        citizenid = 'N/A'
    },
},


Using qb-core

If you are using qb-inventory you will need to add the following code to qb-core -> shared -> items.lua.

['vehicle_roadtax_certificate']= {['name'] = 'vehicle_roadtax_certificate',['label'] = 'Vehicle Road Tax Certificate',['weight'] = 0,['type'] = 'item', ['image'] = 'vehicle_roadtax_certificate.png',['unique'] = true,  ['useable'] = true,['shouldClose'] = true,['combinable'] = nil,['description'] = 'Certificate of road tax on personal vehicle'},

Config File before edits

Config = {}
Config.Framework = 'qbcore' -- 'qbcore', 'qbox',
Config.InventorySystem = 'qb' --'qb' = [qb-inventory], 'ox' = [ox_inventory], 'qs' = [qs-inventory]
Config.Currency = '£' -- Currency symbol for the RoadTax prices
Config.ViewPolicy_distance = 3.0 -- (METERS) This is the distance needed to be able to see the RoadTax Policy UI when the item has been used by a player
Config.RoadTaxLocation = {
    coords = vector4(238.88, 221.55, 106.29, 272.3), --vector4(243.63, 226.25, 106.29, 157.3)
    blipSprite = 606,
    blipColor = 3,
    blipScale = 0.8,
    blipLabel = "Vehicle RoadTax"
}
Config.Target = 'auto' -- 'qb-target', 'ox_target', or 'auto' for auto-detection
Config.RoadTaxPrices = {
    compacts = 50,
    sedans = 75,
    suvs = 100,
    coupes = 85,
    muscle = 120,
    sportsclassics = 150,
    sports = 200,
    super = 300,
    motorcycles = 40,
    offroad = 90,
    industrial = 80,
    utility = 60,
    vans = 70,
    cycles = 50,
    boats = 250,
    helicopters = 500,
    planes = 750,
    service = 60,
    emergency = 100,
    military = 200,
    commercial = 150,
    trains = 1000
}

Config.RoadTaxDurations = {
    { label = "6 Weeks", weeks = 6 },
    { label = "12 Weeks", weeks = 12 } -- default
}

Config.RoadTaxPed = {
    model = 'a_m_m_prolhost_01',
    scenario = 'WORLD_HUMAN_CLIPBOARD'
}

Last updated