Documentation

Config

Complete reference for the editable Vehicle Keys configuration.

The editable configuration is shared/unlocked/config.lua. Key names registered through FiveM keymapping can be changed by each player after the resource starts.

#Config.Settings

All Vehicle Keys settings.

#debug

Enables resource debug output. Keep this disabled during normal production use.

Example:

lua
debug = false

#keys

Settings for physical keys, identifier access, replacement limits, failed inventory grants, and item labels.

Example:

lua
keys = {
    useIdentifierAccess = false,
    item = "vehicle_keys",
    maxKeys = 0,
    fullInventoryFallback = {
        enabled = true,
        command = "getkeys",
        expiresAfter = 60,
    },
    itemLabel = {
        base = "{MODEL_LABEL} - {PLATE}",
        allowCustom = true,
        maxCharacters = 50,
        command = "keylabel",
    },
}

#keys.useIdentifierAccess

Uses physical inventory keys when false. When true, permanent access is persisted against the character identifier instead. See Access Modes.

Example:

lua
useIdentifierAccess = false

#keys.item

Inventory item used for physical keys.

Example:

lua
item = "vehicle_keys"

#keys.maxKeys

Maximum replacement keys when an integration requests limit enforcement. 0 is unlimited. Automatic and temporary grants do not consume this limit.

Example:

lua
maxKeys = 0

#keys.fullInventoryFallback

Settings for recovering automatic key grants that failed because the player's inventory was full. This is used only in physical item mode.

Example:

lua
fullInventoryFallback = {
    enabled = true,
    command = "getkeys",
    expiresAfter = 60,
}

#keys.fullInventoryFallback.enabled

Registers the pending-key recovery command in physical item mode.

Example:

lua
enabled = true

#keys.fullInventoryFallback.command

Command used to retry automatic grants that failed because the inventory was full.

Example:

lua
command = "getkeys"

#keys.fullInventoryFallback.expiresAfter

Seconds a pending key grant remains claimable.

Example:

lua
expiresAfter = 60

#keys.itemLabel

Settings for the physical key item label and player-defined label templates.

Example:

lua
itemLabel = {
    base = "{MODEL_LABEL} - {PLATE}",
    allowCustom = true,
    maxCharacters = 50,
    command = "keylabel",
}

#keys.itemLabel.base

Default physical key label. Supports {ITEM_LABEL}, {PLATE}, {VIN}, and {MODEL_LABEL}.

Example:

lua
base = "{MODEL_LABEL} - {PLATE}"

#keys.itemLabel.allowCustom

Lets players save their own physical key-label template.

Example:

lua
allowCustom = true

#keys.itemLabel.maxCharacters

Maximum length of a custom key-label template.

Example:

lua
maxCharacters = 50

#keys.itemLabel.command

Command that opens the custom key-label form.

Example:

lua
command = "keylabel"

#vehicleActions

Settings for the key fob, vehicle list, lock shortcut, action range, menu provider, and sounds.

Example:

lua
vehicleActions = {
    maxDistance = 100.0,
    menuProvider = "zyke_garages",
    menuKey = "G",
    menuHoldDuration = 150,
    closeKeyFob = {
        mouse = "MOUSE_RIGHT",
        keyboard = "ESCAPE",
    },
    lockClosest = "L",
    ui = {
        vehicleList = true,
        keyFob = true,
        reachIndicator = true,
        distance = true,
        engine = true,
        lock = true,
        gps = true,
    },
    sounds = {
        keyBeep = {name = "carkey_beep.wav", volume = 0.025, distance = 2.0},
        lock = {name = "vehicle_lock.wav", volume = 0.025, distance = 8.0},
        unlock = {name = "vehicle_unlock.wav", volume = 0.025, distance = 8.0},
    },
}

#vehicleActions.maxDistance

Maximum server-authorized distance from a vehicle action. Set -1 to disable the distance limit.

Example:

lua
maxDistance = 100.0

#vehicleActions.menuProvider

