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.

#General

SettingDefaultDescription
debugfalseEnables resource debug output. Keep disabled during normal production use.

#keys

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",
    },
}
SettingDefaultDescription
keys.useIdentifierAccessfalsefalse uses physical inventory keys; true persists direct character access. See Access Modes.
keys.item"vehicle_keys"Inventory item used for physical keys.
keys.maxKeys0Maximum replacement keys when an integration requests limit enforcement. 0 is unlimited. Automatic and temporary grants do not consume this limit.
keys.fullInventoryFallback.enabledtrueRegisters a pending-key recovery command in item mode.
keys.fullInventoryFallback.command"getkeys"Command used to retry automatic grants that failed because the inventory was full.
keys.fullInventoryFallback.expiresAfter60Seconds a pending grant remains claimable.
keys.itemLabel.base"{MODEL_LABEL} - {PLATE}"Default physical key label. Supports {ITEM_LABEL}, {PLATE}, {VIN}, and {MODEL_LABEL}.
keys.itemLabel.allowCustomtrueLets players save their own label template.
keys.itemLabel.maxCharacters50Maximum custom template length.
keys.itemLabel.command"keylabel"Command that opens the custom label form.

#vehicleActions

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},
    },
}
SettingDefaultDescription
vehicleActions.maxDistance100.0Maximum server-authorized distance from a vehicle action. Set -1 to disable the distance limit.
vehicleActions.menuProvider"zyke_garages"Optional resource that adds persistent rows and provider actions to the vehicle list.
vehicleActions.menuKey"G"Tap to open the closest vehicle's key fob; hold to open the vehicle list.
vehicleActions.menuHoldDuration150Milliseconds the menu key must be held before opening the list.
vehicleActions.closeKeyFob.mouse"MOUSE_RIGHT"Mouse key used to close the key fob.
vehicleActions.closeKeyFob.keyboard"ESCAPE"Keyboard key used to close the key fob.
vehicleActions.lockClosest"L"Key used to lock or unlock the closest accessible vehicle. Set a non-string value to avoid registering it.
vehicleActions.ui.vehicleListtrueEnables the held-key vehicle list.
vehicleActions.ui.keyFobtrueEnables the focused key-fob UI.
vehicleActions.ui.reachIndicatortrueDisplays whether a listed vehicle is in action range.
vehicleActions.ui.distancetrueDisplays live distance.
vehicleActions.ui.enginetrueDisplays engine state and control.
vehicleActions.ui.locktrueDisplays lock state and control.
vehicleActions.ui.gpstrueDisplays provider GPS state and control when supported.
vehicleActions.sounds.keyBeepSee examplePlayer key-fob click sound.
vehicleActions.sounds.lockSee exampleSpatial vehicle lock sound.
vehicleActions.sounds.unlockSee exampleSpatial vehicle unlock sound.

Each sound accepts name, volume, and distance. Sounds are used only when zyke_sounds is running.

#vehicleEngine

SettingDefaultDescription
vehicleEngine.startKey"W"Key used to start the engine while driving.
vehicleEngine.stopKeyEnabledfalseRegisters a dedicated engine-stop keybind.
vehicleEngine.stopKey"O"Default stop key when enabled.
vehicleEngine.exitKey"F"Vehicle exit key monitored for engine-state behavior.
vehicleEngine.holdExitToKeepStatetrueDefault player behavior: hold exit to preserve the current engine state; tap to stop it.
vehicleEngine.autoStartEnginetrueStarts an off engine when an authorized player enters the driver's seat.
vehicleEngine.blockExitWhenLockedtruePrevents players from leaving a vehicle while its doors are locked.

Players can change holdExitToKeepState and autoStartEngine unless they are forced in personalSettings.

#personalSettings

SettingDefaultDescription
personalSettings.command"keysettings"Command that opens the personal settings form.
personalSettings.kvp"zyke_vehiclekeys:personal_settings"Local KVP used to save player preferences.
personalSettings.force.holdExitToKeepStatefalseLocks the exit preference to the configured vehicleEngine default.
personalSettings.force.autoStartEnginefalseLocks auto-start to the configured vehicleEngine default.

