Documentation

Setup

Install and configure Vehicle Keys.

#Installation

  1. Install the latest zyke_lib and OxMySQL.
  2. Download Vehicle Keys and keep the folder name zyke_vehiclekeys.
  3. Add the matching item definitions from zyke_vehiclekeys/extras/items/ to your inventory.
  4. Copy the item images from zyke_vehiclekeys/extras/items/images/ into your inventory image directory.
  5. Choose item or identifier access in shared/unlocked/config.lua.
  6. Stop or remove any key resource whose name is replaced by Vehicle Keys.
  7. Add the resources to server.cfg in this order:
cfg
ensure oxmysql
ensure zyke_lib
ensure zyke_vehiclekeys

Vehicle Keys creates its database tables automatically.

#Access Mode

Config.Settings.keys.useIdentifierAccess selects the access model:

  • false uses physical vehicle_keys inventory items containing plate and frequency metadata.
  • true stores persistent character access in the Vehicle Keys database and uses runtime temporary access where appropriate.

Read Access Modes before changing the mode on an established server.

#Items

The supplied inventory files include:

  • vehicle_keys
  • keytool
  • veh_lockpick
  • veh_advancedlockpick
  • hotwire_kit
  • adv_hotwire_kit

If you rename an item, update the matching config entry. Item-based keys require an inventory that preserves metadata.

#ox_inventory Keytool

The optional keytool reduces inventory clutter by storing key items in a container. Add the supplied keytool item, then add a container definition above return containers in ox_inventory/modules/items/container.lua:

lua
setContainerProperties("keytool", {
    slots = 10,
    maxWeight = 1000,
    whitelist = {"vehicle_keys"},
})

Change the whitelist if Config.Settings.keys.item uses another item name.

#Optional Sounds

Install and start zyke_sounds, then copy the files from zyke_vehiclekeys/extras/sounds/ into zyke_sounds/nui/sounds.

cfg
ensure zyke_sounds
ensure zyke_vehiclekeys

The resource continues to work when zyke_sounds is not installed.

#Using Zyke Garages

Start Vehicle Keys before Garages:

cfg
ensure oxmysql
ensure zyke_lib
ensure zyke_vehiclekeys
ensure zyke_garages

Set the vehicleKeys provider in zyke_lib/dependency_override.lua:

lua
vehicleKeys = "zyke_vehiclekeys",

Garages keeps VIN, ownership, access entitlement, finance, impound, persistence, and storage authority. Vehicle Keys receives the canonical plate and owns runtime key access and controls. See Garage Integration for the full contract.

#Compatibility Replacements

Vehicle Keys declares replacement support for:

  • qb-vehiclekeys
  • qbx_vehiclekeys
  • qs-vehiclekeys
  • wasabi_carlock

Do not run the original resource alongside Vehicle Keys under one of these names. Existing resources can continue calling the supported exports and events; the compatibility layer translates them into the plate-based Vehicle Keys API.