Skip to content

Configuration ​

Three files hold the settings, all commented. They are shared (client and server), so nothing secret goes in there. 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, AdminDiscordRoles), Integrations, Payments, Theme, World, Rpc, Timers
shared/config/cameras.lua Cameras (types and limits), Install, Recorder, Lens, Props
shared/config/monitor.lua Monitor, Recording, Clips, Share, Backup, Networks, Access
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 CCTV (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', 'none' (auto: np_inventory > ox_inventory > qb-inventory)
Config.Admins {} Staff without np_admin: FiveM identifiers ('license:...', 'discord:...'). See Commands & staff
Config.AdminGroups esx = { 'admin', 'superadmin' }, qb = { 'admin', 'god' } Framework groups that count as staff without np_admin (ESX getGroup(), qb / qbx HasPermission)
Config.AdminDiscordRoles {} With np_discord: role ids or np_discord role names that count as staff
Config.AdminDiscordCacheSeconds 60 How long a Discord answer is kept
Config.Payments.account 'cash' 'cash' or 'bank': the account used without np_payments
Config.Rpc { perSecond = 8, burst = 16 } Token bucket per player for every request
Config.Timers.tickSeconds 5 Seconds between timer checks

Integrations ​

Config.Integrations.<name> is 'auto' (used while the resource runs) or false (always the built-in fallback). All default to 'auto':

np_surveillance, np_inventory, np_screens, np_hud, np_phone, np_payments, np_menu, np_discord, np_admin, np_character, np_banking, np_shops, np_prison.

What each one does is on Integrations.

Theme ​

Config.Theme overrides the server theme for np_cctv alone. Leave every value nil to follow np_admin's central theme (or the np_theme_* convars).

Key Default Values
brand nil A hex colour, for example '#3D74FF'
strength nil 'accent', 'tiles', 'glass'
material nil 'frosted', 'liquid'

World ​

The clock that after-hours motion is judged by (Footage).

Key Default Description
clock 'real' 'real': the server's wall clock. 'game': the GTA day
minutesPerGameDay 48 Real minutes per GTA day (the GTA default)
hourOffset 0 Hours added to either clock

Cameras (cameras.lua) ​

Config.Cameras.types has one entry per camera type; exports.np_cctv:registerCameraType adds more at runtime (Cameras & recorders).

Key Meaning
id a-z0-9_
item The inventory item that places it. One item per type; unique per unit
model The world prop. Any model name works; the defaults are engine guesses
fov, minFov, maxFov Horizontal field of view in degrees; the player aims it between min and max
range, maxRange How far it sees in metres (motion capture and the cone in the preview)
pan, tilt, zoomMax PTZ limits: degrees left and right of the mount, degrees up and down, magnification. 0 pan and tilt means fixed
offset Lens position in front of the prop in metres (the cone starts there)
icon, price Font Awesome icon; a price for shops that sell it
Type Item Model FOV (min / max) Range (max) Pan / tilt / zoom Price
fixed cctv_camera prop_cctv_cam_01a 70 (40 / 100) 35 m (45 m) 0 / 0 / 1x 180
ptz cctv_camera_ptz prop_cctv_cam_04c 60 (40 / 80) 55 m (70 m) 120 / 35 / 4x 650
dome cctv_camera_dome prop_cctv_cam_07a 95 (70 / 110) 25 m (30 m) 180 / 45 / 2x 320
doorbell cctv_doorbell prop_cctv_cam_03a 110 (90 / 120) 10 m (12 m) 0 / 0 / 1x 120
Option Default Description
Cameras.maxPerNetwork 16 Cameras on one site
Cameras.maxNetworksPerPlayer 4 Sites a player owns
Cameras.defaultMode 'auto' 'auto' (infrared when it is dark), 'day', 'ir'
Cameras.irHours { from = 20, to = 6 } Game hours in which auto uses infrared (the client decides with the game clock)

Install (Config.Install) ​

Option Default Description
reach 7.0 The player must stand this close (metres) to the spot they place at. The server checks
wireRange 90.0 Camera to recorder distance in metres
preview { coverageSeconds = 0.3, minCoverage = 0 } Coverage estimate refresh; below minCoverage placing is refused (0 = never)
aimStepHeading, aimStepPitch, fovStep 2.0, 2.0, 5.0 Steps of the aim keys and the wheel in degrees
noInventory 'staff' Without an inventory: 'staff' only staff place and pick up, 'free' everybody, 'off' nobody
commands { camera = 'cctvcamera', recorder = 'cctvrecorder', monitor = 'cctvmonitor' } Command names; set one to nil or false to drop it

Recorder (Config.Recorder) ​

Option Default Description
model 'prop_cctv_unit_01' The recorder prop
items.cctv_recorder capacityHours = 48, maxCameras = 8, price = 900 The standard recorder
items.cctv_recorder_pro capacityHours = 168, maxCameras = 16, price = 2400 The Pro recorder: a week of buffer
pickupSeconds 4 The owner takes it with them; the footage stays on it
stealSeconds 7 Somebody else takes it; the footage is wiped unless backed up
smashSeconds 6 Smashing it; the footage is wiped unless backed up
reach 2.5 Metres from the recorder

Add another recorder item by adding an entry to items (and the item to your inventory, see Items).

Lens (Config.Lens) ​

Option Default Description
reach 3.5 Metres from the camera. The server checks
coverSeconds / cleanSeconds 4 / 5 Length of the actions
chance fixed 0.90, ptz 0.75, dome 0.55, doorbell 0.95 Chance that a cover attempt works, by camera type
item nil An item the cover needs (for example 'spray_can'). nil = bare hands
consume true The item is used up on success
cooldownSeconds 8 Per player and camera after a failed attempt

Props (Config.Props) ​

Option Default Description
streamRadius 90.0 Props closer than this to the player exist: the np_prophandler spawnDistance (5 to 300 m)

Monitor (Config.Monitor) ​

Option Default Description
item 'cctv_monitor' The laptop item that opens the monitor anywhere
usbItem 'cctv_usb' A clip on a stick
terminals {} Terminal props that open the monitor, see below
terminalRadius 3.0 The server checks the player stands this close to the terminal
snapshotMs 1000 The selected camera's picture is refreshed this often (screenshot-basic)
thumbMs 4000 The other tiles, one after the other
settleMs 700 Time the game gets to stream the area after the view jumped to another camera
snapshotQuality 0.4 JPEG quality of live pictures (0 to 1)
fullViewKey 'BACK' Leaves the full view (informational)

A terminal entry:

lua
Config.Monitor.terminals = {
  { id = 'shop_back_office', label = 'Back office monitor',
    coords = { x = 28.7, y = -1339.1, z = 29.5 }, radius = 1.5,
    network = 'shop_innocence' },    -- a Config.Networks key or a network id; nil = every network the player may watch
    -- job = 'police',               -- optional: a job name (or a list) that may use it
}

Recording (Config.Recording) ​

Option Default Description
motion.enabled true Motion events on or off
motion.tickSeconds 3 How often every online camera looks for people and vehicles in its cone
motion.mergeSeconds 25 Motion within this long after the last sighting extends one event
motion.subjects { person = true, vehicle = true } What counts
motion.ignoreAuthorised false true: people with a key or job access to the network do not trigger events
motion.alert { phone = true, afterHoursOnly = true, cooldownSeconds = 120 } The np_phone banner to the owner
pruneSeconds 600 Retention sweep
eventsPerCamera 600 Hard cap of kept events per camera
backupHours 168 How long a backed-up recorder's footage is kept in the cloud
feedHours 12 "Events - tonight": how far back the feed goes

Clips (Config.Clips) ​

Option Default Description
defaultSeconds 180 The Clip button saves this much, up to now
maxSeconds 900 Longest clip
maxPerNetwork 60 Clips per site
stillMaxBytes 200000 A still larger than this is refused
stillQuality 0.3 JPEG quality of a still

Share (Config.Share) ​

Option Default Description
evidenceStash 'evidence:%s' The evidence stash of a case id
intel true File np_surveillance intel when footage is shared
mapKinds shop = true, other = true, home = false, pd = false Which site kinds np_cctv pings and sends events to np_surveillance for (Integrations)
baseUrl '' How np_screens reaches this server ('http://127.0.0.1:30120' on the same machine). '' switches pushing to screens off
tokenSeconds 600 How long a still link works
evidenceRadius 45.0 A robbery saves what the cameras within this distance saw
registerRadius 14.0 A purchase is logged on the camera within this distance of the buyer

Backup (Config.Backup) ​

Option Default Description
fee 0 One-off fee when the owner switches the cloud backup on (np_payments or framework money). 0 = free
account nil 'cash' or 'bank'; nil = Config.Payments.account

Networks (Config.Networks) ​

Networks owned by jobs. They exist as soon as the resource starts. Empty by default.

Key Meaning
key A unique id (also what a terminal's network refers to)
label, kind Name; 'shop', 'pd', 'home' or 'other'
jobs { job = lowestGradeToWatch }
manage The lowest grade that may place cameras, change PTZ settings, save clips and hand out keys
hours { open = 8, close = 22 }: opening hours for after-hours motion. Absent: always open
feeds { np_prison = true }: the site follows prison alert levels
lua
Config.Networks = {
  { key = 'mrpd', label = 'MRPD Mission Row', kind = 'pd', jobs = { police = 0 }, manage = 3 },
  { key = 'bolingbroke', label = 'Bolingbroke', kind = 'pd', jobs = { police = 2, corrections = 0 }, manage = 4,
    feeds = { np_prison = true } },
}

Other resources register networks with exports.np_cctv:registerNetwork. See Monitor.

Access (Config.Access) ​

Option Default Description
maxKeysPerNetwork 12 Shared keys (people who may watch) on one site
grantRadius 6.0 The person you hand a key to must stand this close

Editable in np_admin ​

np_cctv registers its config with np_admin's Resource settings (icon video, blue, label CCTV). np_admin stores only the overrides; the config files stay the default. Every field is read live unless noted.

Category Setting Key
General Language (applies at the next init) Locale
General Debug log Debug
General Clock for opening hours World.clock
General Clock offset in hours (-12 to 12) World.hourOffset
Cameras Cameras per site (1 to 64) Cameras.maxPerNetwork
Cameras Sites per player (1 to 20) Cameras.maxNetworksPerPlayer
Cameras Placing reach in metres (2 to 15) Install.reach
Cameras Camera to recorder range in metres (10 to 500) Install.wireRange
Cameras Placing without an inventory Install.noInventory
Cameras Covering a lens in seconds (1 to 30) Lens.coverSeconds
Cameras Cleaning a lens in seconds (1 to 30) Lens.cleanSeconds
Recording Motion events Recording.motion.enabled
Recording Motion scan interval in seconds (1 to 30) Recording.motion.tickSeconds
Recording Motion merge window in seconds (5 to 120) Recording.motion.mergeSeconds
Recording Ignore people with access Recording.motion.ignoreAuthorised
Recording Phone alerts for owners Recording.motion.alert.phone
Recording Cloud backup retention in hours (1 to 720) Recording.backupHours
Recording Longest clip in seconds (30 to 3600) Clips.maxSeconds
Recording Clips per site (1 to 500) Clips.maxPerNetwork
Recording Cloud backup fee (0 to 100000) Backup.fee
Recording Hand-over to a case files intel (np_surveillance) Share.intel

Camera types, recorder items, props, networks, terminals and everything not listed stay in the config files. See Commands, keys & staff for the permission nodes.