Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4) with OneSync enabled.
fxmanifest.luadeclares/onesyncas a dependency, so the resource refuses to start without it. - np_prophandler 1.1.0+: the workshop laptops and the attachment props on vehicles. It is a
dependenciesentry in the fxmanifest and must start before np_manufacturing.
That's all. The NUI ships prebuilt in web/, so there is nothing to build. Optional, auto-detected at start:
| Kind | Resources | Used for |
|---|---|---|
| Framework | qbx_core, qb-core, es_extended | Character names, jobs (for organization.jobMap), charging players and organization accounts |
| Organization accounts | qb-banking, Renewed-Banking, qb-management (qb / qbx), esx_addonaccount (society_<job>, ESX) |
Billing an organization (billing.payer = 'organization'). np_banking job accounts are not supported: organizations are billed in these resources directly |
| Inventory | ox_inventory, qb-inventory (and qbx / forks with the same API), ESX inventory |
Removing job materials (productionJobs.requireMaterials). Standalone treats materials as unlimited |
| Database | oxmysql | Only with persistenceAdapter = 'oxmysql' |
| Phone | np_phone | Notifications (notify) and saving photos to the gallery (addPhoto) |
| HUD | np_hud | Notifications while the console is closed |
| Screenshots | screenshot-basic |
Photo mode |
| Staff | np_admin | Permission nodes, live settings, audit log and staff tools. The lib is vendored in bridge/np_admin.lua |
The framework bridge re-detects when a framework starts after np_manufacturing, but starting it first is still the safe order.
Steps ​
- Put the resource in
resources/asnp_manufacturing. The NUI callshttps://np_manufacturing/…, and every net event, command and permission node uses thenp_manufacturingprefix, so keep the name. - Pick the storage. The default is a dual-slot JSON flatfile inside the resource (
server/data/state-a.jsonandstate-b.json); the server needs write access to that folder. To use MySQL instead, import the schema and switch the adapter:shmysql -u <user> -p <database> < sql/np_manufacturing.sqlluaThe whole state is one JSON document in a single row (persistenceAdapter = 'oxmysql',id = 1) ofnp_manufacturing_state, written with an upsert. If you renamepersistence.oxmysql.table, rename the table in the SQL file too. The file ends with an optional, commented-out statement for importing an existing flatfile state. - Configure your workshops in
shared/config.lua. The shippeddevelopment_lspdentry is a development fixture at Mission Row; replace it with your own computer and bay positions. In game, admins can runnp_manufacturing_workshop_here <id>at the laptop spot and… <id> bayin a car in the bay to get a ready entry to paste (Going live). See Workshops. - Lock down permissions. The shipped config has
authorization.allowAllPlayers = truefor local development, which lets every player do everything. Set it tofalseand grant the permission nodes in np_admin (Permissions). - Optional: set the Discord audit webhook as a server convar (not in the shared config, which every client receives):cfg
set np_manufacturing_webhook "https://discord.com/api/webhooks/..." - Start it after np_prophandler and its optional dependencies:cfg
ensure oxmysql # only with persistenceAdapter = 'oxmysql' ensure qbx_core # or qb-core / es_extended (optional) ensure ox_inventory # optional ensure screenshot-basic # optional, photo mode ensure np_hud # optional ensure np_phone # optional ensure np_admin # optional: permissions, settings, logs, staff tools ensure np_prophandler # required ensure np_manufacturing
Before going public
allowAllPlayers = true grants every role to everyone, including admin and approve. Turn it off and grant the nodes below.
Until allowAllPlayers, enableFixtureCatalog and developmentCommands are all off, the server prints a
development configuration warning at start-up. Work through Going live before you open the server.
Permissions ​
np_manufacturing uses no ACE. Every check is an np_admin permission node, managed in np_admin (Permissions): grant
nodes to a group or a single player, use wildcards such as np_manufacturing.*; an explicit deny wins. See
np_admin permissions.
| Node | Grants |
|---|---|
np_manufacturing.use |
Design, save, submit, apply, revert, clone |
np_manufacturing.approve |
Review queue, approve, request changes, revoke, restore, fleet rollouts, brand kit of their organization |
np_manufacturing.admin |
Catalog review, template onboarding, inspections, any brand kit, np_manufacturing_workshop_here |
np_manufacturing.mechanic |
Perform production job steps, cancel jobs |
np_manufacturing.emergency |
Fit parts flagged as emergency equipment |
np_manufacturing.runtime_livery |
Submit, apply, roll out and preview live liveries (runtime texture, per car) |
np_manufacturing.organization.<id> |
Member of organization <id>, e.g. np_manufacturing.organization.lspd (alternative: organization.jobMap) |
a part's requiredPermission |
Fit that part, e.g. the fixture node np_manufacturing.swat |
The node names are configurable under authorization (usePermission, approvePermission, administerPermission,
mechanicPermission, emergencyEquipmentPermission, runtimeLiveryPermission) and organization.nodePrefix. The role
nodes, the organization nodes (organizations in organization.labels, organization.jobMap or with a brand kit) and
every part's requiredPermission are registered in np_admin with labels.
np_manufacturing.runtime_livery only matters once a live mode is switched on; see
Live liveries.
np_admin is optional. Without it running, a check passes only for:
- the server console;
- identifiers in the convar
np_admin_fallback:cfgset np_admin_fallback "license:abc...,discord:123..." - on es_extended, the ESX groups in
np_admin_fallback_groups(defaultadmin,superadmin).
authorization.allowAllPlayers = true still overrides all of this. See Permissions.
v1 ACE names are gone
The old npv.vehiclemanufacturing.* names and add_ace … np_manufacturing.* lines in server.cfg are no longer
read. Remove them and grant the nodes in np_admin.
The focus recovery command keeps its old alias (npv_vehiclemanufacturing_release_focus). Persisted v1 state loads
unchanged; missing v2 fields are filled with defaults on load.
Organizations ​
A vehicle belongs to an organization through its vehicleOrganizationId state bag (set it from your garage or
vehicle-spawn script). A player is a member when they hold the node np_manufacturing.organization.<id>, or when their
framework job is mapped to it:
organization = {
enabled = true,
jobMap = { police = 'lspd', sheriff = 'bcso' },
labels = { lspd = 'LSPD Fleet', bcso = 'BCSO Fleet' },
},
Members can design for the organization's cars, share projects and presets with it, and see its fleet. Approvers who are members can edit its brand kit and start rollouts.
Vehicle identity ​
Builds are stored per vehicle, so the server needs a stable id. It reads the first state bag listed in
vehicleIdentity.persistentIdStateBagKeys (vehiclePersistentId, persistentVehicleId). If your garage script sets
one of them, builds follow the car across restarts. With autoAssignPersistentId = true (default) the server assigns an
id to a car without one when a session starts, which only lasts as long as the entity unless your garage saves it.
Test it ​
- Stand at the workshop laptop and use its interact option (E with np_hud, or ox_target / qb-target). The console opens on the Bay screen; the prompt stays hidden while it is open.
- Drive the fixture vehicle (
police) into the bay marker, get out and watch the checks turn green. - Press Design livery.
Hold Left Alt in the console to hide it and look around; Esc closes it.
Recover a stuck cursor
If a resource restart leaves the NUI focused with no visible console, run np_manufacturing_release_focus in the F8
console. It is always registered.
Troubleshooting ​
| Symptom | Fix |
|---|---|
| No laptop, no interact option | np_prophandler is not started, enabled = false, the workshop has enabled = false, or the computer coordinates are wrong |
| Bay check Vehicle template fails | The model has no approved template. Onboard it (Administration) or register one (Templates & catalog) |
| Bay check Persistent identity fails | No persistent id state bag and autoAssignPersistentId = false. Set the state bag from your garage |
| Bay check Fleet ownership fails | The car has a vehicleOrganizationId the player isn't a member of. Grant the organization node (np_manufacturing.organization.<id>) or add a jobMap entry |
| Bay check Your permission fails | Missing np_manufacturing.use. Grant it in np_admin (staff tool Manufacturing permissions shows a player's resolved roles) |
runtime_livery_not_permitted |
The player lacks np_manufacturing.runtime_livery for a live mode (runtime_texture, per car) |
| Per-car build shows the stock livery | No free slot near the car (slot.pool_full in the audit log), or the car is farther than runtimeSlots.renderDistance. See Per car |
development configuration warning at start |
allowAllPlayers, enableFixtureCatalog or developmentCommands is still true. See Going live |
workshop_mode_not_allowed |
The workshop's allowedModes doesn't allow that action (inspect, edit or attachment). See Workshops |
| "Not authorized" for every player after going public | Expected once allowAllPlayers = false; grant the nodes in np_admin, or without np_admin use np_admin_fallback / np_admin_fallback_groups |
| Builds vanish after a restart | Flatfile not writable, or vehicles get a new persistent id each spawn |
| Organization billing fails | No supported banking resource, or no account for the organization. The account name is the job mapped to it in jobMap (society_<job> on ESX), else the organization id itself |