NX CreativeNX CreativeDocs
Scriptsnx_mechanic

Commands

Chat commands, keybinds and server console commands registered by nx_mechanic.

The workshop itself has no chat command. It opens by targeting a vehicle parked in a bay, by pressing the seated key from the driver's seat, or from your own resource through OpenWorkshop.

Everyone

/mechanic checkmods

Compares the vehicle you are sitting in against what the database holds and prints every difference to the client console: the framework garage row, the department build, and the handling the car should be driving with. Read-only, rate-limited on the server, and available to every player. Run it after a garage round-trip to prove a build survived.

/tablet

Opens the staff tablet for the nearest commercial shop you staff: vehicle record, work orders, invoices, servicing, dyno runs, inspections and, for management, the shop's employees, prices and ledger. Refuses when you staff no shop, and while a workshop session is open.

/invoices

Opens the same tablet in customer view: your own invoices and work orders, and nothing else. No job or shop is needed.

The tablet also has a keybind, nx_mechanic_tablet, with no default key. Players assign one under Settings, Key Bindings, FiveM.

The seated workshop prompt is a keybind too, nx_mechanic_open, defaulting to Config.Interaction.seatedKey. It is only live while the prompt is on screen.

Nitrous uses two more: nx_mechanic_nos to fire, defaulting to Config.Nitrous.key, and nx_mechanic_purge to purge, defaulting to Config.Nitrous.purgeKey.

Police

/inspection <plate>Config.Inspection.policeJobs

Prints the latest roadworthiness certificate for a plate: valid, expired or failed, the mileage at the time, who inspected it and where, and which checks failed. Only the jobs listed in Config.Inspection.policeJobs may run it; anyone else is refused.

Arguments

  • platestring— Plate to look up.

Admin

/mechanic creatorConfig.AdminGroups

Opens the in-game shop creator. Create a shop, edit its fields, then drag each bay, lift, dyno spot and blip into place in the world. Everything is written to the database and appears for every player straight away, with no restart and no config edit.

The creator can also edit a shop that config.lua declares, and delete one. The database entry overrides the config entry, so the file does not have to change. A configured shop can be reverted back to its config values from the same menu.

While placing a shape:

KeyDoes
Arrow keysMove on the ground plane
E / QRaise and lower
Numpad 4 / Numpad 6Rotate
Left ShiftMove faster
Left CtrlMove finer
GSnap back to where you are standing
HFollow you as you walk
EnterAccept
BackspaceCancel

Every action re-checks the admin permission on the server and re-validates the geometry, so the menus are a convenience rather than the boundary. A refused action is written to the security log.

Developer subcommands

These need both Config.DevCommands, which ships false, and an admin group from Config.AdminGroups. The client asks the server before it registers them, so on a live server with Config.DevCommands off they do not exist for anyone, admin included. Leave them off outside a development server.

All of them are subcommands of /mechanic.

SubcommandDoes
spawn <model>Spawns a vehicle in front of you. Every vehicle it creates is tracked.
openOpens the workshop on the nearest vehicle, skipping the bay check.
dumpPrints the vehicle's properties, then a per-slot and per-option report of the raw name the pack shipped and whether it resolves to any text. This is the report you need before writing Config.SlotLabels or Config.ModLabels.
nativesChecks that the functions the catalogue depends on are all present, against a known-good control.
baySays which bay and shop you are standing in, if any.
clearDeletes everything spawn created. Stopping the resource does the same.
wear <part|all> <pct>Sets a part's remaining health on the vehicle you are sitting in.
km <n>Sets the odometer.
nos [bottle]Fits a nitrous kit and a full bottle. Defaults to the medium bottle.
resetClears wear, tuning, nitrous and stance from the record.
recordPrints the vehicle's current record.

Server console

Three commands read the database from rcon or the server console. They refuse anything that is not the console, so they are not gated on Config.DevCommands and are safe to leave available.

CommandPrints
nxm_defaultsEvery department default build: job, model and who set it.
nxm_build <plate>The saved build for one plate.
nxm_codes [n]The most recent share codes, newest first, with their job, model, use count and author. Defaults to 20.
NX Docs