Optional resource that adds persistent rows and provider actions to the vehicle list.

Example:

lua
menuProvider = "zyke_garages"

#vehicleActions.menuKey

Keymapping default used to open vehicle actions. Tap it for the closest accessible vehicle's key fob or hold it for the vehicle list.

Example:

lua
menuKey = "G"

#vehicleActions.menuHoldDuration

Milliseconds the menu key must be held before opening the vehicle list.

Example:

lua
menuHoldDuration = 150

#vehicleActions.closeKeyFob

Mouse and keyboard keymapping defaults used to close the focused key fob.

Example:

lua
closeKeyFob = {
    mouse = "MOUSE_RIGHT",
    keyboard = "ESCAPE",
}

#vehicleActions.closeKeyFob.mouse

Mouse key used to close the key fob.

Example:

lua
mouse = "MOUSE_RIGHT"

#vehicleActions.closeKeyFob.keyboard

Keyboard key used to close the key fob.

Example:

lua
keyboard = "ESCAPE"

#vehicleActions.lockClosest

Keymapping default used to lock or unlock the closest accessible vehicle. Set a non-string value to avoid registering this keybind.

Example:

lua
lockClosest = "L"

#vehicleActions.ui

Controls which vehicle-action interfaces and states are shown.

Example:

lua
ui = {
    vehicleList = true,
    keyFob = true,
    reachIndicator = true,
    distance = true,
    engine = true,
    lock = true,
    gps = true,
}

#vehicleActions.ui.vehicleList

Enables the held-key vehicle list.

Example:

lua
vehicleList = true

#vehicleActions.ui.keyFob

Enables the focused key-fob interface.

Example:

lua
keyFob = true

#vehicleActions.ui.reachIndicator

Displays whether a listed vehicle is inside the authorized action range.

Example:

lua
reachIndicator = true

#vehicleActions.ui.distance

Displays the live distance to each listed vehicle.

Example:

lua
distance = true

#vehicleActions.ui.engine

Displays engine state and engine controls.

Example:

lua
engine = true

#vehicleActions.ui.lock

Displays lock state and lock controls.

Example:

lua
lock = true

#vehicleActions.ui.gps

Displays provider GPS state and controls when the configured menu provider supports them.

Example:

lua
gps = true

#vehicleActions.sounds

Configured key-fob, lock, and unlock sounds. Each sound accepts name, volume, and distance. Sounds are used only when zyke_sounds is running.

Example:

lua
sounds = {
    keyBeep = {name = "carkey_beep.wav", volume = 0.025, distance = 2.0},
    lock = {name = "vehicle_lock.wav", volume = 0.025, distance = 8.0},
    unlock = {name = "vehicle_unlock.wav", volume = 0.025, distance = 8.0},
}

#vehicleActions.sounds.keyBeep

Player key-fob click sound.

Example:

lua
keyBeep = {name = "carkey_beep.wav", volume = 0.025, distance = 2.0}

#vehicleActions.sounds.lock

Spatial vehicle lock sound.

Example:

lua
lock = {name = "vehicle_lock.wav", volume = 0.025, distance = 8.0}

#vehicleActions.sounds.unlock

Spatial vehicle unlock sound.

Example:

lua
unlock = {name = "vehicle_unlock.wav", volume = 0.025, distance = 8.0}

#vehicleActions.sounds[sound].name

Sound file played through zyke_sounds.

Example:

lua
name = "vehicle_lock.wav"

#vehicleActions.sounds[sound].volume

Playback volume for the configured sound.

Example:

lua
volume = 0.025

#vehicleActions.sounds[sound].distance

Maximum spatial playback distance for the configured sound.

Example:

lua
distance = 8.0

#vehicleEngine

Settings for starting, stopping, and leaving vehicles. Player-specific exit and automatic-start defaults are configured through personalSettings.settings.

Example:

lua
vehicleEngine = {
    startKey = "W",
    stopKeyEnabled = false,
    stopKey = "O",
    exitKey = "F",
    blockExitWhenLocked = true,
}

