Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (uses entity state bags and Lua 5.4)

Nothing else is required. The NUI in html/ is plain HTML/CSS/JS with vendored fonts, so there is nothing to build.

Optional dependencies ​

Everything below is auto-detected. Start these resources before np_helicam.

Kind Resources What it adds
Framework qbx_core, qb-core, es_extended Jobs and duty for the air / ground / bolo roles, and callsigns (qb / qbx metadata.callsign)
Fuel np_fuel, ox_fuel, LegacyFuel, cdn-fuel, ps-fuel (first started wins, looked up again on every boarding) FUEL % and endurance on the HUD. Without one, the native fuel level is used, and nothing is shown if it is 0
Notifications np_hud, ox_lib Used when Config.Notify.provider is 'np_hud' or 'ox_lib'. Otherwise the built-in Nimbus toasts
Evidence screenshot-basic B (bookmark) also takes an evidence screenshot
Staff np_admin The standalone role nodes (see Permissions), about 40 editable settings (see Configuration → Editable in np_admin) and finished missions in its audit log

Steps ​

  1. Put the resource in resources/ as np_helicam. The NUI callbacks use the resource name.
  2. Add it to server.cfg, after its optional dependencies:
    cfg
    ensure qbx_core          # or qb-core / es_extended, if you use one
    ensure np_fuel           # optional, or ox_fuel / LegacyFuel / cdn-fuel / ps-fuel
    ensure np_hud            # optional, for Config.Notify.provider = 'np_hud'
    ensure screenshot-basic  # optional, evidence screenshots
    ensure np_admin          # optional: permissions, settings, logs
    ensure np_helicam
  3. Open config.lua and set at least:
    • Config.Helicopters: the models that have the camera
    • Config.Jobs: which jobs get the air, ground and bolo roles (framework servers)
    • Config.Callsigns: the air callsign, per model if you like
    • Config.Department and Config.Callsign: the text in the HUD header
  4. Optional: set the Discord webhook for mission reports (see below).

Start order

The framework bridge on the server re-detects when qbx_core, qb-core or es_extended starts after np_helicam. Fuel and notification providers are looked up when they are used. The safe order is still: dependencies first.

Roles ​

There are three roles. The server checks them on every action, and the client only uses its copy to show or hide UI.

Role Grants
air Open the camera, place / rename / delete markers, BOLO checks from ANPR, mission recording, crew share
ground The F7 Air Support panel, the live feed, orbit requests, BOLO and share alerts
bolo Manage the BOLO list with /bolo (the role is set by Config.Bolo.commandJobs)

air and ground receive the marker list and can subscribe to the friendly-unit positions. The F9 settings sheet only opens in a camera heli. bolo is separate so that, for example, EMS keep the Air Support panel but can't flag plates.

With a framework ​

Config.Framework = 'auto' picks the first of qbx_core, qb-core, es_extended that is started. A player has a role when their job name is in Config.Jobs.air / .ground / .bolo:

lua
Config.Jobs = {
  air = { 'police', 'sheriff', 'lspd', 'bcso', 'sasp' },
  ground = { 'police', 'sheriff', 'lspd', 'bcso', 'sasp', 'ambulance' },
  bolo = { 'police', 'sheriff', 'lspd', 'bcso', 'sasp' },
  requireDuty = true,     -- qb / qbx: job.onduty must be true
  standaloneAllow = true,
}

ESX has no duty flag, so having the job counts as on duty. Job and duty changes are picked up through the framework events (QBCore:Server:OnJobUpdate, QBCore:Server:SetDuty, esx:setJob, …) and pushed to the client.

Standalone ​

Without a framework, Config.Jobs.standaloneAllow = true gives everyone every role, like v1. To restrict it, set it to false and grant the role nodes in np_admin (see Permissions). With standaloneAllow = false, only players holding the node have the role. The nodes are only consulted in standalone mode: with a framework, the roles come from Config.Jobs.

Permissions ​

np_helicam uses no ACE. On a standalone server the three roles are permission nodes, managed in np_admin (grant them to a group or a single player; np_helicam.* grants all three):