#npcVehicles

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,
    },
}
SettingDefaultDescription
npcVehicles.lock100Percentage chance an eligible NPC vehicle starts locked.
npcVehicles.requireKeytrueRequires key access to use NPC vehicles. Disabling it bypasses the search prompt and key requirement.
npcVehicles.allowSearchtrueMaster switch for searching eligible NPC vehicles.
npcVehicles.allowRobberytrueMaster switch for robbing NPC drivers.
npcVehicles.robbery.gunRobtrueAllows gunpoint robbery.
npcVehicles.robbery.pickupModels{"prop_paper_bag_01"}Models used for dropped key bags.
npcVehicles.robbery.pickupLifetime300Seconds a dropped key bag remains available.
npcVehicles.tempKeys.enabledtrueEnables the temporary-key search flow.
npcVehicles.tempKeys.chanceForSearch100Percentage chance a completed search finds keys.
npcVehicles.tempKeys.automaticSearchfalseStarts the configured search automatically on vehicle entry.
npcVehicles.tempKeys.automaticGivefalseSkips the search challenge and grants access automatically when eligible.
npcVehicles.tempKeys.searchKey"U"Manual search key.
npcVehicles.tempKeys.searchDuration3Search duration in seconds.
npcVehicles.tempKeys.skillChecktrueRuns the configured zyke_lib skill check during searches.

#pedWitnesses

SettingDefaultDescription
pedWitnesses.enabledtrueEnables witness detection for theft and robbery integrations.
pedWitnesses.debugfalseEnables witness-specific diagnostics.
pedWitnesses.maxDistance75.0Maximum witness search distance.
pedWitnesses.fieldOfView60.0Field of view in degrees for pedestrians on foot.
pedWitnesses.vehicleFieldOfView120.0Field of view in degrees for vehicle-driver witness fallback.
pedWitnesses.blacklistedModelsSee configHash or model-name map excluded from witness detection.

#lockpicking

lua
lockpicking = {
    enabled = true,
    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,
        },
    },
    dict = "anim@gangops@facility@servers@",
    anim = "hotwire",
    skillCheck = true,
}
SettingDefaultDescription
lockpicking.enabledtrueRegisters the configured lockpick items and flow.
lockpicking.itemUsageMode"durability""durability" removes configured durability, "breakOnFail" uses break chance after failure, and "disabled" does not consume the item.
lockpicking.blockInGarageSectionstrueThe default client hook blocks lockpicking inside Zyke Garages sections.
lockpicking.restrictedVehicles.tempfalseBlocks temporary/NPC vehicles when true.
lockpicking.restrictedVehicles.personalfalseBlocks personal vehicles when true.
lockpicking.restrictedVehicles.professiontrueBlocks profession vehicles when true.
lockpicking.timeToLockpick10Base duration in seconds before the per-item multiplier.
lockpicking.items[item].timeMultiplierPer itemMultiplies the base duration.
lockpicking.items[item].durability.successPer itemDurability removed after success.
lockpicking.items[item].durability.failurePer itemDurability removed after failure.
lockpicking.items[item].breakChancePer itemPercentage removal chance in breakOnFail mode.
lockpicking.items[item].failChance0Percentage chance to turn an otherwise successful attempt into failure.
lockpicking.items[item].breakOnChanceFailurefalseAllows a forced chance failure to also roll item breakage.
lockpicking.dict"anim@gangops@facility@servers@"Lockpick animation dictionary.
lockpicking.anim"hotwire"Lockpick animation clip.
lockpicking.skillChecktrueEnables the configured zyke_lib skill check.

The default config also defines veh_advancedlockpick with a faster multiplier, lower durability loss, and lower break chance.

#hotwiring

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 = true,
    buttonPress = {
        enabled = true,
        key = "H",
        timeMultiplier = 1.0,
    },
}
SettingDefaultDescription
hotwiring.enabledtrueEnables item and optional keybind hotwiring.
hotwiring.timeToHotwire15Base duration in seconds.
hotwiring.restrictedVehicles.tempfalseBlocks temporary/NPC vehicles when true.
hotwiring.restrictedVehicles.personalfalseBlocks personal vehicles when true.
hotwiring.restrictedVehicles.professiontrueBlocks profession vehicles when true.
hotwiring.items[item].timeMultiplierPer itemMultiplies the base duration for the usable item.
hotwiring.anim.dict"anim@gangops@facility@servers@"Animation dictionary.
hotwiring.anim.clip"hotwire"Animation clip.
hotwiring.skillChecktrueEnables the configured zyke_lib skill check.
hotwiring.buttonPress.enabledtrueRegisters hotwiring through a keybind without an item.
hotwiring.buttonPress.key"H"Default hotwire key.
hotwiring.buttonPress.timeMultiplier1.0Multiplies the base duration for keybind hotwiring.