Configuration ​
Everything is in config.lua at the resource root. It is a shared script, loaded on the client and the server, so
every player can read it. Don't put secrets in it.
General ​
| Option | Default | Description |
|---|---|---|
Config.Locale |
'en' |
'en' or 'de'. Game texts and the panel. Missing keys fall back to English |
Config.Debug |
false |
Extra console output (failed integration calls, listener errors) |
Config.Framework |
'auto' |
'esx', 'qbx', 'qb', 'standalone', or 'auto' (es_extended → qbx_core → qb-core → standalone) |
Config.UpdateInterval |
1000 |
ms between radar updates sent to subscribers. Clamped to 250 – 5000 |
Config.Units |
'aviation' |
'aviation' (ft, kt, fpm, NM) or 'metric' (m, km/h, m/s, km) |
Ranges ​
Config.Ranges = {
air = 6000, -- sitting in an aircraft
ground = 12000, -- allowed job (police, ATC ...) anywhere on the map
item = 4000, -- handheld 'flight_radar' scanner item
station = 0, -- at a radar station (tower), includes primary radar
phone = 8000, -- np_phone app
admin = 0,
}
Config.RangeSteps = { 2000, 4000, 8000, 16000, 0 }
Ranges are horizontal distances in metres, 0 means unlimited. Config.RangeSteps are the range buttons in the panel.
Steps above the granted range are hidden, and the granted range is added as a step if it is not in the list. The
server always filters with the granted range. The panel's range button only narrows what the client shows.
Traffic ​
Config.Traffic = {
requirePilot = true, -- someone in the pilot seat ...
requireEngine = false, -- ... AND (requireEngine) / OR (not requireEngine) the engine running
minSpeed = 0, -- m/s; aircraft slower than this are hidden (0 = off)
includeParked = false, -- true: every heli/plane is shown, parked or not
}
Which aircraft count as traffic. With the defaults, an aircraft shows when someone sits in the pilot seat or its
engine runs. requireEngine = true needs both. includeParked = true skips every check. The exports
GetAircraft always return every registered aircraft, parked ones included.
Access ​
Config.Access = {
inAircraft = true, -- everyone in an aircraft seat gets the onboard radar
jobs = { police = 0, sheriff = 0, ambulance = 0, atc = 0 }, -- job = minimum grade for the ground radar
requireDuty = true,
item = 'flight_radar', -- handheld scanner item (false = off)
discordRoles = {}, -- np_discord role ids/names that grant the ground radar
}
| Option | Description |
|---|---|
inAircraft |
Any seat of a helicopter or plane grants the onboard (air) mode |
jobs |
job = minimum grade for the ground radar. A plain list ({ 'police', 'atc' }) means grade 0 |
requireDuty |
qb / qbx: job.onduty must be true. ESX: only checked when the job carries onDuty (esx_core 1.10+); otherwise having the job counts |
item |
Item name for the scanner mode, or false. See Installation → Scanner item |
discordRoles |
np_discord role ids or names. Holding any of them grants the ground radar, independent of the job |
Admin ​
Config.Admin = {
identifiers = {}, -- e.g. 'license:abc...', 'discord:123...'
groups = { 'admin', 'superadmin' }, -- ESX xPlayer.getGroup()
}
Admins hold the np_admin node np_flightradar.admin. They can open every mode (a station mode only while standing at
a station), get primary radar in every mode, and their best mode is admin with Config.Ranges.admin.
Config.Admin is only read while np_admin is not running, next to the fallback convars np_admin_fallback
(identifiers) and np_admin_fallback_groups (ESX groups). groups is only read on ESX; on qbx / qb and standalone,
list admins by identifier. With np_admin running, np_admin alone decides. No ACE is used. See
Installation → Permissions.
Stations ​
Config.Stations = {
{ label = 'LSIA Tower', coords = vec3(-1037.0, -2963.0, 13.9), radius = 25.0, jobs = { atc = 0, police = 0 } },
{ label = 'Sandy Shores Airfield', coords = vec3(1692.0, 3287.0, 41.1), radius = 20.0, jobs = { atc = 0, police = 0, sheriff = 0 } },
{ label = 'McKenzie Field', coords = vec3(2121.0, 4784.0, 41.0), radius = 20.0, jobs = { atc = 0, sheriff = 0 } },
}
Standing within radius metres (3D) of a station gives the station mode: Config.Ranges.station (unlimited by
default) and primary radar. jobs is job = minimum grade. Without jobs, the ground radar rules apply (jobs from
Config.Access.jobs or a Discord role). Duty follows Config.Access.requireDuty.
Primary radar ​
Config.PrimaryRadar = { enabled = true, range = 8000 }
Stations and admins also see aircraft with the transponder off, as Unidentified contacts without callsign, model or
squawk. range limits these contacts separately, even when the mode itself is unlimited.
Transponder ​
Config.Transponder = {
defaultOn = true,
defaultSquawk = '7000',
copilotCanEdit = true, -- seat 0 may change squawk / callsign too
rate = 1000, -- ms between transponder changes per player
}
Aircraft without a stored state use defaultOn and defaultSquawk. rate has a floor of 100 ms.
Emergency ​
Config.Emergency = {
codes = { ['7500'] = 'hijack', ['7600'] = 'radio', ['7700'] = 'emergency' },
notifyJobs = { 'police', 'ambulance', 'atc' },
discordChannel = nil, -- np_discord log channel name, e.g. 'aviation'
}
codes maps each emergency squawk to the reason passed in the np_flightradar:emergency
event. The emergency squawks themselves are fixed to 7500, 7600 and 7700. Every online player whose job is in
notifyJobs gets an np_hud toast and an np_phone notification. discordChannel posts a log entry through np_discord.
Proximity (TCAS-lite) ​
Config.Proximity = {
enabled = true,
horizontal = 600.0, -- m
vertical = 150.0, -- m
lookahead = 25.0, -- s until closest point of approach
sound = true,
}
A contact whose closest point of approach is within lookahead seconds and inside the horizontal × vertical box
raises a traffic advisory. Inside half the box it is a resolution advisory. See
Using the radar → TCAS.
Blips ​
Config.Blips = {
heli = { sprite = 64, scale = 0.8 },
plane = { sprite = 423, scale = 0.8 },
scale = 0.8,
shortRange = false,
lerpMs = 100, -- dead-reckoning step for blips of aircraft outside your scope
showForPhone = false, -- phone-only subscription also draws map blips
colours = {
default = 0, police = 3, ems = 1, fire = 17, military = 52,
emergency = 1, -- red + flashing
unidentified = 39, -- grey
unlicensed = 5, -- yellow
},
}
Colour priority: emergency, then unidentified (transponder off, also drawn semi-transparent), then unlicensed, then
the organisation, then default. lerpMs is the update step of the dead-reckoning thread (minimum 16 ms). Map blips
are drawn for every mode except a phone-only subscription, unless showForPhone = true.
Callsigns and organisations ​
Config.Callsigns = { perModel = { polmav = 'AIR-1' } }
Config.Orgs = { police = 'police', sheriff = 'police', ambulance = 'ems', fire = 'fire', army = 'military' }
A contact's callsign is the first of:
- the callsign set on the transponder,
- np_manufacturing's
vehicleCallsignstate bag, Config.Callsigns.perModel[model],- the pilot's framework callsign (qb / qbx
metadata.callsign, exceptNO CALLSIGN), - the plate,
N<netId>.
Callsigns are upper-cased, spaces become -, only A-Z, 0-9 and - are kept, at most 8 characters.
Config.Orgs maps the pilot's job to an organisation (police, ems, fire, military). It sets the blip
colour and the badge in the panel and the phone app.
Identification ​
Config.Identification = {
checkPilotLicense = true, -- flag pilots without a valid 'pilot_license' as unlicensed
requireLicenseForAirRadar = false,
document = 'pilot_license',
}
Needs np_identification. checkPilotLicense marks contacts whose pilot has no valid document as Unlicensed.
requireLicenseForAirRadar denies the onboard radar to pilots without one. The licence state is cached for 60 s per
player. While it is unknown (first lookup, np_identification not running), nobody is flagged or denied.
Phone ​
Config.Phone = {
enabled = true,
job = nil, -- nil = everyone; 'atc' or { 'atc', 'police' }
item = nil, -- np_phone store gate: item required to install the app
}
job restricts both the store entry and the phone mode on the server. item is only an np_phone store gate. With
neither set, the app is installed by default. enabled = false removes the app and the phone mode.
Keys, commands, integrations ​
Config.Keys = { panel = 'F6' }
Config.Commands = { radar = 'radar', squawk = 'squawk', transponder = 'transponder', callsign = 'callsign' }
Config.Integrations = {
np_hud = true, np_phone = true, np_inventory = true, np_identification = true,
np_discord = true, np_menu = true, np_manufacturing = true, np_helicam = true,
}
Config.Keys.panel is the default key of the key mapping. Players can rebind it under Settings → Key Bindings →
FiveM. Config.Commands renames the commands. Set an entry in Config.Integrations to false to ignore that
sibling even when it is running. See Integrations.
Config.CanUse ​
Config.CanUse = function(src, mode)
-- deny the scanner inside the prison
if mode == 'item' and exports.my_prison:IsJailed(src) then return false end
return true
end
A server-side veto, called with the player's server id and the mode being resolved (admin, station, ground,
air, item, phone). Returning false denies that mode; anything else allows it. It runs for admins too. Errors
are caught and count as allowed. Other resources can add the same kind of check with
RegisterAccessCheck.
Editable in np_admin ​
When np_admin is running, 40 of these options can be changed in its Resource settings page
(Flight radar). config.lua stays the default; np_admin stores only the values you override. Without np_admin,
config.lua is used as written.
| Category | Fields |
|---|---|
| General | Locale, Framework, UpdateInterval, Units |
| Ranges | Ranges.air / .ground / .item / .station / .phone, RangeSteps |
| Traffic | Traffic.requirePilot, .requireEngine, .minSpeed, .includeParked |
| Access | Access.inAircraft, Access.jobs (JSON, job = minimum grade), Access.requireDuty, Access.discordRoles, Identification.checkPilotLicense, Identification.requireLicenseForAirRadar, PrimaryRadar.enabled, PrimaryRadar.range |
| Transponder | Transponder.defaultOn, .defaultSquawk, .copilotCanEdit, .rate |
| Emergencies | Emergency.notifyJobs, Emergency.discordChannel (empty = no Discord log) |
| TCAS | Proximity.enabled, .horizontal, .vertical, .lookahead, .sound |
| Blips | Blips.heli.scale, Blips.plane.scale, Blips.showForPhone, Blips.colours.police / .ems / .emergency / .unidentified |
When a change takes effect:
- Restart of np_flightradar:
Framework. - Live: everything else. Range and access changes re-resolve every player at once (open panels follow the new
grant). Blip changes restyle every blip on the next update.
Locale,UnitsandRangeStepsreach the panel the next time it opens. NewAccess.discordRolesare checked on join and job change; the 10-minute refresh only runs when the list was not empty at start.
Config.CanUse (function), Config.Stations (coordinates), Config.Admin (fallback only), keys and commands, the
scanner item, Config.Phone, callsigns, organisations, emergency codes, blip sprites and Config.Integrations stay
config-only.