#vehicleEngine.startKey

Keymapping default used to start the engine while driving.

Example:

lua
startKey = "W"

#vehicleEngine.stopKeyEnabled

Registers a dedicated engine-stop keybind.

Example:

lua
stopKeyEnabled = false

#vehicleEngine.stopKey

Keymapping default used to stop the engine when the dedicated stop key is enabled.

Example:

lua
stopKey = "O"

#vehicleEngine.exitKey

Vehicle exit key monitored for engine-state behavior.

Example:

lua
exitKey = "F"

#vehicleEngine.blockExitWhenLocked

Prevents players from leaving a vehicle while its doors are locked.

Example:

lua
blockExitWhenLocked = true

#personalSettings

Settings for the player-configurable engine-start and vehicle-exit menu. Changes save immediately to the configured local KVP.

Example:

lua
personalSettings = {
    command = "keysettings",
    kvp = "zyke_vehiclekeys:personal_settings",
    settings = {
        {
            name = "holdExitToKeepState",
            values = {false, true},
            default = true,
            force = false,
        },
        {
            name = "autoStartEngine",
            values = {false, true},
            default = true,
            force = false,
        },
    },
}

#personalSettings.command

Command that opens the personal settings menu.

Example:

lua
command = "keysettings"

#personalSettings.kvp

Local KVP used to save player preferences. Changing this value makes existing selections unavailable under the new key.

Example:

lua
kvp = "zyke_vehiclekeys:personal_settings"

#personalSettings.settings

Ordered personal setting definitions displayed in the menu. Entry order controls card order, and each values array controls button order. Keep both supported setting names. See Personal Settings for the complete player behavior.

Example:

lua
settings = {
    {
        name = "holdExitToKeepState",
        values = {false, true},
        default = true,
        force = false,
    },
    {
        name = "autoStartEngine",
        values = {false, true},
        default = true,
        force = false,
    },
}

#personalSettings.settings[x]

One menu definition containing the internal name, allowed values, default, and forced state.

Example:

lua
settings[1] = {
    name = "holdExitToKeepState",
    values = {false, true},
    default = true,
    force = false,
}

#personalSettings.settings[x].name

Internal setting name used by Vehicle Keys. holdExitToKeepState controls tap-and-hold exit behavior. autoStartEngine starts an off engine when the player enters the driver's seat and engine use is allowed.

Example:

lua
name = "holdExitToKeepState"

#personalSettings.settings[x].values

Choices displayed from left to right. Both current settings require {false, true}.

Example:

lua
values = {false, true}

#personalSettings.settings[x].default

Initial value when the player has no valid saved selection. The default must be present in values.

Example:

lua
default = true

#personalSettings.settings[x].force

Locks the setting to its configured default. The player's saved selection remains stored and becomes active again when the lock is removed.

Example:

lua
force = false

#npcVehicles

Settings for NPC vehicle locks, searches, temporary keys, and gunpoint robbery.

Example:

lua
npcVehicles = {
    lock = 100,
    requireKey = true,
    allowSearch = true,
    allowRobbery = true,
    robbery = {
        gunRob = true,
        pickupModels = {"prop_paper_bag_01"},
        pickupLifetime = 300,
    },
    tempKeys = {
        enabled = true,
        chanceForSearch = 100,
        automaticSearch = false,
        automaticGive = false,
        searchKey = "U",
        searchDuration = 3,
        skillCheck = true,
    },
}

#npcVehicles.lock

Percentage chance an eligible NPC vehicle starts locked.

Example:

lua
lock = 100

#npcVehicles.requireKey

Requires key access to use NPC vehicles. Disabling this bypasses the search prompt and key requirement.

Example:

lua
requireKey = true

#npcVehicles.allowSearch

Master switch for searching eligible NPC vehicles.

Example:

lua
allowSearch = true

#npcVehicles.allowRobbery

Master switch for robbing NPC drivers.

