Config

Config = {}

-- Enabling this will add additional prints and debug visuals
Config.debug = false
-- Whether to display a debug UI when in vehicles with chains
Config.debugUi = false
-- To safely restart the script during runtime use /kq_snowchains:restart
-- This will safely delete all the custom props before the automatic restart to prevent you from crashing

--
Config.locale = 'en'

Config.sql = {
    driver = 'oxmysql', -- oxmysql or ghmattimysql or mysql
    -- If you're using an older version of oxmysql set this to false
    newOxMysql = true,
}

-- Whether to set all the statebag values from the server only
Config.useStrictMode = false

Config.options = {
    -- The initialization distance for the attached props
    -- min: 30, max: 350
    renderDistance = 120,

    -- The refresh rate of the nearby vehicles - How often the script should scan for new and deleted vehicles
    -- min: 1000, max: 7500
    vehicleRefreshRate = 3000, -- ms
}

Config.items = {
    chain = 'kq_snowchain',
}

-- Whether to allow the use of the command instead of item usage. The command does not require an item.
Config.command = {
    enabled = true,
    command = 'snowchain'
}

-- Restrict the application and removal of chains to specific jobs
Config.jobsWhitelist = {
    enabled = false,
    jobs = {
        'mechanic',
    }
}

-- Restrict the ability of putting chains on specific vehicle classes
Config.blacklist = {
    -- Vehicle classes which may not have chains applied -- https://docs.fivem.net/natives/?_0x29439776AAA00A62
    classes = {
        8, 13, 14, 15, 16, 21, 22
    },
}

-- Whether to use a minigame for the chain installation
Config.installMinigame = {
    enabled = true,

    -- Amount of keys to hold
    length = 3,
    -- Duration in seconds
    duration = 2,
}

-- Whether the wheel health should decrease when the chain is used in non-snow conditions on hard surfaces
Config.wheelDamage = {
    enabled = true,

    -- Abstract damage multiplier
    damage = 3,
}

Config.saving = {
    -- Whether to save the placed chains in the database
    saveVehicles = true,
}

-- Snow handling system
Config.handling = {
    stats = {
        snowMultiplier = 1.0,  -- General snow traction loss multiplier
        chainGripBonus = 0.2,  -- Traction improvement per chain (20% by default)
        maxChainBonus = 0.9   -- Traction improvement with all 4 chains equipped (90% by default)
    },

    -- Whether to enable custom handling overwrite for snowy weathers - This will utilize a custom handling system which also works on weathers other than "XMAS"
    -- When this is disabled the handling will be managed through the native "XMAS" snow physics
    useCustomHandling = true,

    -- Whether to disable all handling modifiers.
    -- This may be useful if used with other scripts or to make the chains a purely visual thing
    disableAllHandlingModifiers = false,
}

-- Limits vehicle speed when chains are applied
Config.limitVehicleSpeed = {
    enabled = true,

    maxSpeed = 70, -- max vehicle speed in mph
}

-- Weathers during which the snow handling is enabled
Config.snowWeathers = {
    'XMAS',
    'SNOW',
    'SNOWLIGHT',
    'BLIZZARD',
}

-- Whether to skip a population type when checking vehicles for their presets
-- We perform a population type check on the vehicles before checking their state to filter out, and ignore all NPC vehicles
Config.skipPopulationTypeCheck = false

