Commands
Chat commands for Vehicle Keys. Most settings live in /setupkeys.
Anyone
| Command | What it does |
|---|---|
/clearoldkeys | Deletes keys for cars that are not spawned. Keys for cars that are out stay. 30 second cooldown. Only when keys are real items |
/anchor | Drops or raises the anchor on a nearby boat, jetski, or sub. Within 8 meters, slower than 10 mph. Works from the shore |
/newb_proximitylocks | Turns your own walk-up auto lock on or off. Same toggle as the fob |
/keyring | Opens the keyring screen. Only registered when the keyring screen can be opened that way: with item keys, the screen must be on and Open it with must not be "Using the keyring item only". With virtual keys it is always there. See Keyring |
/givekeys | With virtual or item keys. Gives the nearest player a temporary key for the closest car you have a key for. It lasts until the server restarts and cannot be passed on by the person who receives it. You and the other player need to be within 10 meters of each other and the car. Five second cooldown. It can be turned off under Give a temporary key on the Keyring page of /setupkeys |
/throwkeys | Tosses a key on the ground. Not registered on ox_inventory — use the Throw Keys button on the item, or the keyring screen on virtual keys. On other inventories, sit in the car first |
/movekeys | Lets you drag the key fob screen anywhere you like and make it bigger or smaller, then save it. Only when the fob screen is on in /setupkeys. The position and size are kept on your own computer (client KVP), so it follows you between sessions but not between machines. Reset puts it back. See Moving the key fob |
/enginepin | In the driver seat of a car with a keypad immobiliser. Opens the PIN pad to change its PIN. You need the current one, unless the car was just sold and has none |
/clearalarm | Removes the alarm blip that a Linked or Dispatch alarm put on your map |
Admins
These use the admin check from the bridge.
| Command | What it does |
|---|---|
/setupkeys | Setup menu with a search box across every setting. Items, keybinds, hotwire, lockpicking, the locksmith, police alerts, and the rest. Its Manage tab gives or takes keys, shows what a player is holding, edits vehicle locks, creates keys, places parking spots for self-park, and has a Security section to see and change a plate's alarm, immobiliser, GPS and police flag, or reset a PIN |
/admingivekeys [id] [plate] | Gives that player a key. Example: /admingivekeys 4 ABC123 |
/removekeys [id] [plate] | Takes that plate’s key off that player |
/listkeys [id] | Prints the plates they are holding to the server console |
/revokekeys [plate] | Takes that plate’s key off every player who is online |
/devmode | Drive and lock without a key. Run it again to turn it off. Client only, for testing |
/car [model] [plate] [keep] | Spawns you into that model and gives you the key. Plate is optional. Pass anything other than false or 0 as the third argument to keep the car you are already in |
/dv [radius] | Deletes the car you are in and takes your key. On foot, deletes cars around you. /dv 10 is 10 meters. Default on foot is 5 |
/car and /dv are off by default. Turn them on under General > Admin & debugging (Advanced must be on to see that page). The command names are read when the resource starts, so a rename needs a restart. The on and off switches apply right away.
A command name can only belong to one resource. If another resource already owns the name, such as qbx_core's own /car and /dv, this resource skips it and prints a warning to the server console. The setup page shows the same clash. Give ours a different name on that page, or leave qbx_core's. Its /car already hands out keys through this script.
Moving the key fob
Run /movekeys and the fob opens with a bar across the top of the screen. It only works when the fob screen is on in /setupkeys. The fob you see is the one your server uses:
- Branded fobs: the preview shows the maker's own fob for the car you are in or standing next to (within 15 metres), and a Karin one when that car's maker has none.
- Digital fobs: the preview shows the fob style that is already set.
Moving. Drag anywhere to move it. A fine grid covers the screen, with a stronger line every tenth and the strongest through the middle. Snap to grid is on by default: the fob's edges and centre jump onto the nearest line, and a bright guide line shows the line it met. A dashed outline follows the fob and turns solid white while it is snapped. Turn snap off to place the fob freely, and the grid stays as a faint guide. Your snap choice is remembered. The fob always stays on screen.
Resizing. Scroll over the screen, or use the Size slider in the bar, to make it smaller or bigger (60% to 150%). The fob is nudged back on screen if a bigger size would push it past an edge. The whole fob is scaled as one piece, so every button keeps working at any size, and its buttons do nothing while you are moving it.
Finishing. Save keeps the position and size. Reset sends it back to its default spot and size. Cancel leaves without saving, and the fob slides away from where you left it.
The position is a share of your screen, so it holds if you change resolution. It is stored in the game's client KVP under mrnewb_keys:fob_offset:v1 as { x, y, s } (across, down, size), one value per player machine. Nothing is saved on the server, so it follows a player between sessions but not between computers. The saved spot is sent with every fob open, so the fob appears there from the first time.
Debug
Leave Debug Mode off on a live server. Turn it on under General > Admin & debugging (Advanced must be on). See Debug mode.
The debug commands are only registered when Debug Mode was already on as the resource started. Turn it on, save, then restart the resource to get them.
| Command | What it does |
|---|---|
/whatsloaded | Which framework, inventory, notification, and target the bridge picked, and whether item keys and ox key mode are on. The server console half prints too |
/debugkeys | Reloads the client as if you just joined |
/debuglistkeys [id] | Full key data for that player in the server console |
Keys players press
Players can rebind these under MrNewbVehicleKeys in FiveM’s settings.
| Key | What it does |
|---|---|
| L | Lock or unlock the closest car you have a key for, about 15 meters. The on-screen fob reaches further |
| Y | Toggle the engine. Stays off if your HUD already handles the engine |
| . (period) | Open the keyring screen. Only registered under the same conditions as /keyring, so with "Using the keyring item only" (the default on item keys) there is no keybind. Clear the key on the Keybinds page for /keyring only |
| E | Hotwire, driver seat only, when you do not have a key |
| H | Search the car for keys, driver seat only |
| I / O | Put the key in the ignition, or take it back out, when insert mode is on |
| F11 | Change the auto-pilot mode while it is running |
| Throw key (no key until you set one) | Throw the key for the car you sit in. The binding is the newb_throwkey entry in FiveM's key bindings. Set the default key on the Keybinds page of /setupkeys, and players can rebind it in FiveM's key bindings. While the key fob screen is open, the screen listens for the server's default key (a letter, a digit or an F key), because the game does not hear key bindings while the screen has focus |
Walking up to your own car locks and unlocks it. Players can turn that off from the fob or with /newb_proximitylocks.
