Jixryo Keys

Real keys and fobs as items, the ignition, locks, theft checked by the server step by step, security tiers, a locksmith, Lockpicking, Car Theft and Hacking XP, and the calls other scripts already make to qbx_vehiclekeys, qb-vehiclekeys and eight other key systems.

Version 1.0.2 Updated See it on its script page

On this page

Jixryo Keys replaces qbx_vehiclekeys and the old fork of it. Keys and fobs are real items that name their car, the ignition needs the right key, and every way of stealing a car is a start the server agrees to and an end it checks. Scripts that call qbx_vehiclekeys or qb-vehiclekeys keep working, because Keys answers to both names, and it can answer for eight other key systems too. The resource is jixryo_vehiclekeys.

What players get

  • A key and a fob per car, as items (vehicle_key, vehicle_fob; the keyring holds ten). Each names its car: the plate, the car's name, the lock it was cut for, its key number, and a tag the player gives it in the inventory ("Mom's car"). A temporary key from a rental or a job names the vehicle's session instead and dies when the vehicle goes or the server restarts.
  • The ignition. G in the driver's seat: your key goes in by itself and the engine starts; hold G and the key comes out. Or drag it into and out of the inventory's IGNITION slot. Without the right key in, bridged wires or a job car you share, the engine stays off, the game's own starting included. A key left in keeps the car running, and anyone can drive off with it and pocket the key. An owned car remembers the key left in it, in the garage too, and gives it back once.
  • The battery, with Jixryo Mechanic running: a weak battery turns over for its seconds before it catches, a dead one only clicks and will not start by G, the fob or any other script. A car already running stays running.
  • Locks. L inside is the door button. Outside, the fob works within 25 m: tap to lock or unlock with a chirp and the lights, hold to start or stop the engine (the key must be in and nobody driving). Without a fob, the key turns in the driver's door within 2.5 m and takes a moment and a half. The fob has no screen of its own: L, the fob item used from the inventory or its hotbar key, and its buttons in the inventory's item menu: lock, start, trunk and panic (30 seconds of alarm).
  • Sharing. Hand a key over, since it is an item; get copies at the locksmith; /givekeys hands a temporary key to someone beside you; job cars are shared with everyone on duty in the job (police and ambulance cars lock themselves when you get out; the mechanic's tow trucks off duty too); rentals and job scripts give temporary keys that stop working when the vehicle goes.
  • Theft, every step checked on the server. A lockpick at a locked driver's door (two seconds feeling for the pins, then the minigame; a plain pick snaps 40 percent of the time, an advanced one 20). A slim jim or a smashed window through the third eye. Hotwiring with a lockpick in the driver's seat. A trojan USB (used up) or a hacking laptop (kept) past an immobiliser, with the Hacking minigame. H searches a car you have no key for (10 to 20 seconds, an 80 percent chance, never a player's own car). Aiming a gun at an NPC driver holds them up for seven and a half seconds, and they hand the key over by the weapon: a handgun half the time, a rifle or shotgun 90 percent, heavy weapons 99. A dead driver's key can be taken, and a car left running has its key in the ignition. A failed break-in sets the alarm off for 15 seconds on the server's dice (35 percent on a basic car, 85 alarmed, always on an immobiliser), a smashed window always, and the police hear through Jixryo Core's dispatch three times in four by day and half the time between 1 and 6 in the morning.
  • Security tiers by class or model: basic; alarmed (muscle, sports classics and sports cars); immobiliser (supercars, helicopters and planes: an advanced lockpick for the doors, no slim jim, and a bypass tool to start); sealed (emergency, military and trains: no way in without the key).
  • The locksmith, YouTool in Davis by default: your cars with their lock number, keys cut and keys owed; cut a key (150 dollars), program a fob (500), collect what is owed, change the locks (2,500: every older key and fob dies, the one in the ignition too, and you get a new set), copy a key you carry (100). Paid from the bank, never into debt, refunded when nothing fits in your pockets.
  • XP and perks, with Jixryo Skills running: Lockpicking for picked doors (18), Car Theft for slim jims (15), smashing in (4), hotwiring (20), hold-ups (12) and found keys (8), Hacking for immobilisers (25). The perks act here: Steady Hands widens every sweet spot, Light Touch and Spare Pins save picks, Quiet Work keeps alarms quiet, Master Picker drops a pin, Bridged and Slim Fingers speed things up, No Witnesses lowers police reports, Gone in Sixty never fails a hotwire, and the Hacking perks give the bypass more time, a second try and a skipped stage.

What staff get

  • Staff commands, for the ACEs in Config.staff.ace (group.god, group.admin, jixryo.keys): /addkeys [id] hands a temporary key to the car beside you without keys of your own, /cutkeys [id] cuts a real key and fob for the nearest car (an owned one's lock and next numbers), /rekey fits new locks on the nearest owned car (every key dead, the owner's new set waits for them), /keyholders lists who carries keys or fobs to the nearest car and what is in its ignition.
  • Audited through Jixryo Core: keys.cut, keys.copy and keys.rekey at the locksmith, keys.staff.add, keys.staff.cut and keys.staff.rekey for the commands.
  • The console says so at boot when the old qbx_vehiclekeys still runs beside this resource, and when a lockpick or bypass tool is used by another resource and needs its item's client event set.
  • Known limit, from the README: a car left running is given a key when its new driver's game says so, so a cheat that owns an NPC car's entity could start its engine first. It gets a key to an NPC car, nothing more. The README also records that the resource has not been run in game yet.

Install

  1. Stop qbx_vehiclekeys and take it out of server.cfg. Keys provides that name and qb-vehiclekeys; if the old one still runs, the console says so when the server starts.

  2. Order. It depends on ox_lib, oxmysql, qbx_core, ox_inventory and Jixryo Core, and uses Jixryo Skills (XP and perks), Jixryo Mechanic (the battery) and ox_target (the slim jim, the window and the locksmith) when they run. ensure qbx_vehiclekeys also starts it, since the provided name finds it.

    server.cfg
    ensure jixryo_core
    ensure ox_inventory
    ensure jixryo_vehiclekeys
  3. Items. The Jixryo ox_inventory fork has the key items, the key ring, the IGNITION panel and two quiet add and remove exports that move a key into and out of an ignition without an item message. Any other ox_inventory works too: keys move with the normal calls and say so. The items are vehicle_key, vehicle_fob, keyring and slimjim (Config.items), lockpick and advancedlockpick (Config.theft.lockpicks), trojan_usb and hacking_computer (Config.security.bypass.tools). The item names are the old ones, so nobody's keys break.

  4. Lockpicks and bypass tools become useable for this five seconds after start when no other resource has a use for them (registerLockpicks and bypass.register set to auto). If another resource has them, give the items a client event in ox_inventory: lockpicks:UseLockpick with args false or true for the lockpicks, jixryo_vehiclekeys:client:useBypass with the item's name for the tools.

  5. Database. The table jixryo_vehiclekeys makes itself as one Jixryo Core migration step, and the old keys' table comes over once: every lock number, key count, key owed and key left in an ignition carries on.

  6. The locksmith's page ships built in web/build (source jixryo-ui/apps/keys).

  7. Restart the whole server the first time, so the inventory shows its key panel and every resource finds the provided names.

How other scripts' calls behave

CallWhat Keys does
GiveKeys(src, vehicle) from garages, dealerships, jobs, /car, qbx_core and Jixryo CoreThe owner gets their first key and fob the first time, nothing when they carry one, else a temporary key in the ignition (Config.grant.ownerSpawn). Anyone else gets a temporary key in the ignition or the pockets (Config.grant.others; access gives the old invisible access). A temporary key comes with invisible access, so L opens a car that spawned locked and HasKeys says yes, as it always did
RemoveKeys(src, vehicle)Takes invisible access and the player's temporary keys to it (pockets, ring, its ignition), never a key that is theirs to keep
HasKeys (server (src, vehicle), client (vehicle))A fitting key or fob carried, sitting in it with the right key in, or invisible access; owners only through their keys unless ownerAlwaysHasKeys
SetLockState, IsPlayerNearVehicle, qb's GiveKeys, RemoveKeys and HasKeys by plateAs before; HasKeys by plate for a car still in the garage goes by the keys carried
Grants fired from a player's game (vehiclekeys:client:SetOwner, qb-vehiclekeys:client:AddKeys, qb-vehiclekeys:server:AcquireVehicleKeys, the other systems' client calls)Only the vehicle's owner, or the first player within 10 m of a vehicle a script made in the last 60 seconds (Config.acquire); a cheat could otherwise take keys to any parked car
qb-vehiclekeys:server:setVehLockState from a player's gameWithin 7.5 m, and any car only opens for someone with its keys or shared access; locking and the server's own calls as before
qb-vehiclekeys:server:GiveVehicleKeys, breakLockpick, qb-vehiclekeys:client:GiveKeys and ToggleEngineThe giver must have keys and stand within 5 m of the receiver; only lockpick items, only the caller's own; as /givekeys; as G
wasabi_carlock, MrNewbVehicleKeys, Renewed-Vehiclekeys (and its vehicleLock state bag), qs-vehiclekeys, jaksam's vehicles_keys, t1ger_keys, mk_vehiclekeys, cd_garage's cd_garage:AddKeys, okokGarage's okokGarage:GiveKeysTheir documented exports and events, each on or off in Config.compat, so scripts written for them work. Menus they open and their own-only features do nothing here. A key system that really runs is never answered for
  • Jixryo Core reaches these keys through its vehicles module (giveKeys, hasKeys, removeKeys), and Keys uses its validation, rate limit, permission, player, audit, HUD, dispatch, skills and database modules.
  • Jixryo Mechanic sets the battery on the vehicle (jxCrank seconds, jxNoStart) and hears every start through the server event jixryo_vehiclekeys:cranking (vehicle, seconds, dead) to play the sound.
  • ox_target gets two global vehicle options, the slim jim and the window, and the locksmith's sphere; without it the locksmith has a prompt and E.
  • Restarting Keys tells every name it answers as that it stopped (FiveM's resource stop events for that name), so other resources drop the export copies they kept and the inventory hides and shows its key panel with it.

Its own API

Server exports (also answered as qbx_vehiclekeys):

ExportWhat it does
GiveKeys(src, vehicle, silent)As the table above
RemoveKeys(src, vehicle, silent)As the table above
HasKeys(src, vehicle)As the table above
SetLockState(vehicle, 'lock' or 'unlock')Sets the doors
IsPlayerNearVehicle(src, vehicle)Within 7.5 m
HasPlate(src, plate)Keys to a plate: to any of its vehicles out, else a key or fob for its lock
GetPlates(src)The plates the player's keys, fobs and invisible access open

A vehicle is a server entity, a network id or { netId }. Client exports: HasKeys(vehicle), the key and fob items' useKey and useFob, and six more the Jixryo inventory's key panel calls (the ignition move, a fob's button, the tag, the engine, the panel's settings and what the player carries); those six carry the retired server abbreviation in their names and are left out here.

State bags and events:

NameWhereWhat it carries
jxKeythe vehiclethe key in the ignition ({ name, metadata }), or nothing
jxEngine, jxHotwiredthe vehiclethe engine runs; its wires are bridged
jxPlate, jxLock, owneran owned vehiclethe plate its keys must name, its lock number, its owner's citizen id
jxPanicthe vehiclewhen its alarm stops
doorslockstatethe vehicle1 open, 2 locked (the standard one other scripts read)
jxCrank, jxNoStartthe vehicle, set by Jixryo Mechanica weak battery's seconds; a dead one
jxKeys, keysListthe playerwhat their keys open (1 key, 2 fob, 3 both); invisible access
jxFobthe player's pedthe fob is in their hand, so every game draws it
jixryo_vehiclekeys:crankingserver eventa start attempt: vehicle, seconds, dead
jixryo_vehiclekeys:client:applyEngine, trunk, smashed, lostKeys, useBypassto gamesthe game holding a car starts it or opens the trunk; a window broke; keys were taken back; a bypass tool was used
jixryo_vehiclekeys:server:acquire, dropKeys, engineIs, enteredRunning, firstLock, handKeysfrom a gamea grant or drop the server decides, the engine changed, a running car entered, a car's first lock state, /givekeys from another script

The game's calls go through 19 server callbacks named jixryo_vehiclekeys:server:<name> (the engine, the key, the lock, the fob, the ignition move, the tag, break-ins, hotwiring, searches, hold-ups, a dead driver and the locksmith); they are not an API, and the server checks every one.

Commands and keybinds

Command or keyWhoWhat it does
/givekeys [id]anyone with keys to the car beside themA temporary key for the player named, everyone in the car with them, or whoever stands nearest
/addkeys [id]staffThe same, without keys of their own
/cutkeys [id]staffA real key and fob for the nearest car
/rekeystaffNew locks on the nearest owned car; the owner collects the new set
/keyholdersstaffWho carries keys to the nearest car, and what is in its ignition
L (togglelocks)anyoneInside: the door button. Outside: the fob (hold: start or stop), the key in the door, or a shared job car
G (toggleengine)the driverThe key in and the engine on or off; hold: the key out
H (searchkeys)the driver of a car they cannot startSearch it for its key; shown only then
Third eye on a locked car: Slim jim the door, Smash the windowanyone without its keysWhat they say, through the server
Third eye or E at the locksmithanyoneThe locksmith's page

The three keybinds keep the old keys' names, so bindings players made carry over; they change them in Settings, Key Bindings, FiveM.

Configuration

config.lua, with every word players see in shared/text.lua:

KeyDefaultWhat it does
itemskey vehicle_key, fob vehicle_fob, ring keyring, slimJim slimjimThe items
grantfirstSet 1 key, 1 fob, ownerSpawn temp, others ignition, ownerAlwaysHasKeys falseWhat GiveKeys hands over
acquirewindow 60, distance 10.0A grant from a player's game: a vehicle made this long ago, this near
bindstogglelocks L, toggleengine G, searchkeys HThe keybinds
holdTime, fobRange, doorKeyRange, doorKeyTime, lockRange, panicTime600 ms, 25.0, 2.5, 1500 ms, 7.5, 30Holding a key, the fob's reach, the key in the door, keyless reach and the server's checks, the panic alarm
animsthe game's clipsThe key turned, the fob, the lockpick, hotwiring, searching, smashing, the hold-up
vehiclesdefault lockedParked 0.75, lockedDriven 0.75, findKeys 0.8, carjack true; bikes noLockRules by model, qbx category, class and type
sharedpolice (11 models, on duty, autolock), ambulance (on duty, autolock), mechanic (tow trucks, off duty too)Job cars shared without a key
securitydefault basic; classes 4, 5, 6 alarmed, 7, 15, 16 immobiliser, 18, 19, 21 sealed; the four tiers; bypass tools trojan_usb (consumed) and hacking_computer, 9000 ms, register autoThe tiers and the bypass tools
theftregisterLockpicks auto, lockpicks plain and advanced, breakChance 0.4 and 0.2, minTime per step, alarmTime 15, lockpickTime 2000, hotwireTime 4000, slimJim 6000 ms and 0.15, smash 1800 ms, search 10 to 20 s, carjack 7500 ms, 10 s cooldown, chances by weapon group, police 0.75 by day, 0.5 from 1 for 5 hours, one per player per 30 s, code 10-60Theft timings, odds and the police
skillChecksrounds and keys per minigameThe lockpick, advanced lockpick, hotwire, advanced hotwire, slim jim and bypass minigames
skillslockpick 18, slimjim 15, smash 4, hotwire 20, bypass 25, carjack 12, search 8XP per action
locksmithenabled true, account bank, prices key 150, fob 500, change 2500, copy 100, YouTool in Davis with a blip, distance 4.0The locksmith
stafface group.god, group.admin, jixryo.keysThe staff commands
compatall nine onThe other key systems answered for

Security

  • The client is never trusted. Every action names a vehicle by its network id, and the server checks the player's distance, seat and items on each call.
  • Theft is timed by the server. Break-ins, hotwiring, bypasses, searches and hold-ups are a start the server agrees to and an end it checks: too quick, walked off, or the wrong car gets nothing. Tools wear out, alarms sound and the police hear on the server.
  • Keys fit by the server's numbers. A key or fob fits only when its plate and lock match the car's record, and a temporary key only its vehicle's session in this server run.
  • Grants from a game go only to the owner or the first player near a vehicle a script just made; lock changes from a game open a car only for someone with its keys.
  • The locksmith checks the counter, the owner and the balance, refunds when nothing fits in the pockets, and runs one purchase at a time per player, so a double click buys once.
  • Staff commands check the ACE every call and go to the audit log.
  • One thing the server cannot see, as the README says: a car left running is given a key when its new driver's game says so, so a cheat owning an NPC car's entity could start its engine first and get a key to that NPC car.

Tests

Two suites in dev-tools/luarun/tests, sharing jixryo_vehiclekeys.setup.lua (a real database with Jixryo Core's real validate, db, rate, perm, player, audit, hud, dispatch, skills and vehicles modules, and qbx_core, ox_inventory, Jixryo Skills and dispatch stood in). Both run on 2026-10-31.

SuiteResultWhat it covers
jixryo_vehiclekeys.lua87 passed, 0 failedThe table and the old keys brought over; the names answered; owned cars marked; GiveKeys in every form; HasKeys from pockets, rings and the ignition; the engine, the battery and the key taken out; the inventory page's moves, tags and keys used; locks by button, fob, key, shared access and the first lock; fobs for lock, start, trunk and panic; the locksmith's page and every purchase, refusal and the double click; break-ins with every tool, wear, alarms and the police; security tiers; hotwiring, the immobiliser and the bypass tools; searching, hold-ups, dead and running NPC cars; the police rules; useable items; keys that persist and temporary keys taken back; invisible access over a crash; grants from a game; every other key system; stopping; Jixryo Core's vehicles module; the commands.
jixryo_vehiclekeys.client.lua35 passed, 0 failedA stand-in player's game against the real server: the keybinds, exports and names on load, and stopping; G, holding G, getting out running or off, other scripts starting it and the dead battery; L inside, the fob at 15 m with the chirp and remote start, the key in the door, nothing near, the items and the fob's buttons, the ignition page, HasKeys; a car out of the garage with the keys at home; the slim jim, the window, lockpicking with the perks shaping the minigame, letting go, hotwiring and the immobiliser; H; the first try at a car's doors and a dead driver; a police car locking itself; a hold-up; the locksmith's page; qb's and the other systems' client calls.
bash
cd dev-tools/luarun
node run.mjs ../../jixryo_scripts/jixryo_vehiclekeys tests/jixryo_vehiclekeys.lua
node run.mjs ../../jixryo_scripts/jixryo_vehiclekeys tests/jixryo_vehiclekeys.client.lua

The README records 28 planted bugs, each breaking one rule above and each caught, 5 more in the battery's hook caught too, and the built locksmith page passing dev-tools/nui/cdp-game.mjs. It also records that the resource has not been run in game yet.

Check it in game

  1. Start with the old qbx_vehiclekeys removed. The console shows the table made and the old keys' table brought over.
  2. Buy or pull out a car: your first key and fob land in your pockets, named with the plate and number. G starts it and the key leaves your pockets; hold G and it comes out.
  3. Leave the key in, get out, and have a friend drive off with it and pocket the key.
  4. Lock the car with L from across the street: the fob clicks in your hand, the car chirps and flashes. Hold L: it starts from a distance with the key in.
  5. Pick a parked NPC car's door with a lockpick, then hotwire it from the driver's seat; watch for the alarm and the dispatch call. Press H in one you cannot start and search it for its key.
  6. Aim a pistol at an NPC driver: the hold-up runs its time and they hand over the key half the time.
  7. At the locksmith in Davis: cut a spare key, copy it, then change the locks: the old key stops working and the one in the ignition comes out.
  8. On duty as police, get into a cruiser without a key: it starts, and locks itself when you get out.
Next step

Ready to look around?

Browse the suite, or paste your server.cfg and see what each script does to your server.