Garage Integration
Integrate Vehicle Keys with Zyke Garages or another garage resource.
Vehicle Keys does not require a garage. Without a provider, its menu lists accessible vehicles that currently exist in the world and supports plate-based lock and engine actions.
#Zyke Garages
Set the Vehicle Keys provider in zyke_lib/dependency_override.lua:
luavehicleKeys = "zyke_vehiclekeys",
Start the resources in this order:
cfgensure zyke_lib ensure zyke_vehiclekeys ensure zyke_garages
The integration keeps responsibilities separate:
| Garages | Vehicle Keys |
|---|---|
| VIN, ownership, garage entitlement, finance, impounds, persistent state, and storage | Physical or identifier keys, temporary access, lock and engine controls, key fob, theft, and compatibility |
| Converts its VIN to the canonical real plate before calling the key provider | Uses the canonical plate as its only vehicle identity |
| Supplies persistent and stored vehicle rows, GPS, summon, ownership, and replacement-key actions | Displays and executes the supported provider actions |
When Vehicle Keys is first used with a current Garages installation, Garages imports legacy access, frequency, and key-counter values only where Vehicle Keys does not already have a plate row. Existing standalone Vehicle Keys data is not overwritten.
#Garages With Another Key System
Garages 2.6.0 can use these providers through zyke_lib:
zyke_vehiclekeysqb-vehiclekeysqbx_vehiclekeysqs-vehiclekeyswasabi_carlock
Select the provider with vehicleKeys in zyke_lib/dependency_override.lua. Garages requires give, remove, and access checks. Optional features are shown only when the selected provider advertises the matching capability.
#Vehicle Keys With Another Garage
Any garage can use the server exports to give, remove, and check plate-based access.
At minimum, a garage normally calls:
luaexports["zyke_vehiclekeys"]:GiveKey(playerId, plate)
exports["zyke_vehiclekeys"]:RemoveKey(playerId, plate)
exports["zyke_vehiclekeys"]:HasKey(playerId, plate)
Persistent vehicle resources should also call:
SetAccesswhen their ownership or shared-access list changes.SetTemporaryAccessto restore provider-owned runtime access in identifier mode.RenamePlateafter a permanent plate change.DeleteVehicleafter permanent deletion.ImportVehicleStatefor a one-time, non-destructive migration.
#Optional Vehicle Menu Provider
Set Config.Settings.vehicleActions.menuProvider to a resource that supplies persistent menu rows:
luavehicleActions = {
menuProvider = "my_garage",
}
The provider can expose:
luaexports("GetVehicleKeyMenuVehicles", function()
return {
{
plate = "ABC123",
displayPlate = "ABC123",
modelName = "Sultan",
icon = "car",
netId = 1,
pos = vector3(0.0, 0.0, 0.0),
providerId = "garage-owned-opaque-id",
actionStates = {locked = false, engine = false, gps = false},
supportedActions = {gps = true, summon = true},
},
}
end)
exports("PerformVehicleKeyMenuAction", function(providerId, action, desiredState)
return action == "gps" or action == "summon"
end)
providerId stays opaque and never becomes key identity. Lock, engine, inventory, and access checks remain canonical-plate operations inside Vehicle Keys.