NullSect
Systems nominal

Docs / Car Thief / Configuration

Configuration — ns-carthief

Every option lives in config.lua. It stays readable and editable in the escrowed release, like the files in locales/. Restart the resource after a change.

General

OptionDefaultWhat it does
Config.Framework'auto''auto', 'qbox', 'qbcore', 'esx' or 'standalone'
Config.Locale'en''en' or 'tr'; add locales/<code>.lua for more
Config.Debugfalsedebug logs; also enables /carthieftest for admins
Config.UseOxLibtrueox_lib notifications when ox_lib is started
Config.Inventory'auto''auto', 'ox', 'framework' or 'none'

Features

Config.Features = {
    Lockpick = true,      -- open locked vehicles with the lockpick minigame
    Hotwire = true,       -- start vehicles without keys with the hotwire minigame
    Progression = true,   -- thief XP / level
    OwnerAlert = true,    -- the online owner of a player vehicle is told when its alarm goes off
}

Who may steal

OptionDefaultWhat it does
Config.Job.requiredfalsetrue = only players with Config.Job.name (at least minGrade) may steal
Config.Job.requireOnDutyfalsethe job must also be on duty
Config.Police.jobs{ 'police' }police jobs: they get the alerts and are counted for minOnDuty
Config.Police.minOnDuty0police on duty needed before anyone may steal (0 = no requirement)

Items

OptionDefaultWhat it does
Config.Items.lockpick'lockpick'normal lockpick
Config.Items.advancedLockpick'advancedlockpick'used first when the player has both
Config.Items.hotwireTool'screwdriverset'needed for the hotwire; false = no item
Config.Items.takeOverUsetrueusing a lockpick item opens our minigame (see INSTALLATION for the ensure order)
Config.Items.forwardEvent'lockpicks:UseLockpick'server event fired when a lockpick is used away from a vehicle

Tiers

Each vehicle gets a tier: Config.Vehicles.tierByModel[model] → tierByClass[class] → defaultTier.

normal = {
    lockpick = { pins = 2, toleranceDeg = 7, falloffDeg = 45, pickHealth = 100, timeMs = 50000 },
    hotwire = { screws = 3, wires = 6, stripWindow = 0.22, stripSpeed = 1.0, twistTurns = 3, crankWindowMs = 520 },
    xp = 15,
},
FieldMeaning
lockpick.pinssweet spots to find one after the other
lockpick.toleranceDeghalf-width of the sweet spot in degrees (the pick moves over 180°); smaller is harder
lockpick.falloffDeghow far from the sweet spot the cylinder still turns a little
lockpick.pickHealthhow much stress the pick takes before it snaps
lockpick.timeMstime for the whole lock
hotwire.screwsscrews on the column cover (1–6)
hotwire.wireswires in the harness; three of them are on the tag
hotwire.stripWindowsize of the marked strip zone (part of the wire)
hotwire.stripSpeedspeed of the stripper
hotwire.twistTurnsfull circles needed to twist the wires
hotwire.crankWindowMshow long you have to let go after the engine catches
xpthief XP for a success

The defaults go from easy (1 pin, 9°) to expert (4 pins, 4.5°).

Vehicles

OptionDefaultWhat it does
allowPlayerOwnedtruefalse = vehicles in the framework's owned-vehicles table cannot be stolen
defaultTier'normal'tier for classes and models not listed
tierByClasscompacts easy … super / open wheel expertGTA class (0–22) → tier
tierByModelemptymodel name → tier, wins over the class
blacklistClassescycles, boats, helicopters, planes, emergency, military, trainsclasses that can never be stolen
blacklistModelspolice, sheriff, FBI, ambulance, fire truck, tanks …models that can never be stolen
Config.Vehicles.tierByModel = {
    adder = 'expert',   -- example
}

blacklistModels is checked with the model the server reads and cannot be faked. The class has no server native: it is reported by the client and only chooses the tier and the class blacklist. Put every vehicle that must never be stolen in blacklistModels.

Lockpick

