Vehicle Keys (qs-vehiclekeys) replaces qb-vehiclekeys, qbx_vehiclekeys and any other key script. It is a different system — most key scripts keep a list of keys on the server, while here every key is an inventory item — so the old one has to go before Vehicle Keys starts. This page removes it cleanly and lists what keeps working for the scripts that used to talk to it.
Running both at once means two scripts locking the same cars, two engine blocks, two hotwire prompts, competing keybinds — and a key from one means nothing to the other. Remove the old script before you start Vehicle Keys.
What Keeps Working#
Vehicle Keys answers the events most garages, jobs and dealerships fire at the QBCore and Qbox key scripts, so those keep working unchanged:
Event | Side | What Vehicle Keys does |
|---|---|---|
| Client | Gives the player the key for that plate. |
| Client | Gives the player the key for that plate. |
| Client | Takes that plate's key away. |
| Server | Gives the calling player the key. |
| Server | Takes the calling player's key away. |
| Server | Locks the car for everyone when |
| Server | Removes one |
| Callback | Gives the key of that networked vehicle and returns |
A plate on its own becomes a key by finding the spawned car with that plate — or, when none is out, its owned-vehicle record — to read the model.
Exports need one change#
A script that calls exports['qb-vehiclekeys'] or exports.qbx_vehiclekeys asks for a resource that is no longer there. Vehicle Keys has the same functions under its own name, so the fix is the resource name and nothing else:
-- Before
exports.qbx_vehiclekeys:GiveKeys(source, vehicle)
local ok = exports.qbx_vehiclekeys:HasKeys(source, vehicle)
-- After: same arguments, same results
exports['qs-vehiclekeys']:GiveKeys(source, vehicle)
local ok = exports['qs-vehiclekeys']:HasKeys(source, vehicle)Export | Side | Arguments and behaviour |
|---|---|---|
| Server |
|
| Server |
|
| Server |
|
| Server |
|
| Client |
|
The client export named
GiveKeysis Vehicle Keys' own and takes(plate, model, bypassKeyCheck). The source-first versions above are server-side only. Commands and Exports has both.
Removing It Step by Step#
Stop the old resource
Stop the server, or stop the old key script from the server console:
bash stop qb-vehiclekeys # or stop qbx_vehiclekeysTake it out of server.cfg
Delete — or comment out — the line that starts it:
bash # ensure qb-vehiclekeys # ensure qbx_vehiclekeysIf it lives in a bracket folder started with one line, such as
ensure [qb], that line starts everything inside — move the old folder out instead.Delete the folder
Remove the old resource from
resources/. If another resource then refuses to start because the old one is missing, it lists it as adependencyin itsfxmanifest.lua— remove that line from it.Decide about the lockpicks
qb-vehiclekeys used
lockpickandadvancedlockpick. Vehicle Keys defaults tocarlockpickandcaradvancedlockpick. Either add the new items (Inventory Items), or point the config at the ones your players already carry:lua -- config/main.lua, inside Config.Lockpick Item = 'lockpick', AdvancedItem = 'advancedlockpick',Only do that if nothing else — a house robbery, say — registers those items as usable too, or both scripts react to the same item.
Update the scripts that call its exports
Search your resources for
qb-vehiclekeysandqbx_vehiclekeys. Everyexports[...]call changes toexports['qs-vehiclekeys']; the events in the table above can stay as they are.Replace other key scripts' calls
wasabi_carlock,MrNewbVehicleKeysand others have APIs of their own with no compatibility layer here. Swap their calls forGiveKeys/GiveServerKeys— see Integrations for the garage pattern.Install Vehicle Keys
Follow Installation, items included.
What Changes for Your Players#
Before | With Vehicle Keys |
|---|---|
Keys held out of sight by the script | A |
Keys gone after a restart or a relog | Keys stay in the inventory until they are used up, given away or cleaned. |
|
|
|
|
No spare keys | The copy shop makes spares, and the recovery NPC re-issues the key for any car the player owns. |
Default keybinds only apply to players who have never bound that command. Anything a player rebinds in Settings → Key Bindings → FiveM stays theirs.
Checking It Is Gone#
Start the server. Nothing in the console mentions the old key script; a could not find resource line means an
ensureis still inserver.cfg.VEHICLEKEYS INFO: Framework server loaded:appears, naming your framework.Sit in a car you do not own: exactly one hotwire prompt, not two.
Take a car out of your garage:
Ulocks it and you can drive it. If it asks to be hotwired, see Common Errors.



