Skip to content
NPPROTECTION
Documentation

Install, configure and operate NP

The full reference ships with the resource (README) and the dashboard (DEPLOY.md). This page covers what staff need day to day.

Install the resource

  1. Copy the NP folder into resources and add ensure NP after your framework.
  2. Grant staff ACEs: add_ace group.admin np.admin allow, and np.observe for staff who may spectate.
  3. Start the server and run np_selftest and np_cfgtest in the console. Both must pass.

Server hardening

set sv_scriptHookAllowed 0
sv_pureLevel 1
set sv_entityLockdown relaxed
set sv_filterRequestControl 4
set sv_enableNetworkedSounds false
set sv_disableClientReplays true
ensure screenshot-basic

Run np_hardening to audit them. Test entity lockdown and request control with your scripts first.

Connect the dashboard

  1. On the dashboard machine: npm run cli -- generate-secret.
  2. Put the secret in the dashboard .env (NP_SECRET) and in server.cfg as set np_web_secret "…" (plain set).
  3. In config.lua: Config.Web.enabled = true, backendUrl and allowIps.
  4. npm run cli -- create-owner yourname, npm start, then check np_web in the FiveM console.

Safe rollout

  1. Apply the Development Mode preset: nobody is punished and every verdict is explained in the console.
  2. Play for a few days with your real scripts. Tune thresholds or open authorised windows from your scripts.
  3. Switch to Testing Mode (warnings only), then Standard Protection.

Configuration Center

Each protection has a switch, its own settings, and a response block: strongest action, confidence threshold, severity, strikes, cooldown, in-game staff notification and Discord logging. Client-reported protections are limited to a warning.

Changes are staged as pending changes. Save draft stores them in the dashboard for review; Apply sends them to the game server, which validates every value against the catalogue, writes data/settings.json and applies them immediately. Critical settings (Dev mode, the global ceiling, event validation, blocking resource starts) need a second confirmation and the config.critical permission.

Every applied configuration is stored as a version with its author. Compare any two versions and roll back. Changes made from the game console are recorded too. Presets and imports always show a change list you confirm item by item.

Whitelists

Exempt players and ACEs, trusted and approved resources, critical resources, weapon, vehicle, ped and object lists, job-locked weapons, explosion types and blocked name fragments. Lists are rebuilt live on the game server.

Player observation

The Observation page shows every online player's server-side state: position, heading, weapon, vehicle, health, armor and suspicion score. Starting an observation requires a reason and is logged. While observed, the player's client reports its camera rotation, aiming and shooting a few times per second; this is labelled as client-reported.

Spectating happens in your game client, not in the browser. Link your game account (Account page, then /nplink CODE in game), hold the np.observe ACE, and choose third-person (FiveM spectator mode) or first-person. First-person is an approximation: a camera at the player's head turned by their reported camera rotation. Exit with /npstopspec.

The website never shows video of another player's screen. Evidence screenshots are separate: a single game frame through screenshot-basic, requested with a reason and stored as evidence.

Aim analysis

Combines server indicators (headshot ratio at range, impossible target switches, silent-aim angles, witnessed wall shots) with client-reported reaction time and recoil drift, and compares each player with your server's baseline. A player is suggested for review only with two independent indicator types, or an extreme baseline outlier plus an indicator.

Investigations

Open an investigation from a player, an aim review or a detection. Statuses: Open, Under Review, Confirmed, False Positive, Closed. The evidence timeline merges sessions, detections, observations, punishments, staff notes and status changes. Reviewing detections as confirmed or false positive feeds the false-positive rate per rule in Analytics.

Resources and events

See every server resource with its state, starts and stops, missing dependencies and manifest changes. Approve resources, mark them critical, re-baseline after an update, and (with config.critical) start, stop or restart them. Secured events show calls and rejections by reason, with per-event limits you can override.

Console commands

np_status · np_webHealth, modules, dashboard link
np_selftest · np_cfgtest · np_hardeningSelf tests and convar audit
np_bans · np_baninfo · np_unbanBan management
np_history · np_sim · np_debugInvestigation and developer tools
/nplink CODE · /npstopspecIn game: link your dashboard account, stop spectating

Script integration

exports.NP:AllowTeleport(src, 10)        -- admin teleports, spawn selectors
exports.NP:AllowHealthChange(src, 5)     -- revives, healing items
exports.NP:AllowCamera(src, 30)          -- housing previews, CCTV, character creator
exports.NP:AllowEntitySpawn(src, 10)     -- trusted scripts spawning restricted or many entities
exports.NP:AllowVehicleChange(src, 30)   -- mechanic, plate change, server repair
exports.NP:SecureEvent(name, opts, fn)   -- validated, rate-limited server events

Security model

  • The resource is the source of truth for bans and for configuration; the dashboard never edits files on the game server.
  • Both directions are signed with HMAC-SHA256 over a timestamp, a single-use nonce, the method, the path and the body. NP only accepts calls from allow-listed IPs.
  • Passwords use scrypt; sessions are HttpOnly SameSite=Strict cookies; state-changing requests need a CSRF token and a matching Origin.
  • Every route checks its permission server-side; staff cannot grant permissions they lack; every action is audited, including refused ones.
  • Webhook URLs, the shared secret and server configuration files never reach the browser.

Troubleshooting

  • NP server unreachable: check NP_URL, port 30120 between the machines and Config.Web.allowIps.
  • Configuration changed on the game server: someone applied a change since you loaded the page. Reload; your pending changes stay staged.
  • Spectate refused: your linked game account must be online and hold np.observe.
  • np_cfgtest failures: report them with your FXServer build; they mean a control is not reaching its protection.