Example:

lua
allowRobbery = true

#npcVehicles.robbery

Settings for robbing NPC drivers and collecting dropped keys.

Example:

lua
robbery = {
    gunRob = true,
    pickupModels = {"prop_paper_bag_01"},
    pickupLifetime = 300,
}

#npcVehicles.robbery.gunRob

Allows gunpoint robbery of eligible NPC drivers.

Example:

lua
gunRob = true

#npcVehicles.robbery.pickupModels

Prop models used for dropped key bags.

Example:

lua
pickupModels = {"prop_paper_bag_01"}

#npcVehicles.robbery.pickupLifetime

Seconds a dropped key bag remains available.

Example:

lua
pickupLifetime = 300

#npcVehicles.tempKeys

Settings for searching NPC vehicles and granting temporary access.

Example:

lua
tempKeys = {
    enabled = true,
    chanceForSearch = 100,
    automaticSearch = false,
    automaticGive = false,
    searchKey = "U",
    searchDuration = 3,
    skillCheck = true,
}

#npcVehicles.tempKeys.enabled

Enables the temporary-key search flow.

Example:

lua
enabled = true

#npcVehicles.tempKeys.chanceForSearch

Percentage chance a completed search finds keys.

Example:

lua
chanceForSearch = 100

#npcVehicles.tempKeys.automaticSearch

Starts the configured search automatically when the player enters an eligible vehicle.

Example:

lua
automaticSearch = false

#npcVehicles.tempKeys.automaticGive

Skips the search challenge and grants access automatically when the vehicle is eligible.

Example:

lua
automaticGive = false

#npcVehicles.tempKeys.searchKey

Keymapping default used to search an NPC vehicle manually.

Example:

lua
searchKey = "U"

#npcVehicles.tempKeys.searchDuration

Search duration in seconds.

Example:

lua
searchDuration = 3

#npcVehicles.tempKeys.skillCheck

Runs the configured zyke_lib skill check during vehicle searches.

Example:

lua
skillCheck = true

#pedWitnesses

Settings used to detect pedestrians who witnessed theft and robbery stages. Detection returns witness data for hooks and events; it does not create dispatch alerts by itself.

Example:

lua
pedWitnesses = {
    enabled = true,
    debug = false,
    maxDistance = 75.0,
    fieldOfView = 60.0,
    vehicleFieldOfView = 120.0,
    blacklistedModels = {
        [joaat("g_m_importexport_01")] = true,
    },
}

#pedWitnesses.enabled

Enables witness detection for theft and robbery integrations.

Example:

lua
enabled = true

#pedWitnesses.debug

Enables witness-specific diagnostics.

Example:

lua
debug = false

#pedWitnesses.maxDistance

Default maximum witness search distance. Individual events can supply a smaller distance.

Example:

lua
maxDistance = 75.0

#pedWitnesses.fieldOfView

Field of view in degrees for pedestrians on foot.

Example:

lua
fieldOfView = 60.0

#pedWitnesses.vehicleFieldOfView

Field of view in degrees for the vehicle-driver witness fallback.

Example:

lua
vehicleFieldOfView = 120.0

#pedWitnesses.blacklistedModels

Hash or model-name map excluded from witness detection.

Example:

lua
blacklistedModels = {
    [joaat("g_m_importexport_01")] = true,
}

#lockpicking

Settings for lockpick items, restrictions, witness range, skill checks, progress duration, and item damage.

Example:

lua
lockpicking = {
    enabled = true,
    witnessDistance = 15.0,
    itemUsageMode = "durability",
    blockInGarageSections = true,
    restrictedVehicles = {
        temp = false,
        personal = false,
        profession = true,
    },
    timeToLockpick = 10,
    items = {
        veh_lockpick = {
            timeMultiplier = 1.2,
            durability = {success = 0, failure = 20},
            breakChance = 25,
            failChance = 0,
            breakOnChanceFailure = false,
        },
        veh_advancedlockpick = {
            timeMultiplier = 0.8,
            durability = {success = 0, failure = 10},
            breakChance = 10,
            failChance = 0,
            breakOnChanceFailure = false,
        },
    },
    dict = "anim@gangops@facility@servers@",
    anim = "hotwire",
    skillCheck = {"easy", "medium", "hard"},
}