OptionDefaultWhat it does
maxDistance3.0metres between the player and the vehicle, checked on the server
minTurnMs180quicker turns are refused
stressDamage14pick health lost by a fully wrong turn (less when it was nearly right)
advanced{ toleranceMul = 1.35, healthMul = 1.6 }advanced lockpick bonus
breakRemovesItemtruea snapped pick is removed from the inventory
retryCooldown4seconds before the next attempt after a failed or cancelled one
animbreak-in animation{ dict, clip, flag }

Hotwire

OptionDefaultWhat it does
key'G'default key; players can rebind it in GTA settings → FiveM
maxMistakes4mistakes (wrong cut, missed strip, burnt starter) before the wires are ruined
shockChance0.5chance that a mistake gives an electric shock
shockDamage5health lost by a shock
toolBreakChance0.1chance the tool breaks on a failed hotwire (0 = never)
crankAttempts3starter attempts in the last step
timeMs90000time for the whole hotwire
retryCooldown6seconds before the next attempt after a failed or cancelled one
startEnginetruestart the engine right after a successful hotwire
animhotwire animation{ dict, clip, flag }

Alarm

OptionDefaultWhat it does
chance1.0chance a lockpick attempt sets the alarm off, used when the tier has no entry below
chanceByTiereasy 0.7, normal 0.9, hard 1.0, expert 1.0chance per tier
durationMs30000how long the horn and lights run
cooldown60seconds before the same vehicle alarms and alerts again

Dispatch

OptionDefaultWhat it does
enabledtruepolice alerts on / off
provider'auto''ps-dispatch', 'cd_dispatch', 'rcore_dispatch', 'core_dispatch', 'builtin', 'custom' or 'none'
alarmChance0.75chance an alarm reaches the police
hotwireChance0.25chance a successful hotwire is reported (a witness)
dispatchJobsniljob list for the dispatch resource (default Config.Police.jobs)
alertOffset{ min = 20, max = 70 }the police get the area, not the spot (metres)
alertBlipSeconds90lifetime of the built-in alert blip

The built-in alert (used when no dispatch resource is started) sends a notification and a timed area blip to police on duty. A custom hook:

Config.Dispatch.provider = 'custom'
Config.Dispatch.custom = function(src, coords, kind, message)   -- server; kind = 'alarm' | 'hotwire'
    exports.my_dispatch:Send(coords, message)
    return true          -- anything else (or an error) falls back to the built-in alert
end

Custom keys

Config.VehicleKeys.provider: 'auto', 'qbx_vehiclekeys', 'qb-vehiclekeys', 'none' or 'custom'.

Config.VehicleKeys = {
    provider = 'custom',
    custom = {
        give = function(src, vehicle, plate) exports.my_keys:Give(src, plate) end,
        has = function(src, vehicle, plate) return exports.my_keys:Has(src, plate) end,
        hasClient = function(vehicle, plate) return exports.my_keys:HasClient(plate) end,
    },
}

With 'none' the script remembers hotwired vehicles itself.

Progression

OptionDefaultWhat it does
xpPerLevel100level = floor(xp / xpPerLevel) + 1
maxLevel30
toleranceDegPerLevel0.08the lockpick sweet spot grows a little per level
windowPerLevel0.004the hotwire strip zone grows a little per level
maxBonusLevels20levels above this give no further bonus

Interface

OptionDefaultWhat it does
Config.Ui.volume0.7minigame sounds (0–1)
Config.Ui.showLeveltruethief level in the minigame header
Config.Target.provider'auto''ox_target', 'qb-target' or 'none' (built-in [E] prompt)
Config.Target.distance2.0target distance
Config.Notifications.provider'auto''ox_lib', 'qbox', 'qbcore', 'esx', 'native' or 'custom'

Admin and security

OptionDefaultWhat it does
Config.Admin.ace'ns-carthief.admin'ACE for the admin commands
Config.Admin.useFrameworkAdmintrueframework admins count as admins too
Config.Security.dropAfterFlags0suspicious requests before a kick; 0 = log only
Config.Database.autoMigratetruecreate / update tables on start

Admin commands:

  • /carthiefreset <id>: reset a player's progression and cancel their attempt.
  • /carthieftest <pick|wire> [tier]: open a minigame without a vehicle. Needs Config.Debug = true. A test never unlocks, gives keys, removes items, sets an alarm or gives XP.

Cart

Your cart is empty.