Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (Lua 5.4) with OneSync turned on (the server reads every position from the player's own ped)
  • oxmysql
  • np_prophandler 1.1.0+: the camera and recorder props, their options and the placement ghost
  • Node 18+ to build the NUI once, if your copy has no web/dist yet

oxmysql and np_prophandler are dependencies in the fxmanifest and must start before np_cctv.

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: nothing costs, no jobs
Inventory np_inventory (first target), ox_inventory, qb-inventory (and the ps / lj forks) none: no items, staff place gear with commands (Commands)
Live pictures screenshot-basic Placeholder tiles and stills without a picture; the full view stays live

Optional np_* siblings, all with a built-in fallback:

Resource Used for Without it
np_admin Staff rights by node, the settings page, the audit log, the theme Config.Admins, framework admin groups and np_discord roles
np_surveillance Cameras announced as a source, footage handed to the police filed on a case Nothing is announced and nothing is filed
np_screens Show a still on the nearest screen No push to screens
np_phone Owner alerts as banners Alerts as toasts
np_hud Toasts, prompts, progress bars np_cctv's own NUI layer
np_menu (or ox_target / qb-target) The option on monitor terminals An own prompt and E
np_payments The cloud backup fee Framework money
np_discord Staff by Discord role, tamper log No Discord staff or logs
np_character Character names for owners and key lists Framework names
np_shops, np_banking, np_prison Register events, robbery clips, prison alerts in the feed Ignored
np_colshape Enter and exit of the interaction points as colshapes. Needed on FiveM Legacy only, GTAV Enhanced has the natives built in Distance checks as before

Steps ​

  1. Put the folder into your resources as np_cctv. Item definitions call np_cctv.useItem and other resources call exports.np_cctv, 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 screenshot-basic     # optional: live pictures and stills
    ensure np_prophandler       # required
    ensure np_surveillance      # optional siblings, any order
    ensure np_screens
    ensure np_phone
    ensure np_cctv
  3. Database: the tables (prefixed np_cctv_) are applied at every start. To create them by hand instead, import sql/install.sql.
  4. Items (Items): nothing to do on np_inventory; paste the block on ox_inventory and qb-inventory; with no inventory, staff use commands.
  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 ci && npm run build
    web/dist is not in the repository. Without the build the UI is blank. Build again after any change under web/.
  6. Optional setup (Configuration):
    • A terminal in a back office: Config.Monitor.terminals.
    • Job networks such as a police station: Config.Networks (Monitor).
    • The link np_screens uses to fetch stills: Config.Share.baseUrl (Footage).
    • The clock your shops' opening hours follow: Config.World.clock.
  7. 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. With an inventory, get a cctv_recorder and a cctv_camera into your inventory with your inventory's admin give tool. Without an inventory use /cctvrecorder and /cctvcamera as staff.
  3. Use the recorder, aim at the floor and press Enter. Then use the camera, aim at a wall, choose the recorder with Q / E and press Enter.
  4. Use a cctv_monitor (or /cctv as staff) and watch the camera. Walk through its view cone and look at the event feed.

Before you open it ​

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

  1. Prop models and orientation. The camera and recorder models (prop_cctv_cam_01a, prop_cctv_unit_01, ...) and the direction the prop faces compared to the lens heading are engine guesses. Tune the models in shared/config/cameras.lua (Config.Cameras.types.*.model, Config.Recorder.model, the lens offset).
  2. The camera look. The time-cycle modifier of the camera picture and the weapon-wheel controls used for the mouse wheel are guesses too.
  3. The lens animation. The animation played while covering or cleaning a lens, and taking, stealing or smashing a recorder.
  4. Live pictures need screenshot-basic. Without it the tiles are placeholders. How well it captures a script-camera render is something to look at once in game.
  5. The clock. Config.World.clock is 'real' (the server's wall clock) or 'game' (the GTA day, minutesPerGameDay real minutes long). Pick the one your shops' opening hours follow. hourOffset shifts either.
  6. Screens. Config.Share.baseUrl must be an address np_screens can reach (http://127.0.0.1:30120 on the same machine).
  7. Balance. Prices, ranges, retention and the lens chances are first values.

Motion is judged by position and view cone, not line of sight: a person behind a wall but inside the cone is seen.

Troubleshooting ​

Symptom Fix
The monitor or the placement HUD is blank Build the NUI (web/dist missing), see step 5
Items cannot be used on ox / qb Paste the item block (Items); definitions call np_cctv.useItem
The tiles show "No live image on this server" screenshot-basic is not running. Start it before np_cctv or restart np_cctv
"No recorder in reach: place a recorder first" A camera needs a recorder of yours within Config.Install.wireRange (90 m)
Pushing a still to a screen fails np_screens is not running, Config.Share.baseUrl is empty, or the clip has no picture (see Footage)
No after-hours events The site has no opening hours; see Footage
The props are in the wrong place or face the wrong way Tune the model and offset in shared/config/cameras.lua