Configuration ​
Six files hold the settings, all commented. They are shared (client and server), so nothing secret goes in there: keypad codes are hashed at load and never sent to clients. Every number is a starting value; tune it for your server.
| File | What |
|---|---|
shared/config/00_core.lua |
Locale, Framework, Inventory, staff without np_admin (Admins, AdminGroups), Integrations, Theme, Clock, streaming, Interaction, rate limits, Timers, Ignore, Keys, Phone, Manager, Log, Compat |
shared/config/10_locktypes.lua |
Keypad, Keycard, Key, Finger, Face |
shared/config/20_doors.lua |
Doors: the version-controlled doors (below) |
shared/config/30_items.lua |
Items, ItemDefs, Repair |
shared/config/40_crime.lua |
Breach, Ram, Alarm, Dispatch, Jobs, Lockdown |
shared/config/50_devices.lua |
Devices: optional wall devices, their animations and the 3D keypad (below) |
shared/locales/en, de |
Every player-facing string of the Lua side |
With np_admin running, the main tunables are also editable in game on its Resource settings page under Doors (see Editable in np_admin).
Core (00_core.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Locale |
'en' |
'en' or 'de' |
Config.Debug |
false |
Debug log |
Config.Framework |
'auto' |
'esx', 'qbx', 'qb', 'standalone' (auto: es_extended > qbx_core > qb-core) |
Config.Inventory |
'auto' |
'np', 'ox', 'qb' (qb / ps / lj-inventory), 'none' (auto: np_inventory > ox_inventory > qb-inventory) |
Config.Admins |
{} |
Staff without np_admin: FiveM identifiers. See Commands & permissions |
Config.AdminGroups |
esx = { 'admin', 'superadmin' }, qb = { 'admin', 'god' } |
Framework groups that count as staff without np_admin |
Config.Theme |
all nil |
brand, strength, material: overrides np_admin's central theme for np_doors alone |
Config.Clock.hourOffset |
0 |
Shifts the server clock for schedules and time windows |
Config.StreamCell |
128.0 |
Metres per streaming cell. A player gets the state changes of the doors in their cell and the 8 around it |
Config.Stream |
{ tickMs = 1000, bps = 50000 } |
How often player cells are re-read; latent event rate for the door list and state batches |
Config.RateLimit |
{ perSecond = 2, burst = 4, spamCount = 12, spamWindow = 10 } |
Toggle bucket per player; 12 toggles within 10 s are flagged to np_admin |
Config.Rpc |
{ perSecond = 10, burst = 20 } |
Bucket per player for every other request |
Config.DistanceTolerance |
1.5 |
Metres added to a door's distance when the server re-checks a toggle |
Config.Timers |
{ tickSeconds = 1, scheduleSeconds = 30 } |
Auto-lock resolution; how often the weekly schedules are evaluated |
Config.Ignore.models |
np_banking's vault, teller and gate models | Never registered, refused by the creator and the importers |
Config.Manager.ownerGrade |
4 |
The grade of the owning job that gets the scoped manager |
Config.Log |
{ keepDays = 14, perDoor = 50, denied = true } |
Activity log: pruned after 14 days, 50 entries in the manager, refused attempts logged too |
Config.Compat |
{ oxExports = true, qbEvents = true } |
The ox_doorlock and qb-doorlock shims |
Integrations ​
Config.Integrations.<name> is 'auto' (used while the resource runs) or false (always the built-in fallback). All
default to 'auto':
np_admin, np_hud, np_menu, np_phone, np_inventory, np_faction, np_gangs, np_character, np_housing,
np_shops, np_passwords, np_surveillance, np_cctv, np_mdt, np_cellnet, np_clothing, np_colshape,
np_prison, np_banking, ox_target, qb-target.
What each one does is on Integrations.
Interaction ​
| Key | Default | Description |
|---|---|---|
mode |
'prompt' |
'prompt': world labels and keys. 'target': options on np_menu, ox_target or qb-target |
keys |
use = 'E', knock = 'G', ring = 'H', details = 'LMENU', breach = 'X' |
Default bindings; players rebind them in the GTA settings under FiveM |
labelRange |
25.0 |
Far level of detail: a small lock tile |
midRange |
10.0 |
Mid level: the name chip |
nearRange |
2.0 |
Near level: the full card with prompts (a door's distance overrides it) |
maxLabels |
12 |
Labels drawn at once, closest first |
fps |
20 |
Label updates per second while something is in range |
defaultDistance |
2.0 |
Interaction distance of a door without its own |
anyoneCanLock |
false |
true: everybody may lock an open door (access then only gates unlocking) |
knockCooldownMs, ringCooldownMs |
2500, 5000 |
Between two knocks / rings |
Digital keys and the phone ​
| Key | Default | Description |
|---|---|---|
Keys.skipChain |
true |
A digital key (and the staff override) opens without the door's lock chain |
Keys.maxPerDoor |
50 |
Live digital keys per door |
Keys.maxHours |
720 |
Longest timed share (30 days) |
Phone.app |
'np_doors_keys' |
The np_phone store app id |
Phone.remoteRange |
25.0 |
Metres for a remote toggle from the phone (a door's remote overrides it; 0 = off) |
Phone.jammable |
true |
np_cellnet jammers block remote toggles |
Phone.default |
false |
true: the app is on every phone |
Lock types (10_locktypes.lua) ​
What each lock type does is on Lock types & access.
| Key | Default | Description |
|---|---|---|
Keypad.minLength, maxLength |
4, 8 |
Code length |
Keypad.maxTries, window, lockout |
3, 300, 120 |
Wrong codes within window seconds lock the keypad for lockout seconds, for everybody |
Keypad.alarmOnLockout |
true |
A lockout trips the door's alarm (when it has one) |
Keycard.masterGroup |
'master' |
A card of this group fits every keycard door (its level still counts) |
Keycard.removeEmpty |
true |
A card whose uses reach 0 is taken |
Key.consume |
false |
A physical key is taken when used |
Finger.maxTries, window, lockout |
5, 300, 60 |
Failed scans per player before the reader locks for that player |
Finger.bareArms[model] |
freemode lists | Arms drawables (component 3) that are not gloves. Every other drawable counts as gloves. Models without a list: gloves are never assumed |
Face.maxTries, window, lockout |
4, 300, 90 |
Failed scans before a lockout |
Face.snapshot |
true |
A denied face asks np_cctv for a clip near the door |
Face.helmets[model] |
freemode lists | Prop 0 drawables that are full-face helmets |
Face.allow.mask / glasses / helmet [model] |
clear lenses for glasses | See-through drawables that never count as covering the face |
Doors (20_doors.lua) ​
Config doors load at every start (source config); their lock state starts as configured. Editing one in game writes
an override row (source override), which Reset in the manager drops again. Doors made in game (creator,
createDoor, importers) live in npd_doors with their lock and broken state. The file ships five example doors at the
vanilla Mission Row PD (front doors, reception gate, cell block, evidence room, armory).
{
id = 'mrpd_evidence', label = 'Evidence room', building = 'Mission Row PD', group = 'Restricted',
type = 'single', -- single | double | sliding | garage | gate | cell
parts = { { model = 'v_ilev_ph_gendoor006', coords = vector3(475.95, -986.21, 25.05), heading = 270.0 } }, -- up to 8
locked = true, distance = 1.8, autoLock = 8, holdOpen = false, sound = 'keypad',
access = { { kind = 'job', subject = 'police', grade = 2 } }, -- see Lock types & access
lockTypes = { 'keycard', 'pin' }, -- the lock chain, in order, after access
keycard = { group = 'mrpd', level = 3 },
pin = { code = '4071' }, -- hashed at load; or { provider = 'np_passwords', lock = 'lock_id' }
key = { group = 'mrpd_keys' }, -- door_key items of this group fit too
face = { hats = false, fallback = 'finger' },
alarm = { enabled = true, kind = 'silent', keypad = true, face = false },
crime = { methods = { hack = { game = 'hexhack', difficulty = 'hard' }, ram = { difficulty = 'hard' } },
cooldown = 900, alarm = 'silent', alarmChance = 0.5 },
schedule = { slots = { { days = { 1, 2, 3, 4, 5 }, from = '09:00', to = '18:00', mode = 'public' } } },
owner = { kind = 'job', id = 'police' }, -- 'property' | 'business' | 'job', optional identifier
public = false, remote = 12.0, -- phone remote range for this door (0 = never)
device = { coords = vector3(...), heading = 90.0, kind = 'keypad' }, -- optional wall device (50_devices.lua)
}
| Field | Description |
|---|---|
id |
[a-z0-9_-], 2 to 48 characters, unique. np_prophandler sees the door as npd_<id> |
label, building, group |
Names in the manager tree (building > group > door) |
type |
single, double, sliding, garage, gate or cell |
parts |
Up to 8 { model = 'name' | hash, coords = vector3, heading? }. A double door or gate is one door |
locked |
Start state |
distance |
Interaction metres (default Config.Interaction.defaultDistance) |
autoLock |
Seconds until it locks itself after an unlock (0 = off) |
holdOpen |
Stays open while somebody is in the doorway |
sound |
'default', 'glass', 'metal', 'vault', 'buzzer' or 'keypad' |
access |
Inline access rules (Lock types & access) |
lockTypes |
The ordered lock chain: key, keycard, pin, finger, face or an addon type |
keycard, pin, key, face |
Settings of those lock types |
crime |
The breach profile: allowed methods with their own difficulty, item, game; cooldown, alarm = 'silent' | 'loud', alarmChance (Breach & alarms) |
alarm |
{ enabled, kind = 'silent' | 'loud', keypad, face }: what trips the door's alarm |
schedule |
{ slots = { { days = { 1..7 }, from = 'HH:MM', to = 'HH:MM', mode = 'public' | 'lock' } } } or { grid = 7 x 24 of 0 | 1 | 2 } (0 normal, 1 open to the public, 2 forced lock). Day 1 is Monday |
owner |
{ kind = 'property' | 'business' | 'job', id, identifier? }: gets the scoped manager and the alarm push |
public |
Everybody may open it |
remote |
Phone remote range in metres (0 = never remote) |
device |
{ coords = vector3, heading, kind? = 'keypad' | 'card' | 'finger', model? }: the optional wall device. coords is the centre of its back face on the wall, heading the way it faces; it must lie within Config.Devices.maxFromDoor of the door |
Rules and keys can also target a whole group or building: group:<slug of building_group> and
building:<slug of building> (the manager shows the keys).
Items (30_items.lua) ​
| Key | Description |
|---|---|
Config.Items |
Item names: key = 'door_key', keycard = 'keycard', ram = 'door_ram', repair = 'door_repair_kit', forgedPrint = 'forged_print' |
Config.ItemDefs |
The np_inventory definitions (Items) |
Config.Repair.jobs |
{ mechanic = 0, police = 0 }: jobs (and minimum grade) that may repair a broken door |
Config.Repair.anyoneWithKit |
true: anybody with a repair kit may; false: only the jobs above (and staff) |
Config.Repair.seconds |
8: the repair progress bar (staff: 1 s, no kit needed) |
Crime (40_crime.lua) ​
| Key | Default | Description |
|---|---|---|
Breach.maxMove |
3.0 |
Metres the player may move during the game |
Breach.cooldown |
120 |
Default seconds between two attempts on the same door (crime.cooldown overrides) |
Breach.alarmChance |
0.5 |
Chance a failed attempt trips the alarm of a door that has one (crime.alarmChance overrides) |
Breach.methods.<name> |
see Breach & alarms | Defaults per method: game, fallback, difficulty, breaks, item |
Ram.anyDoor |
true |
Police may ram every locked door, not only doors whose profile lists ram |
Ram.jobs |
{ police = 0, sheriff = 0, statepolice = 0 } |
Jobs (minimum grade) that may ram |
Ram.onduty |
true |
On duty only |
Ram.item |
true |
Needs the door_ram item |
Ram.alarm |
false |
A lawful entry never trips the alarm |
Ram.warrant |
true |
Ask for an optional warrant reference, logged |
Ram.doorHp |
{ easy = 100, medium = 120, hard = 150, expert = 125 } |
Door integrity handed to the ram game per difficulty (expert is reinforced: 1.5 ×) |
Alarm.duration |
120 |
Seconds the door shows the alarm state |
Alarm.dispatch, intel, cctv, ownerPush, sound |
all true |
Police dispatch, np_surveillance ops-map ping, np_cctv clip, phone push to the owner, an alarm bell nearby |
Alarm.clipSeconds |
60 |
Length of the np_cctv clip |
Alarm.soundRange |
60.0 |
Metres a loud alarm is heard |
Config.Dispatch |
'auto' |
'auto' tries np_mdt, ps, cd, qs in order; a name uses only that one (plus builtin) |
Config.Jobs.police |
{ police, sheriff, statepolice } |
Jobs that get built-in dispatch toasts |
Config.Lockdown.jobs |
{ police = 0, sheriff = 0 } |
Jobs (minimum grade) that still open locked-down doors |
Config.Sounds (in client/modules/effects.lua) maps unlock, lock, deny, knock, ring and alarm to GTA
sound names and sets.
Devices (50_devices.lua) ​
Optional wall devices (keypad, card reader, fingerprint reader) next to a door, streamed by np_prophandler, with a
status LED, an animation when the reader opens, and the 3D keypad. Off by default: with enabled = false no prop
is registered, no LED is drawn and no per-frame work runs. How they work is on
World devices & 3D keypad.
| Key | Default | Description |
|---|---|---|
Devices.enabled |
false |
Master switch (np_admin: restart) |
Devices.spawnDistance |
30.0 |
np_prophandler streaming distance |
Devices.collision |
true |
Collision of the device box |
Devices.maxFromDoor |
3.0 |
Metres from the door's centre a device may sit (checked on every save) |
Devices.models |
keypad = { 'np_door_keypad', 'prop_ld_keypad_01' }, card = { 'np_door_cardreader', 'hei_prop_hei_securitypanel' }, finger = { 'np_door_biometric', 'ch_prop_fingerprint_scanner_01a' } |
First usable model wins; an np_* model only while its stream/<model>.ydr ships |
Devices.kindOf, defaultKind |
pin → keypad, keycard → card, finger / face → finger; 'card' |
The device of a door without device.kind |
Devices.offsets[model] |
{} |
{ pos = vector3, heading } for models whose origin is not the back face centre |
Devices.leds[model] |
the np_door_* lens windows |
Where the status LEDs (and the fingerprint sensor ring) are drawn |
Devices.led |
range = 8.0, light = 0.18, intensity = 2.0, colors |
LED draw range, light, and colours per door state plus deny and scan |
Devices.anim |
enabled = true, dict = 'np_doors_anim_devices', flag = 48 |
The device animations: clips, stand point, height check, the keycard hold (Animations) |
Devices.keypad |
enabled = true, autoSubmit = false |
The 3D keypad: key layout, camera, observable typing (3D keypad) |
Editable in np_admin ​
np_doors registers its settings with np_admin's Resource settings (label Doors, icon door-closed). np_admin stores
only the overrides. live settings apply at once, reload ones at a player's next init.
| Category | Settings |
|---|---|
| General | Language (reload), debug log, interaction mode (reload), anyone may lock, clock offset, phone remote range, days to keep the activity log, toggles per second |
| Readers | Keypad: wrong codes before lockout, lockout seconds, alarm on lockout; take used-up keycards; Face: tries before lockout, CCTV clip of denied faces |
| Crime | Breach cooldown, police ram trips alarms, alarm shown for (s), alarms call the police, dispatch provider |
| Devices | Wall devices (restart), device animations, device LED range; 3D keypad, submit at full length, per-key animations, show key presses to players nearby, key press range, camera FOV (list) |