Setup
Install and configure Vehicle Keys.
#Installation
- Install the latest
zyke_liband OxMySQL. - Download Vehicle Keys and keep the folder name
zyke_vehiclekeys. - Add the matching item definitions from
zyke_vehiclekeys/extras/items/to your inventory. - Copy the item images from
zyke_vehiclekeys/extras/items/images/into your inventory image directory. - Choose item or identifier access in
shared/unlocked/config.lua. - Stop or remove any key resource whose name is replaced by Vehicle Keys.
- Add the resources to
server.cfgin this order:
cfgensure oxmysql ensure zyke_lib ensure zyke_vehiclekeys
Vehicle Keys creates its database tables automatically.
#Access Mode
Config.Settings.keys.useIdentifierAccess selects the access model:
falseuses physicalvehicle_keysinventory items containing plate and frequency metadata.truestores 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_keyskeytoolveh_lockpickveh_advancedlockpickhotwire_kitadv_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:
luasetContainerProperties("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.
cfgensure zyke_sounds ensure zyke_vehiclekeys
The resource continues to work when zyke_sounds is not installed.
#Using Zyke Garages
Start Vehicle Keys before Garages:
cfgensure oxmysql ensure zyke_lib ensure zyke_vehiclekeys ensure zyke_garages
Set the vehicleKeys provider in zyke_lib/dependency_override.lua:
luavehicleKeys = "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-vehiclekeysqbx_vehiclekeysqs-vehiclekeyswasabi_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.