Admin, logging and compatibility
Admin commands, the Manage tab, debugging, logging and other key scripts.
Part of Configuration. Open /setupkeys to change these.
Other key scripts
General > Other key scripts: pick the script you are replacing and press Answer for it. Calls meant for it are then answered by this resource, so other scripts that ask for keys keep working without edits. Save, stop the old script, and restart this one. Keys held inside the old script are not copied.
fxmanifest.lua also has provide lines so exports['qbx_vehiclekeys']:GiveKeys(...) resolves here. qbx_vehiclekeys and kora_vehiclekeys are active. To replace a different script, uncomment its line, run refresh, and restart this resource (a full server restart is safest). Never provide a name whose original resource is still running.
Admin commands
/car and /dv are off by default. Turn them on under General > Admin & debugging (Advanced). Names are read when the resource starts. A name another resource owns is skipped with a console warning, so give ours a different name. Details: Commands.
Manage tab
Manage in the rail holds the live admin tools:
| Section | What it does |
|---|---|
| Vehicles | Nearby vehicles by plate or model, with a teleport button |
| Players | See what a player holds, give or take keys |
| Vehicle locks | Add and edit lock profiles (item keys only) |
| Key creator | Make a key for any plate. With virtual keys it grants a key without an item |
| Parking | Create the parking areas that self-park uses (item keys only) |
| Security | See and change a plate's alarm tier, immobiliser, GPS and police flag, or reset a keypad PIN |
Debug mode
General > Admin & debugging > Debug messages (Advanced). It is off by default and applies right away, no restart. Keep it off on a live server.
With it on, the server console and F8 print plain one-line messages with names, ids and numbers, in the form [MrNewbVehicleKeys:settings] Sam (id 7) opened the setup panel. The word after the colon names the area, such as keys, locks, engine, locksmith, theft, admin or settings. The /whatsloaded, /debugkeys and /debuglistkeys commands only exist when debug was on at resource start.
Logging
Key events (grants, shares, locksmith work, admin actions) go to the console in debug mode, fire the MrNewbVehicleKeys:Log event, and post to a Discord webhook when this convar is set in server.cfg:
set mrnewbvehiclekeys_webhook "https://discord.com/api/webhooks/..."Each log row carries who, to whom, which plate and where. Messages are queued to stay inside Discord's rate limit.
Compatibility
This resource provides for these key systems: qb-vehiclekeys, qbx_vehiclekeys, qs-vehiclekeys, wasabi_carlock, Renewed-Vehiclekeys, mk_vehiclekeys, jg-vehiclekeys, kora_vehiclekeys and tgiann-hotwire. The Other key scripts page chooses which foreign events and legacy exports answer. Garage entries switch on when that garage resource is running. provide lines in fxmanifest.lua let exports['qbx_vehiclekeys']:GiveKeys(...) resolve here. provide 'qbx_vehiclekeys' and provide 'kora_vehiclekeys' are active in the shipped manifest.
The legacy exports that answer when a system is switched on:
| System | Server exports | Client exports |
|---|---|---|
qb-vehiclekeys | GiveKeys, RemoveKeys, HasKeys | same |
qbx_vehiclekeys | GiveKeys, RemoveKeys, HasKeys, SetLockState | GiveKeys, RemoveKeys, HasKeys |
qs-vehiclekeys | GiveServerKeys, RemoveServerKeys, GetServerKey | GiveKeys, RemoveKeys, GetKey, GiveKeysAuto, RemoveKeysAuto, GetKeyAuto |
Renewed-Vehiclekeys | hasKey, addKey, removeKey | same |
wasabi_carlock | HasKey, GiveKey, RemoveKey, GetAllKeys | HasKey, GiveKey, RemoveKey, ToggleLock |
mk_vehiclekeys | AddKey, RemoveKey, HasKey, ChangeOwner, UpdatePlate, UsingKeyfobs | AddKey, HasKey, RemoveKey, ToggleLocks, UnlockVehicle, UsingKeyfobs |
tgiann-hotwire | GiveKeyPlate, KeyInIgnition, SetKeyInIgnition, CheckKeyInIgnitionWhenSpawn, SetNonRemoveableIgnition | those, plus GiveKeyVehicle, HaveKeyPlate, HaveKeyVehicle, ChangeLockStatus, ChangeEngineStateButton |
kora_vehiclekeys | giveKeys, removeKeys, hasKeys | none |
jg-vehiclekeys | The documented server API: giveKeys, removeKeys, hasKeys, getKeys, giveKeysToEntity, removeKeysFromEntity, hasKeysForEntity, isPlayerNearVehicle, unlockVehicle, setLockState, canParkVehicle, canCollectVehicle, vehicleParked, vehicleOwnershipChanged, vehiclePlateChanged, getVehicleSecurity, getVehicleTrackingLocation, getVehicleGhostInstallations, changeVehiclePin. Callers get the same result tables back | none |
This resource's own GiveKeys, RemoveKeys and HasKeys server exports also accept the jg-vehiclekeys call shape, a plate string in place of the network id.