#lockpicking.enabled

Registers the configured lockpick items and flow.

Example:

lua
enabled = true

#lockpicking.witnessDistance

Maximum distance used for pedestrian witness checks when a lockpick attempt starts.

Example:

lua
witnessDistance = 15.0

#lockpicking.itemUsageMode

Controls how lockpick items are consumed. "durability" removes configured durability, "breakOnFail" rolls break chance after failure, and "disabled" does not consume the item.

Example:

lua
itemUsageMode = "durability"

#lockpicking.blockInGarageSections

Makes the default client hook block lockpicking inside Zyke Garages sections.

Example:

lua
blockInGarageSections = true

#lockpicking.restrictedVehicles

Vehicle categories blocked from lockpicking when their value is true.

Example:

lua
restrictedVehicles = {
    temp = false,
    personal = false,
    profession = true,
}

#lockpicking.restrictedVehicles.temp

Blocks temporary and NPC vehicles from lockpicking when enabled.

Example:

lua
temp = false

#lockpicking.restrictedVehicles.personal

Blocks player-owned personal vehicles from lockpicking when enabled.

Example:

lua
personal = false

#lockpicking.restrictedVehicles.profession

Blocks profession vehicles from lockpicking when enabled.

Example:

lua
profession = true

#lockpicking.timeToLockpick

Base lockpick duration in seconds before the configured item multiplier.

Example:

lua
timeToLockpick = 10

#lockpicking.items

Lockpick items and their duration, durability, break, and forced-failure settings.

Example:

lua
items = {
    veh_lockpick = {
        timeMultiplier = 1.2,
        durability = {success = 0, failure = 20},
        breakChance = 25,
        failChance = 0,
        breakOnChanceFailure = false,
    },
    veh_advancedlockpick = {
        timeMultiplier = 0.8,
        durability = {success = 0, failure = 10},
        breakChance = 10,
        failChance = 0,
        breakOnChanceFailure = false,
    },
}

#lockpicking.items[item]

Settings for one usable lockpick item.

Example:

lua
veh_lockpick = {
    timeMultiplier = 1.2,
    durability = {success = 0, failure = 20},
    breakChance = 25,
    failChance = 0,
    breakOnChanceFailure = false,
}

#lockpicking.items[item].timeMultiplier

Multiplies the base lockpick duration for this item.

Example:

lua
timeMultiplier = 1.2

#lockpicking.items[item].durability

Durability removed after a successful or failed attempt when itemUsageMode is "durability".

Example:

lua
durability = {success = 0, failure = 20}

#lockpicking.items[item].durability.success

Durability removed after a successful attempt when itemUsageMode is "durability".

Example:

lua
success = 0

#lockpicking.items[item].durability.failure

Durability removed after a failed attempt when itemUsageMode is "durability".

Example:

lua
failure = 20

#lockpicking.items[item].breakChance

Percentage removal chance after failure when itemUsageMode is "breakOnFail".

Example:

lua
breakChance = 25

#lockpicking.items[item].failChance

Percentage chance to turn an otherwise successful attempt into a failure.

Example:

lua
failChance = 0

#lockpicking.items[item].breakOnChanceFailure

Allows a forced chance failure to also roll item breakage in "breakOnFail" mode.

Example:

lua
breakOnChanceFailure = false

#lockpicking.dict

Lockpick animation dictionary.

Example:

lua
dict = "anim@gangops@facility@servers@"

#lockpicking.anim

Lockpick animation clip.

Example:

lua
anim = "hotwire"

#lockpicking.skillCheck

Runs each zyke_lib skill-check difficulty in order. Set false to disable the skill check.

Example:

