Skip to content

np_doors v1.0.0 ​

Door locks built on the Nimbus UI design system. A door shows a label in the world that says why you may open it ("Police · grade 2+", "Key from Mia · 2 h"). Behind the access rules sits an optional lock chain: a physical key, a keycard, a keypad code, a fingerprint or a face scan, in any order. Doors follow a weekly schedule, lock themselves again, can be locked down per building and shared as digital keys from the np_phone Keys app. Criminals pick, hack, crack, drill and burn their way in, police ram doors, and every breach is a game of np_minigames. A broken door stays open until somebody repairs it.

It runs on es_extended, qbx_core or qb-core, or standalone, with np_inventory, ox_inventory, qb-inventory or no inventory at all. es_extended with np_inventory is the first target. The hard dependencies are oxmysql, np_prophandler (the door engine: door system natives, streaming and sync) and np_minigames (every breach). np_doors has no minigame code of its own. Staff rights are np_admin permission nodes (no ACE). Every other np_* resource is optional and plugs in when it runs (Integrations).

Door labels in the world: the near card of the Mission Row PD front doors, with the far tiles of the doors behind it

Keypad Keycard
Keypad Keycard
Keypad. A wrong code shows the tries left; too many lock the keypad for everybody Keycard reader. The card's group and level must fit the door
Fingerprint Face scan, mask detected
Fingerprint. Gloves fail, a forged print counts as somebody else's finger Face ID. The server reads mask, glasses and helmet off the ped and offers the fallback
Door manager Creator
Door manager. Buildings, groups and doors, access rules, behaviour, the weekly schedule and the activity log Creator. Aim at a door; the second leaf of a double door is paired automatically
Keys app Share a key
Keys app in np_phone: your doors, remote lock and unlock in range Share a key once, for hours, forever or inside a time window

The world labels, the manager and the creator are in-game captures (1920 x 1080) from a local ESX dev server. The readers and the Keys app come from the browser mock. The UI ships in English and German.

At a glance ​

  • World labels with three levels of detail: a small tile far away, a name chip closer, the full card with state, reason and prompts in reach. Knock, ring and details work for everybody. A target mode (np_menu, ox_target, qb-target) replaces the prompts. See Lock types & access.
  • Access rules: job (grade, on duty, every job of a player through np_faction), gang, identifier, character, item, property (np_housing), custom access sources, public (with time windows or a shop's opening hours). Deny wins. Temporary grants, group and building rules, a staff override and building lockdowns. See Lock types & access.
  • Lock chains: key, keycard (group, level, uses, expiry), pin (sha256 with a per-door salt, lockout, alarm; or np_passwords), finger (gloves fail, forged prints) and face (masks, glasses, helmets and optionally hats read by the server, an allow-list, a fallback, a CCTV clip of denied faces).
  • Breach: lockpick, police ram (warrant logged), thermite, hack, keypad brute force, drill and multi-step chains, all through np_minigames, ram included (with a skillcheck fallback). Alarms reach np_surveillance, np_cctv, the dispatch chain and the owner's phone. See Breach & alarms.
  • Schedules: a weekly grid that opens a door to the public or forces it locked, plus auto-lock, hold-open and timed unlocks.
  • Digital keys and the Keys app: remote lock and unlock in range (np_cellnet jammers block it), share once, timed, forever or in a window, re-share, revoke, security alerts. See Phone app.
  • Door manager and creator: a manager for staff, a scoped version for owners, and an in-world creator with raycast, double-door pairing, swing preview and a test-open. See Manager & creator.
  • Moving from another door system: importers for ox_doorlock, qb-doorlock and nui_doorlock, and ox_doorlock / qb-doorlock shims so scripts written for them drive np_doors doors. See Integrations.
  • Cheap at scale: door states are streamed by 128 m grid cells, no GlobalState per door. 1000+ doors cost nothing while nobody is near.
  • World devices (optional, off by default): a wall keypad, card reader or fingerprint reader next to a door, with a status LED and a short animation when the reader opens. At the keypad the code can be typed on the prop itself (3D keypad), and bystanders see which keys are pressed. Not yet checked in game. See World devices & 3D keypad.
  • For other resources: exports, events and addons for lock types, access sources and breach methods.

Who uses it ​

Resource What it does with np_doors
np_minigames Runs every breach; the ram game was made for np_doors' police raids (Breach & alarms)
np_prophandler The engine under every door: np_doors registers each door as npd_<id> and only changes its state through setDoorLocked. It also streams the optional wall devices, runs their placement and attaches the keycard for the card tap
np_prison Routine cell doors at lockdown: np_doors is its first door system (Config.Routine.doors.system = 'np_doors'), and the ox_doorlock shims work too
np_housing Registers the property access source, opens the door cam on np_doors:ring and lets visitors in with TimedUnlock
np_passwords Keypads whose codes np_passwords manages (door.pin = { provider = 'np_passwords', lock })
np_surveillance, np_cctv Door alarms as points on the ops map (intel on a case when one is given); a clip from the cameras near the door

Quick example ​

lua
-- server: a heist script opens the vault gate for 30 seconds and relocks it
exports.np_doors:TimedUnlock('pacific_gate', 30)

-- give a new hire a temporary job rule on the staff entrance (one week)
exports.np_doors:addAccess('burgershot_back', { kind = 'job', subject = 'burgershot', grade = 0,
  expires = os.time() + 7 * 24 * 3600 })

-- react to every door that was breached
AddEventHandler('np_doors:breach', function(id, src, method, success)
  if success then print(('%s was breached (%s) by %d'):format(id, method, src)) end
end)

Next steps ​