Installation ​
Requirements ​
- A FiveM server with OneSync enabled (
set onesync on). The resource declaresdependency '/onesync'and warns in the console when OneSync is off. - Lua 5.4 (set in the manifest, nothing to install).
There is no database, no build step and no streamed asset. The NUI in html/ is plain HTML/CSS/JS with vendored fonts.
Optional dependencies ​
Everything below is auto-detected at runtime. See Integrations for what each one adds and how to switch it off.
| Kind | Resources |
|---|---|
| Framework | es_extended (first choice), qbx_core, qb-core, or none (standalone) |
| Inventory | np_inventory. Without it, the framework's usable item and item count (on qb / qbx also ox_inventory counts) |
| Siblings | np_hud, np_phone, np_menu, np_identification, np_discord, np_manufacturing, np_helicam |
| Notifications | np_hud, then ox_lib, then the native feed |
| Staff | np_admin: the permission nodes (see Permissions), 40 editable settings (see Configuration → Editable in np_admin), emergencies in its audit log and two staff tools |
Steps ​
- Put the resource in
resources/asnp_flightradar. The NUI callbacks and the np_inventory item export use the resource name. - Add it to
server.cfgafter the framework and the siblings you use:cfgensure es_extended # or qbx_core / qb-core ensure np_inventory # optional ensure np_hud # optional ensure np_phone # optional ensure np_menu # optional ensure np_identification # optional ensure np_discord # optional, see /np_discord/installation ensure np_admin # optional: permissions, settings, logs, staff tools ensure np_flightradar - Open
config.luaand set at least:Config.Access.jobs: which jobs (and minimum grades) get the ground radarConfig.Stations: your tower consoles and who may use themConfig.Emergency.notifyJobs: who is alerted on 7500 / 7600 / 7700- who is an admin: grant
np_flightradar.adminin np_admin (see Permissions)
- If you use the scanner item, give
flight_radarto players (see below).
Start order
Siblings that start later, or restart, are picked up automatically: each integration is re-wired when its resource
starts. The framework bridge re-detects when es_extended, qbx_core or qb-core starts. Starting dependencies first
is still the safe order.
On start the server console prints the version, the number of aircraft tracked and one line per integration with its
state (active, fallback or disabled).
Scanner item ​
The handheld scanner is the item named in Config.Access.item (default flight_radar, false turns it off). Holding
it grants the item mode. Using it opens or closes the panel.
| Setup | What to do |
|---|---|
| np_inventory | Nothing. The item is registered at runtime (label Flight radar scanner, weight 400, not stackable) with the client export np_flightradar.useScanner |
| ESX without np_inventory | Add a flight_radar row to your items table. The resource registers it as a usable item |
| qb-core / qbx_core without np_inventory | Add flight_radar to your shared items. The resource registers it with CreateUseableItem. Item counts are read from ox_inventory when it runs, otherwise from the framework |
| Standalone | Only works with np_inventory |
If RegisterItem on np_inventory fails, the resource falls back to the framework usable item and prints a warning.
Permissions ​
np_flightradar uses no ACE: there are no add_ace lines to set up. Who sees what is decided on the server from:
- Framework jobs and grades (
Config.Access.jobs,Config.Stations[].jobs) and duty (Config.Access.requireDuty). - np_discord roles (
Config.Access.discordRoles) for the ground radar. - Permission nodes, managed in np_admin (grant them to a group or a single player;
np_flightradar.*grants both):
| Node | Grants |
|---|---|
np_flightradar.admin |
The admin mode: every aircraft, Config.Ranges.admin (unlimited), primary radar in every mode. Also the staff tools |
np_flightradar.ground |
The ground radar (and stations without their own jobs) without one of the Config.Access.jobs, for staff or standalone servers |
- Your own veto:
Config.CanUse(src, mode)and theRegisterAccessCheckexport.
When np_admin changes someone's groups, their access is re-resolved right away. Without np_admin running, a node is only held by the fallback:
- the server console;
- the identifiers in the convar
np_admin_fallback(set np_admin_fallback "license:abc…,discord:123…"); - on es_extended, the ESX groups in
np_admin_fallback_groups(defaultadmin,superadmin); - the identifiers and (ESX) groups in
Config.Admin.
Everyone else is refused. See Concepts → Permissions and Using the radar → Access modes for how these combine.
Troubleshooting ​
| Symptom | Fix |
|---|---|
F6 says "You have no access to the flight radar." |
No mode is granted. Check the job and grade in Config.Access.jobs, duty (requireDuty), the scanner item, or sit in an aircraft. Access is cached for 30 s, but job, duty and load events clear the cache straight away |
| Radar is empty | Only active aircraft are traffic: by default someone in the pilot seat or the engine running. Set Config.Traffic.includeParked = true to see everything. Your own aircraft is never listed |
| Console: "OneSync is off" | Set set onesync on in server.cfg. Without OneSync the server sees no aircraft |
| The scanner item does nothing | With ESX alone, the item must exist in the items table. Check the start-up line for np_inventory and the framework line |
| No phone app | Config.Phone.enabled is false, np_phone is not started, or Config.Phone.job / .item gate the store entry. The console warns when registration fails |
/squawk says "Only the pilot can change the transponder." |
Only the pilot, and the copilot (seat 0) when Config.Transponder.copilotCanEdit is on, may change it |
| "Not so fast." | Transponder changes are limited to one per Config.Transponder.rate ms (default 1000) per player |
| Admin sees nothing extra | Grant np_flightradar.admin in np_admin. Without np_admin: np_admin_fallback_groups and Config.Admin.groups are ESX only; on qbx / qb add the identifier to np_admin_fallback or Config.Admin.identifiers |