lua
skillCheck = {"easy", "medium", "hard"}

#hotwiring

Settings for hotwire items, vehicle restrictions, animation, staged skill checks, failure penalties, and the optional button prompt.

Example:

lua
hotwiring = {
    enabled = true,
    timeToHotwire = 15,
    restrictedVehicles = {
        temp = false,
        personal = false,
        profession = true,
    },
    items = {
        hotwire_kit = {timeMultiplier = 1.2},
        adv_hotwire_kit = {timeMultiplier = 0.8},
    },
    anim = {dict = "anim@gangops@facility@servers@", clip = "hotwire"},
    skillCheck = {"easy", "medium", "hard"},
    failurePenalty = {
        enabled = true,
        healthLoss = 10,
    },
    buttonPress = {
        enabled = true,
        key = "H",
        timeMultiplier = 1.0,
    },
}

#hotwiring.enabled

Enables item and optional keybind hotwiring.

Example:

lua
enabled = true

#hotwiring.timeToHotwire

Base hotwire duration in seconds before the item or button multiplier.

Example:

lua
timeToHotwire = 15

#hotwiring.restrictedVehicles

Vehicle categories blocked from hotwiring when their value is true.

Example:

lua
restrictedVehicles = {
    temp = false,
    personal = false,
    profession = true,
}

#hotwiring.restrictedVehicles.temp

Blocks temporary and NPC vehicles from hotwiring when enabled.

Example:

lua
temp = false

#hotwiring.restrictedVehicles.personal

Blocks player-owned personal vehicles from hotwiring when enabled.

Example:

lua
personal = false

#hotwiring.restrictedVehicles.profession

Blocks profession vehicles from hotwiring when enabled.

Example:

lua
profession = true

#hotwiring.items

Hotwire items and their duration multipliers.

Example:

lua
items = {
    hotwire_kit = {timeMultiplier = 1.2},
    adv_hotwire_kit = {timeMultiplier = 0.8},
}

#hotwiring.items[item]

Settings for one usable hotwire item.

Example:

lua
hotwire_kit = {
    timeMultiplier = 1.2,
}

#hotwiring.items[item].timeMultiplier

Multiplies the base hotwire duration for this item.

Example:

lua
timeMultiplier = 1.2

#hotwiring.anim

Hotwire animation dictionary and clip.

Example:

lua
anim = {dict = "anim@gangops@facility@servers@", clip = "hotwire"}

#hotwiring.anim.dict

Hotwire animation dictionary.

Example:

lua
dict = "anim@gangops@facility@servers@"

#hotwiring.anim.clip

Hotwire animation clip.

Example:

lua
clip = "hotwire"

#hotwiring.skillCheck

Runs each zyke_lib skill-check difficulty in order. Set false to disable the skill check.

Example:

lua
skillCheck = {"easy", "medium", "hard"}

#hotwiring.failurePenalty

Electrical failure effect applied when an attempt fails while the player remains inside the vehicle.

Example:

lua
failurePenalty = {
    enabled = true,
    healthLoss = 10,
}

#hotwiring.failurePenalty.enabled

Enables the electrical visual, camera, particle, and health penalty after a failed attempt.

Example:

lua
enabled = true

#hotwiring.failurePenalty.healthLoss

Health removed by the enabled failure penalty.

Example:

lua
healthLoss = 10

#hotwiring.buttonPress

Settings for starting a hotwire attempt through a keybind instead of an inventory item.

Example:

lua
buttonPress = {
    enabled = true,
    key = "H",
    timeMultiplier = 1.0,
}

#hotwiring.buttonPress.enabled

Registers the button-press hotwire prompt and keybind.

Example:

lua
enabled = true

#hotwiring.buttonPress.key

Keymapping default used to start button-press hotwiring.

Example:

lua
key = "H"

#hotwiring.buttonPress.timeMultiplier

Multiplies the base hotwire duration for button-press attempts.

Example:

lua
timeMultiplier = 1.0