Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (Lua 5.4) with OneSync (the server reads positions, routing buckets and the clothing of the player's own ped)
  • oxmysql
  • np_prophandler: the door engine. np_doors registers every door with it (registerDoor, setDoorLocked); np_prophandler puts the doors into the game's door system, streams and syncs them
  • np_minigames 1.2.0+: every breach is one of its games. 1.2.0 brings the ram game for the police ram; with an older np_minigames the ram falls back to skillcheck
  • Node 18+ to build the NUI once, if your copy has no web/dist yet

oxmysql, np_prophandler and np_minigames are dependencies in the fxmanifest and must start before np_doors.

Optional, auto-detected at start (each with a fallback, see Integrations):

Kind Resources Without it
Framework es_extended (first target), qbx_core, qb-core Standalone: no jobs, identifiers are the FiveM license
Inventory np_inventory (first target), ox_inventory, qb-inventory (and the ps / lj forks) none: no keys, keycards, ram or repair kit; access rules, PINs and biometrics still work
Target np_menu, ox_target, qb-target Only used with Config.Interaction.mode = 'target'; otherwise np_doors' own world prompts
Dispatch np_mdt, ps-dispatch, cd_dispatch, qs-dispatch A built-in toast and blip for police on duty

Optional np_* siblings: np_admin, np_hud, np_phone, np_faction, np_gangs, np_character, np_housing, np_shops, np_passwords, np_surveillance, np_cctv, np_cellnet, np_clothing, np_colshape, np_prison and np_banking. What each one adds is on Integrations. np_admin, np_addon and np_colshape are vendored as libraries (bridge/*.lua, byte-identical to their canonical copies) and are never a dependency.

Steps ​

  1. Put the folder into your resources as np_doors. Item definitions call np_doors.useItem and other resources call exports.np_doors, so keep the name.
  2. Start order in server.cfg. The framework and the inventory are detected once, at start:
    cfg
    ensure oxmysql
    ensure es_extended          # or qbx_core / qb-core
    ensure np_inventory         # or ox_inventory / qb-inventory
    ensure np_admin             # optional: staff rights, settings, audit log
    ensure np_prophandler       # required: the door engine
    ensure np_minigames         # required: every breach
    ensure np_phone             # optional siblings, any order
    ensure np_faction
    ensure np_doors
  3. Database: the tables (prefixed npd_: npd_doors, npd_access, npd_keys, npd_biometrics, npd_log, npd_meta) are created and migrated at every start. sql/install.sql has the same schema if you prefer to import it by hand.
  4. Items (Items): nothing to do on np_inventory; paste the block on ox_inventory and qb-inventory.
  5. The NUI. A release ships the NUI prebuilt in web/dist. A fresh clone needs it built once (Node 18+):
    sh
    cd web && npm install && npm run build
    Without the build the labels, readers, manager and creator are blank. Build again after any change under web/. The build also produces web/dist/keypad.html, the screen of the 3D keypad (every *.html in web/ is an entry).
  6. Staff: grant np_doors.manage (and np_doors.create, np_doors.override, np_doors.lockdown, np_doors.logs as needed) in np_admin's permission matrix, or list identifiers in Config.Admins without np_admin. See Commands & permissions.
  7. Doors: edit the example doors in shared/config/20_doors.lua, place new ones with /doorcreate, or import your old door system with /doors import ox|qb|nui <resource> (Manager & creator).
  8. Wall devices (optional): stream/ ships the device models and their clips (np_door_keypad, np_door_cardreader, np_door_biometric and the hand prop np_door_keycard, each .ydr / .ytd / .ytyp, plus np_doors_anim_devices.ycd). FiveM streams the folder by itself; the fxmanifest lists stream/*.ytyp in files and requests each archetype with data_file 'DLC_ITYP_REQUEST' 'stream/<model>.ytyp'. Nothing is spawned until you set Config.Devices.enabled = true and place devices with /doordevice (World devices & 3D keypad). To ship without the custom props, delete stream/ and the four data_file lines; np_doors then falls back to vanilla models by itself.
  9. Start the server and read the start-up lines: one per sibling (active, fallback (...) or missing export <name>). The status is printed again whenever a sibling starts or stops.

Check it works ​

  1. The console prints one line per sibling.
  2. Walk to Mission Row PD. The front doors show a far tile from 25 m, a name chip from 10 m and the full card at the door.
  3. At the reception gate press E as a police officer: it unlocks and locks itself again after 5 s. Without the job the card says No access.
  4. As staff open /doors, pick a door and press Unlock, then open its Lock & crime tab.
  5. Give yourself a keycard with /doorcard mrpd 2 and swipe it at the cell block door.

Before you open it ​

What the test harness cannot see is the game itself. Check these once on your server:

  1. The example doors in 20_doors.lua are set for the vanilla Mission Row PD. Move or replace them for your MLOs; /doorcreate reads model, position and heading off the real entity.
  2. Gloves and helmets. Config.Finger.bareArms and Config.Face.helmets hold freemode drawable numbers. Clothing packs shift them: add your own numbers, or gloves and helmets are read wrongly.
  3. Sounds. Config.Sounds (in client/modules/effects.lua) maps unlock, lock, deny, knock, ring and alarm to GTA sound names. Listen to them once.
  4. Ignored models. Config.Ignore.models keeps np_banking's vault, teller and gate doors out. Add the models of any other resource that drives its own doors.
  5. Wall devices, if you turn them on: they have not been run on a live server yet. Check that the props spawn and sit flush, the LEDs land on the lenses, the animations reach the device and the 3D keypad's camera and clicks line up (World devices & 3D keypad).
  6. Balance. Breach cooldowns, ram door integrity (Config.Ram.doorHp), keypad lockouts and alarm chances are first values.

Troubleshooting ​

Symptom Fix
np_doors does not start np_prophandler or np_minigames is not started before it (both are dependencies)
Labels, readers or the manager are blank Build the NUI (web/dist missing), see step 5
Keys, keycards or the ram do nothing on ox / qb Paste the item block (Items); the ram and repair kit call np_doors.useItem
The ram plays the skill ring instead of the ram game np_minigames is older than 1.2.0 (GetGames() has no ram)
A door does not move although the card says open The model or position does not match the map entity; re-place it with the creator
The creator refuses a door Its model is in Config.Ignore.models, or another resource already registered it with the door system
Wall devices do not appear Config.Devices.enabled is false (the default; changing it needs a restart), the door has no device, or np_prophandler is not started
Devices show vanilla models stream/ is missing or its .ydr files are not there; np_doors falls back to the vanilla models
The card tap plays without a card np_door_keycard is not in np_prophandler's server.attachments.clientModels allowlist
The NUI keypad opens instead of the 3D keypad See when the NUI keypad is used: vanilla device, np_passwords PIN, odd mounting height, in a vehicle, or the feature off
Gloves are not detected Add the arms drawables of your clothing pack to Config.Finger.bareArms (everything not listed counts as gloves)