--- Override specific vehicle model wheel sizes
-- size = tire diameter multiplier
-- width = tire width in cm's
-- offset = chain attachment offset
Config.wheelSizeOverride = {
    ['aleutian'] = { width = 24, offset = -0.016 },
    ['asbo'] = { width = 18, offset = -0.01 },
    ['asterope'] = { width = 20, offset = 0.0 },
    ['asterope2'] = { width = 20, offset = -0.01 },
    ['astron'] = { width = 24, offset = -0.01 },
    ['baller'] = { width = 26, offset = -0.02 },
    ['baller5'] = { offset = -0.02 },
    ['baller6'] = { offset = -0.02 },
    ['baller8'] = { width = 24, offset = 0.0 },
    ['banshee'] = { width = 26, offset = 0.0 },
    ['barrage'] = { width = 36, offset = -0.034 },
    ['bestiagts'] = { width = 26, offset = 0.0 },
    ['blista'] = { width = 22, offset = 0.0 },
    ['blista2'] = { offset = -0.015 },
    ['blista3'] = { offset = -0.015 },
    ['brioso'] = { offset = -0.015 },
    ['broadway'] = { size = 1.03 },
    ['btype'] = { width = 16, offset = -0.02 },
    ['btype2'] = { width = 16, offset = -0.02 },
    ['buccaneer2'] = { width = 16, offset = -0.02 },
    ['buffalo4'] = { width = 22, offset = 0.0 },
    ['buffalo5'] = { width = 22, offset = 0.0 },
    ['bullet'] = { width = 24, offset = 0.0 },
    ['caracara2'] = { width = 28, offset = -0.02 },
    ['cavalcade'] = { width = 26, offset = 0 },
    ['cavalcade2'] = { width = 26, offset = 0 },
    ['cavalcade3'] = { width = 26, offset = 0 },
    ['champion'] = { width = 22, offset = 0 },
    ['chino'] = { width = 22, offset = 0 },
    ['cog55'] = { width = 24, offset = 0 },
    ['crusader'] = { width = 24, offset = 0 },
    ['cyclone'] = { width = 24, offset = 0 },
    ['dominator7'] = { offset = -0.02, size = 1.02 },
    ['dorado'] = { width = 24, offset = -0.02 },
    ['dubsta3'] = { size = 0.99, width = 34 },
    ['fr36'] = { width = 24 },
    ['driftfr36'] = { width = 24 },
    ['elegy'] = { offset = -0.02 },
    ['elegy2'] = { width = 24 },
    ['emerus'] = { offset = -0.015 },
    ['entity2'] = { offset = -0.015 },
    ['fbi2'] = { width = 34, offset = -0.015 },
    ['felon'] = { width = 26 },
    ['felon2'] = { width = 26 },
    ['freecrawler'] = { offset = -0.02 },
    ['fugitive'] = { width = 26 },
    ['kamacho'] = { size = 1.02 },
    ['furoregt'] = { width = 26 },
    ['fusilade'] = { width = 20 },
    ['gb200'] = { offset = -0.02 },
    ['gp1'] = { offset = -0.025 },
    ['granger'] = { width = 34, offset = -0.015 },
    ['gt500'] = { width = 18, offset = -0.01 },
    ['guardian'] = { offset = -0.015 },
    ['habanero'] = { width = 20, offset = -0.015 },
    ['hellion'] = { width = 34, offset = -0.01 },
    ['hotknife'] = { offset = -0.015 },
    ['huntley'] = { width = 26, offset = -0.01 },
    ['imorgon'] = { width = 22, offset = -0.01 },
    ['insurgent'] = { offset = -0.02 },
    ['insurgent2'] = { offset = -0.02 },
    ['issi8'] = { width = 20 },
    ['iwagen'] = { width = 22, offset = -0.02 },
    ['jester'] = { width = 24 },
    ['jester2'] = { width = 24 },
    ['jubilee'] = { width = 24, offset = -0.02 },
    ['kalahari'] = { width = 16 },
    ['kamacho'] = { width = 34, offset = -0.015 },
    ['khamelion'] = { width = 28 },
    ['krieger'] = { width = 24 },
    ['kuruma'] = { width = 22, offset = -0.01 },
    ['kuruma2'] = { width = 22, offset = -0.01 },
    ['l35'] = { width = 28, offset = -0.01 },
    ['landstalker2'] = { width = 24, offset = -0.01 },
    ['locust'] = { offset = -0.02 },
    ['mamba'] = { width = 26, offset = -0.01 },
    ['mesa'] = { width = 22 },
    ['neon'] = { width = 24, offset = -0.01 },
    ['panthere'] = { width = 20, offset = -0.01 },
    ['paragon'] = { width = 26, offset = -0.01 },
    ['paragon2'] = { width = 26, offset = -0.01 },
    ['patriot3'] = { width = 34, offset = -0.01 },
    ['prairie'] = { width = 18 },
    ['pranger'] = { width = 34, offset = -0.01 },
    ['premier'] = { width = 18, offset = -0.01 },
    ['previon'] = { width = 18, offset = -0.01 },
    ['prototipo'] = { width = 24, offset = -0.01 },
    ['ratel'] = { size = 1.04 },
    ['revolter'] = { width = 26 },
    ['romero'] = { width = 18 },
    ['riata'] = { width = 36, offset = -0.025, size = 1.02 },
    ['rumpo3'] = { width = 26, offset = -0.01 },
    ['sandking'] = { width = 36, offset = -0.025 },
    ['sandking2'] = { width = 36, offset = -0.025 },
    ['savestra'] = { offset = -0.025 },
    ['sc1'] = { width = 24 },
    ['schafter2'] = { width = 24 },
    ['schafter3'] = { width = 24, offset = -0.015 },
    ['schafter4'] = { width = 24, offset = -0.015 },
    ['schafter5'] = { width = 24, offset = -0.015 },
    ['schafter6'] = { width = 22, offset = -0.01 },
    ['schlagen'] = { width = 22, offset = -0.01 },
    ['schwarzer'] = { width = 22, offset = -0.01 },
    ['sentinel'] = { width = 22, offset = -0.01 },
    ['sentinel2'] = { width = 22, offset = -0.01 },
    ['sentinel3'] = { width = 20 },
    ['serrano'] = { width = 22, offset = -0.015 },
    ['sugoi'] = { width = 20, offset = -0.015 },
    ['sultan'] = { width = 18, offset = -0.015 },
    ['surano'] = { size = 1.03 },
    ['surge'] = { width = 22, offset = -0.015 },
    ['tahoma'] = { width = 18, offset = -0.015 },
    ['moonbeam'] = { width = 20, offset = -0.01 },
    ['moonbeam2'] = { width = 18, offset = -0.01 },
    ['tailgater'] = { width = 22 },
    ['tailgater2'] = { size = nil, width = 20, offset = -0.01 },
    ['taxi'] = { width = 20 },
    ['tempesta'] = { width = 24 },
    ['terminus'] = { width = 32 },
    ['thrax'] = { width = 28 },
    ['brickade'] = { offset = -0.01 },
    ['torero'] = { width = 16, offset = -0.01 },
    ['toros'] = { offset = -0.03 },
    ['trophytruck'] = { width = 36, size = 1.05, offset = -0.01 },
    ['trophytruck2'] = { width = 36, size = 1.05 },
    ['tulip'] = { width = 22, offset = -0.01 },
    ['vectre'] = { width = 24, offset = -0.015 },
    ['hermes'] = { size = nil, width = 26, offset = 0.0 },
    ['virtue'] = { size = nil, width = 24, offset = 0.0 },
    ['vigero3'] = { size = nil, width = 26, offset = 0.0 },
    ['zeno'] = { offset = 0.01 },
    ['rebla'] = { width = 26, offset = 0.01 },
    ['rhinehart'] = { width = 24, offset = 0.0 },
    ['kanjo'] = { width = 18, offset = -0.01 },
}

Last updated