Node Grants
np_helicam.air The air role: camera, markers, searchlight, live feed
np_helicam.ground The ground role: F7 Air Support panel, marker and BOLO toasts
np_helicam.bolo The bolo role: /bolo add / remove / list

When np_admin changes someone's groups, their roles are re-checked right away. Without np_admin running, only the fallback holds a node:

  1. the server console;
  2. the identifiers in the convar np_admin_fallback (set np_admin_fallback "license:abc…,discord:123…");
  3. on es_extended, the ESX groups in np_admin_fallback_groups (default admin,superadmin). On ESX the roles come from Config.Jobs anyway, so this step doesn't matter for np_helicam.

See Concepts → Permissions.

Config.CanUse ​

Config.CanUse(ped, heli) still exists. It runs on the client each time the camera opens and each time the searchlight or hover key is pressed outside the camera. Return false to deny:

lua
Config.CanUse = function(ped, heli)
  return GetVehicleLivery(heli) == 0 -- e.g. only the police livery
end

Client-side only

Config.CanUse is a UX gate, not a security boundary. The real gate is the role check on the server. Every server handler re-checks the role, the seat (for air actions) and rate limits. Clients write no state bags: the server validates what the operator sends and writes the bags itself.

Discord webhook ​

Finished mission reports can be posted to a Discord channel. The URL is a server convar, never part of config.lua, because that file is shared and is sent to every client:

cfg
set np_helicam_webhook "https://discord.com/api/webhooks/..."

It must start with https://. The post is an embed with the plain-text report, the duration, distance, event count and operator. Screenshots are not uploaded to Discord. See Operations → Mission recording.

With np_admin running, every finished mission is also written to its audit log (category np_helicam, action mission) with the mission id, callsign, operator, end reason, duration, distance, event count and screenshots. The webhook keeps working either way.

Troubleshooting ​

Symptom Fix
E does nothing Check that the model is in Config.Helicopters (the lowercase spawn name, matched by model hash), that you sit in a seat in Config.CameraSeats, that you have the air role (job + duty, or the np_helicam.air node on standalone), and that Config.CanUse returns true. In the first second after joining, the role may not have arrived yet.
E, F7 or F9 conflicts with another script Rebind it in Settings → Key Bindings → FiveM. Every action is a key mapping. The settings sheet uses F9 because qb-radialmenu binds F1.
F7 does nothing You don't have the ground role. Check Config.Jobs.ground, duty, or (standalone) the np_helicam.ground node in np_admin. Without the role, F7 is silent on purpose.
F9 does nothing You don't sit in a camera heli (a model listed in Config.Helicopters).
/bolo says "Not authorised." You don't have the role in Config.Bolo.commandJobs (default bolo: Config.Jobs.bolo, or on standalone the np_helicam.bolo node in np_admin).
Minimap is in the wrong place after closing the camera or the Air Support panel Another HUD (e.g. np_hud) placed the minimap. Set Config.ContextMap.restore to its layout, or have it listen for np_helicam:contextMap.
No FLIR right after opening the camera FLIR warms up for Config.Thermal.warmupMs (8 s). The FLIR pill shows the percentage.
Grainy picture Config.Camera.cctvEffect is on (server-wide), or the player turned on CCTV grain in F9.
No fuel on the HUD No fuel resource is started and the native fuel level is 0.
Hover won't engage You are below Config.Hover.minAltitude (15 m) or faster than Config.Hover.maxEngageSpeed (12 m/s). Hover is a hold, not an autobrake.
B takes no screenshot screenshot-basic is not started, or Config.Mission.screenshots is false. One screenshot per 5 s per player.
A searchlight stays lit after the operator left The server sweep turns it off within about 10 s once its operator is no longer in a camera seat with the air role. See Searchlight sync.
Standalone player has no role although standaloneAllow = false and np_admin grants the node np_admin is not running (only the fallback applies), or the node is denied in another of the player's groups (an explicit deny wins).