Configuration ​
Everything is in Config.PropHandler in shared/config.lua. It is a shared file, loaded on the client and the
server. Some values can also be changed live in np_admin (Editable in np_admin).
General ​
Config.PropHandler = {
enabled = true,
debug = false,
maxDefinitions = 4096,
allowedModels = nil,
framework = nil,
frameworkPollIntervalMs = 5000,
debugPrintIntervalMs = 5000,
definitions = {},
doorDefinitions = {},
-- definition, server, streaming, interaction, attachments, locals, world, doors, placement: below
}
| Key | Default | Description |
|---|---|---|
enabled |
true |
false turns the resource off. Clients don't stream, and every register export returns false, 'resource_disabled' |
debug |
false |
Server console prints for prop registrations, owner clean-up and denied door toggles |
maxDefinitions |
4096 |
Most props registered at once, all resources together |
allowedModels |
nil |
Optional allowlist for spawned models: props, attachments and the to model of swaps. Keys are names or hashes, e.g. { prop_vend_soda_01 = true }. nil accepts any model. Hidden map models and doors are not checked |
framework |
nil |
nil detects es_extended, then qbx_core, then qb-core. Force one with 'esx', 'qbx', 'qb' or 'standalone' |
frameworkPollIntervalMs |
5000 |
How often the client re-reads the player's job and gang. Framework job events trigger an early re-read |
debugPrintIntervalMs |
5000 |
Interval of the client print toggled by prophandler_debug |
definitions |
{} |
Props owned by np_prophandler itself. Same shape as registerProp. Rejected entries are printed at start |
doorDefinitions |
{} |
Doors owned by np_prophandler itself. Same shape as registerDoor |
Definition limits ​
Checked when something is registered. Props already registered keep their values.
definition = {
coordinateLimit = 10000.0,
zMin = -1000.0,
zMax = 3000.0,
maxRoutingBucket = 65535,
minSpawnDistance = 5.0,
maxSpawnDistance = 300.0,
defaultSpawnDistance = 80.0,
minRenderDistance = 1.0,
maxLodDistance = 1000,
maxTextureVariation = 63,
maxDespawnDelayMs = 120000,
maxDataDepth = 3,
maxDataEntries = 32,
maxDataStringLength = 256,
maxConditionEntries = 32,
maxAttachOffset = 5.0,
minWorldRadius = 0.1,
maxWorldRadius = 200.0,
maxDoorParts = 8,
maxInteractOptions = 6,
defaultDoorSpawnDistance = 50.0,
},
| Key | Default | Description |
|---|---|---|
coordinateLimit |
10000.0 |
Largest absolute x and y |
zMin / zMax |
-1000.0 / 3000.0 |
Allowed z range |
maxRoutingBucket |
65535 |
Highest routingBucket |
minSpawnDistance / maxSpawnDistance |
5.0 / 300.0 |
Allowed spawnDistance, also for doors |
defaultSpawnDistance |
80.0 |
spawnDistance of a prop that sets none |
minRenderDistance |
1.0 |
Smallest renderDistance. The largest is the prop's spawnDistance |
maxLodDistance |
1000 |
Largest lodDistance |
maxTextureVariation |
63 |
Largest textureVariation |
maxDespawnDelayMs |
120000 |
Largest per-prop despawnDelayMs |
maxDataDepth / maxDataEntries / maxDataStringLength |
3 / 32 / 256 |
Limits of the data table: nesting, entries in total, string and key length |
maxConditionEntries |
32 |
Most names in one jobs or gangs list |
maxAttachOffset |
5.0 |
Largest attachment offset on any axis |
minWorldRadius / maxWorldRadius |
0.1 / 200.0 |
Allowed radius of world model hides and swaps |
maxDoorParts |
8 |
Parts of one door (double doors, gates) |
maxInteractOptions |
6 |
Options in one interact list |
defaultDoorSpawnDistance |
50.0 |
spawnDistance of a door that sets none |
Server ​
server = {
bucketPollIntervalMs = 2000,
snapshotMinIntervalMs = 30000,
latentTimeoutMs = 60000,
latentSnapshotThreshold = 64,
latentBytesPerSecond = 200000,
networked = { … },
attachments = { … },
doors = { … },
world = { … },
},
| Key | Default | Description |
|---|---|---|
bucketPollIntervalMs |
2000 |
How often each player's routing bucket is read and pushed to them on change. refreshPlayer pushes it at once |
snapshotMinIntervalMs |
30000 |
A player gets at most one snapshot per interval. The first request is always answered. Clients retry after this plus 5 s |
latentTimeoutMs |
60000 |
A latent snapshot counts as in flight until the client confirms it or this passes. No new snapshot is sent while one is in flight |
latentSnapshotThreshold |
64 |
Snapshots with more entries are sent as a latent event |
latentBytesPerSecond |
200000 |
Bandwidth of latent snapshots |
Networked props ​
server.networked = {
enabled = true,
maxRegistered = 256,
maxActive = 64,
maxCreatesPerTick = 8,
pollIntervalMs = 1000,
cellSize = 128.0,
despawnMargin = 15.0,
despawnDelayMs = 15000,
recreateDelayMs = 2000,
orphanMode = 2,
},
| Key | Default | Description |
|---|---|---|
enabled |
true |
false refuses networked = true with 'networked_disabled' |
maxRegistered |
256 |
Most networked props registered at once |
maxActive |
64 |
Most networked props that exist as entities at the same time |
maxCreatesPerTick |
8 |
Entities created per server pass |
pollIntervalMs |
1000 |
How often player positions are read. Keep it slow |
cellSize |
128.0 |
Grid cell size for the player lookup |
despawnMargin |
15.0 |
An existing entity counts players up to spawnDistance + this |
despawnDelayMs |
15000 |
An entity with nobody in range is deleted after this |
recreateDelayMs |
2000 |
An entity deleted by something else is created again after this, if a player is still near |
orphanMode |
2 |
Value for SetEntityOrphanMode. 2 keeps the entity when its owner leaves |
Attachments (server) ​
server.attachments = {
maxPerPlayer = 8,
rateWindowMs = 5000,
maxUpdatesPerWindow = 20,
clientModels = nil,
},
| Key | Default | Description |
|---|---|---|
maxPerPlayer |
8 |
Most attachment entries in one player's state bag, all keys together. Clients ignore bags with more |
rateWindowMs / maxUpdatesPerWindow |
5000 / 20 |
Synced attach requests a client may send per window. Removals are never limited |
clientModels |
nil |
Optional allowlist (names or hashes) for models clients may attach with synced = true. nil = any model allowedModels permits |
Doors and world (server) ​
server.doors = {
maxDoors = 1024,
toggleCooldownMs = 750,
distanceTolerance = 1.5,
},
server.world = {
maxEntries = 512,
},
| Key | Default | Description |
|---|---|---|
doors.maxDoors |
1024 |
Most doors registered at once |
doors.toggleCooldownMs |
750 |
A player may ask to toggle a door this often |
doors.distanceTolerance |
1.5 |
Added to the interact distance when the server checks a toggle request |
world.maxEntries |
512 |
Most world model hides and swaps at once |
Streaming ​
Client side, for streamed props. See Streamed props for how the values work together.
streaming = {
cellSize = 64.0,
despawnMargin = 10.0,
despawnDelayMs = 10000,
renderMargin = 3.0,
pollIntervalMs = 500,
idlePollIntervalMs = 2000,
moveThreshold = 2.0,
revalidateIntervalMs = 10000,
maxSpawnsPerTick = 4,
maxActive = 256,
modelLoadTimeoutMs = 5000,
retryDelayMs = 30000,
},
| Key | Default | Description |
|---|---|---|
cellSize |
64.0 |
Edge length of a 2D grid cell. Only cells around the player are scanned |
despawnMargin |
10.0 |
A spawned prop is only removed beyond spawnDistance + this |
despawnDelayMs |
10000 |
Default delayed delete: out of range, a prop is hidden at once and deleted after this. A prop can set its own despawnDelayMs |
renderMargin |
3.0 |
A shown prop is only hidden beyond renderDistance + this |
pollIntervalMs |
500 |
Interval of the client pass |
idlePollIntervalMs |
2000 |
Interval while nothing is registered at all |
moveThreshold |
2.0 |
A pass is skipped while the player stays within this distance of the last scanned position and nothing changed |
revalidateIntervalMs |
10000 |
A full pass still runs this often while standing still, to replace props something else deleted |
maxSpawnsPerTick |
4 |
Spawns per pass, nearest first |
maxActive |
256 |
Most streamed props per client, hidden ones included |
modelLoadTimeoutMs |
5000 |
A model that takes longer counts as failed. Also used by createLocal |
retryDelayMs |
30000 |
A prop whose model timed out is tried again after this. Models missing from the game files are never tried again |
Interaction ​
interaction = {
provider = 'auto',
fallback = false,
pollIntervalMs = 250,
idlePollIntervalMs = 1000,
cooldownMs = 500,
maxPredicates = 1024,
allowedEvents = {},
},
| Key | Default | Description |
|---|---|---|
provider |
'auto' |
'auto' takes np_hud, then ox_target, then qb-target, then builtin when fallback is on, else 'none'. Or force one of 'np_hud', 'ox_target', 'qb-target', 'builtin', 'none' |
fallback |
false |
Built-in 3D text with a key, used only when no other provider runs |
pollIntervalMs |
250 |
Proximity check for prompts |
idlePollIntervalMs |
1000 |
Interval while no spawned prop and no nearby door has an interact option |
cooldownMs |
500 |
Minimum time between two interactions |
maxPredicates |
1024 |
Predicates attached with setCanInteract / setDoorCanInteract, per client |
allowedEvents |
{} |
Interact events allowed for any resource, as a set: { ['shared:event'] = true }. Other events must start with the owner's resource name and a colon |
See Interaction & availability.
Minigames ​
minigames = {
enabled = true,
maxMove = 2.0, -- metres a player may move during the game before it fails ('moved')
distanceTolerance = 3.0, -- redeemInteraction: interact.distance + this
},
Off, or np_minigames not started: props fire without a receipt, redeemInteraction answers
{ success = true, skipped = true }, and doors toggle for their jobs / gangs. See
Interaction → Minigames.
Attachments, locals, world, doors (client) ​
attachments = {
maxLocal = 32,
maxRemote = 128,
renderDistance = 150.0,
pollIntervalMs = 500,
maxResends = 5,
maxRebuilds = 5,
rebuildBackoffMs = 1000,
},
locals = { max = 64 },
world = { applyDistance = 150.0, margin = 20.0 },
doors = { margin = 10.0 },
| Key | Default | Description |
|---|---|---|
attachments.maxLocal |
32 |
Attachments this client creates with attach() |
attachments.maxRemote |
128 |
Copies rendered on other players' peds from their state bags |
attachments.renderDistance |
150.0 |
Other players' attachments are rendered within this distance |
attachments.pollIntervalMs |
500 |
Interval of the remote attachment check |
attachments.maxResends |
5 |
A synced request the server has not applied is sent again this many times |
attachments.maxRebuilds / rebuildBackoffMs |
5 / 1000 |
An attachment that keeps falling off is rebuilt with growing delays (1 s, 2 s, 4 s, …) and given up after this many rebuilds in a row |
locals.max |
64 |
createLocal handles per client |
world.applyDistance |
150.0 |
Hides and swaps are applied within radius + this |
world.margin |
20.0 |
… and removed beyond radius + applyDistance + this |
doors.margin |
10.0 |
A door leaves the door system beyond its spawnDistance + this |
Placement ​
Defaults of the placement gizmo. A startPlacement call overrides most of them per call.
placement = {
maxDistance = 10.0,
raycastFlags = 17, -- 1 world + 16 objects
alpha = 170,
outline = true,
box = false,
validColor = {90, 220, 120},
invalidColor = {235, 80, 80},
help = true,
rotationStep = 7.5, fineRotationStep = 1.0,
moveSpeed = 1.0, fineMoveSpeed = 0.1,
maxHeight = 3.0,
standDrop = 5.0,
validateIntervalMs = 100,
updateIntervalMs = 100,
confirmCooldownMs = 300,
gizmo = { size = 0.15, ringSegments = 32, pickRadius = 0.015, activeColor = {255, 210, 60} },
controls = { confirm = {38, 191, 201}, cancel = {194, 200, 322}, toggleGizmo = {47}, … },
blockedControls = {24, 25, 37, 44, 140, 141, 142, 199, 257, 263, 264, 16, 17},
inputNames = { [38] = 'INPUT_PICKUP', … },
text = { confirm = 'Place', cancel = 'Cancel', …, reasons = { no_surface = 'No surface', … } },
},
| Key | Default | Description |
|---|---|---|
placement.maxDistance |
10.0 |
Furthest the object may be from the player, and the raycast reach. Per call: maxDistance |
placement.raycastFlags |
17 |
Raycast flags of aim mode. Per call: flags |
placement.alpha |
170 |
Ghost alpha |
placement.outline / box |
true / false |
Ghost outline and bounding box in the valid / invalid colour |
placement.validColor / invalidColor |
green / red | RGB |
placement.help |
true |
GTA help text with the keys. Per call: help = false |
placement.rotationStep / fineRotationStep |
7.5 / 1.0 |
Degrees per wheel notch or key press, and with Shift held |
placement.moveSpeed / fineMoveSpeed |
1.0 / 0.1 |
Metres per second for nudges and height, and with Shift held |
placement.maxHeight |
3.0 |
Aim mode: most the object can be lifted off or sunk into the surface |
placement.standDrop |
5.0 |
align = 'stand': how far below a wall hit the ground may be |
placement.validateIntervalMs / updateIntervalMs |
100 / 100 |
Most often validate / onUpdate run |
placement.confirmCooldownMs |
300 |
keepOnConfirm: shortest time between two confirms |
placement.gizmo.size |
0.15 |
Handle length as a share of the camera distance, so it stays the same size on screen |
placement.gizmo.ringSegments / pickRadius / activeColor |
32 / 0.015 / yellow |
Ring detail, the cursor distance (screen units) that picks a handle, the colour of the handle in use |
placement.controls |
see Keys | Control ids per action. Per call: controls |
placement.blockedControls |
attack, aim, cover, melee, weapon wheel, … | Disabled while placing, on top of the action keys |
placement.inputNames |
Input names for the key glyphs in the help text. Add one when you map an action to another control | |
placement.text |
English | Help texts and refusal reasons. Per call: labels |
Editable in np_admin ​
When np_admin is running, 40 of these options can be changed in its Resource settings page
(Prop handler). shared/config.lua stays the default; np_admin stores only the values you override. Without
np_admin, the config is used as written.
| Category | Fields |
|---|---|
| General | enabled, debug, maxDefinitions |
| Definitions | definition.defaultSpawnDistance, definition.minSpawnDistance, definition.maxSpawnDistance, definition.maxLodDistance, definition.maxDoorParts, definition.maxInteractOptions |
| Streaming | streaming.pollIntervalMs, .idlePollIntervalMs, .despawnMargin, .moveThreshold, .revalidateIntervalMs, .maxSpawnsPerTick, .maxActive, .modelLoadTimeoutMs, .retryDelayMs, .despawnDelayMs, .cellSize |
| Server | server.bucketPollIntervalMs, server.latentSnapshotThreshold, server.latentBytesPerSecond, server.snapshotMinIntervalMs, server.latentTimeoutMs |
| Networked | server.networked.maxActive, server.networked.despawnDelayMs |
| Attachments | attachments.renderDistance, attachments.maxRemote |
| Interaction | interaction.fallback |
| Minigames | minigames.enabled, minigames.maxMove, minigames.distanceTolerance |
| Placement | placement.maxDistance, placement.help, placement.outline, placement.box, placement.rotationStep, placement.moveSpeed, placement.gizmo.size |
When a change takes effect:
- Restart of np_prophandler:
enabled. Clients decide whether to stream when they start. - Client reload:
streaming.despawnDelayMs(props registered after the change) andstreaming.cellSize(props are put into grid cells when they arrive, so clients pick it up on their next join). - Live: everything else. The definition bounds are checked when a prop is registered, so props already registered keep their values.
allowedModels, server.attachments.clientModels, interaction.allowedEvents, framework, definitions and
doorDefinitions stay config-only.
The debug command is gated by the np_admin node np_prophandler.debug. See
Events → Commands.