Using the radar ​
Access modes ​
Every view of the radar is a mode. The client only asks for one; the server resolves what the player gets from its
own facts (framework job and grade, duty, item count, seat, position, admin, Discord role) and answers with
{ mode, range, primary }.
| Mode | Panel label | Granted when | Range | Primary radar |
|---|---|---|---|---|
admin |
Admin | np_admin node np_flightradar.admin (without np_admin: the fallback) |
Ranges.admin (unlimited) |
yes |
station |
Tower | Standing at a Config.Stations entry with an allowed job |
Ranges.station (unlimited) |
yes |
ground |
Ground | Job and grade in Config.Access.jobs (on duty), an np_discord role from discordRoles, or the np_admin node np_flightradar.ground |
Ranges.ground (12 km) |
no |
air |
Onboard | Any seat of a helicopter or plane (Config.Access.inAircraft) |
Ranges.air (6 km) |
no |
item |
Scanner | Holding the Config.Access.item item |
Ranges.item (4 km) |
no |
phone |
Phone | np_phone app open, Config.Phone allows it |
Ranges.phone (8 km) |
no |
Opening the panel without a mode (F6, the radial, OpenRadar()) picks the first granted mode in the order
admin → station → ground → air → item. The phone mode is never picked that way; only the phone app asks for it.
Admins pass every mode check, but still need to stand at a station for station.
Access is cached on the server for 30 s per player. Framework job, duty and load events, np_admin permission changes and access-related settings changed in np_admin clear the cache straight away, and active subscriptions are checked again: every 5 s for onboard, station and automatic panel subscriptions, every 30 s for the rest. If a different mode is still granted, the subscription switches to it instead of closing. When a player loses access, the panel closes with "Flight radar access lost." If they still sit in an aircraft, the client falls back to the onboard radar.
Config.CanUse(src, mode) and checks added with RegisterAccessCheck can veto any
mode, for admins too.
Onboard radar and map blips ​
Getting into any seat of a helicopter or plane subscribes you to the onboard radar automatically, even with the panel closed. Contacts then appear as map blips:
- Helicopters and planes have their own sprite, a heading indicator and the callsign as the blip name.
- Colours: red and flashing for an emergency squawk, grey and semi-transparent for Unidentified (primary radar), yellow for an unlicensed pilot, otherwise the organisation colour (police blue, EMS red, fire orange, military dark green) or white. See Configuration → Blips.
- Aircraft streamed in near you get an entity blip that follows the aircraft natively. Aircraft further away get a coordinate blip that is dead-reckoned between updates.
- An aircraft missing from an update is removed at once. Leaving the aircraft removes the onboard subscription and all blips.
The server never sends your own aircraft, so you don't see yourself as a contact.
Panel ​
F6 (the /radar command) opens the panel on the right of the screen.
- Opening and focus. On foot the panel opens with the mouse. In a vehicle it opens without the mouse so you can
keep flying; press
F6again for mouse focus, and a third time to close it. - Pin. The pin button keeps the panel open as an overlay:
Escapethen hands the mouse back to the game instead of closing the panel. The pin setting is stored in the browser storage of the NUI. Without the pin,Escapecloses it. - Header. Mode chip (Onboard, Ground, Tower, Scanner, Admin), contact count and the current range. The panel claims np_hud's top-right zone while it is open.
- Scope. Heading-up while you are in an aircraft (
HDG 062°), north-up otherwise (N↑). Range rings, a label per contact with callsign, altitude (in aviation units a flight level such asFL078above 5,000 ft) and speed, a vertical trend arrow, and red boxes for emergencies. Click a contact to select it. - Range and filters. Range buttons from
Config.RangeSteps(capped at the granted range,∞for unlimited), and toggles for helicopters, planes and Emergencies only. - Contact list. Sorted by distance: callsign and squawk, model, badges (organisation, camera active, transponder off, unlicensed, emergency), altitude, speed and vertical trend, distance and bearing. Clicking a row selects the contact and sets a GPS waypoint to it.
- TCAS banner. Traffic and resolution advisories appear above the range bar. See TCAS.
The scanner item opens the same panel in item mode. Using the item again closes it.
Transponder and squawk codes ​
Every aircraft has a transponder state { on, squawk, callsign } in the np_fr_xpdr state bag, which only the server
writes. Aircraft without a stored state use Config.Transponder.defaultOn and defaultSquawk (7000).
Only the pilot may change it, and the copilot (seat 0) when Config.Transponder.copilotCanEdit is on. The
server checks the seat itself, validates the values and allows one change per Config.Transponder.rate ms.
| Where | How |
|---|---|
| Panel | The transponder card (onboard mode, pilot or copilot): on / off switch, squawk field, callsign field, and buttons for 7000, 7500, 7600, 7700 |
| Commands | /squawk <code>, /transponder [on|off] (no argument toggles), /callsign [text] (empty resets) |
| np_menu | Vehicle radial Transponder: on / off, squawk 7000 / 7500 / 7600 / 7700, and a callsign dialog |
| Exports | SetSquawk on the client, SetTransponder on the server |
- Squawk: exactly 4 digits, each 0 – 7 (octal), e.g.
7000,0401. - Callsign:
A-Z,0-9and-, at most 8 characters. Input is upper-cased and spaces become-. An empty value resets it, and the contact falls back to the next callsign source (see Configuration → Callsigns). - Transponder off: the aircraft disappears from every radar except primary radar (stations and admins), where it shows as Unidentified without callsign, model or squawk. TCAS can't see it either.
Emergency squawks ​
| Squawk | Meaning |
|---|---|
7500 |
Hijack |
7600 |
Radio failure |
7700 |
General emergency |
When an aircraft switches into an emergency squawk (or turns its transponder on with one), the server:
- flags the contact as an emergency: red, flashing blip, red badge in the panel and the phone app,
- notifies every online player whose job is in
Config.Emergency.notifyJobs(on duty only whenConfig.Access.requireDutyis set) with an np_hud toast and an np_phone notification ("Aircraft emergency: N737LS squawks 7700 (General emergency)"), - posts to the np_discord channel in
Config.Emergency.discordChannel, if set, - fires the local server event
np_flightradar:emergency.
Staying on the same emergency squawk does not alert again. Changing from 7700 to 7500 does.
TCAS alerts ​
While you are the pilot of an aircraft and receive contacts, the client checks every 500 ms for the closest point of approach to each contact with its transponder on (positions dead-reckoned to now):
| Level | When | Text |
|---|---|---|
| TA (traffic advisory) | Closest approach within lookahead (25 s), less than horizontal (600 m) and vertical (150 m) apart |
"Traffic, traffic" |
| RA (resolution advisory) | As TA, but inside half the box (300 m / 75 m) | "Descend, descend now" if the intruder will be above you, "Climb, climb now" if below, "Traffic! Avoid now" if level |
An aircraft already inside the box counts regardless of closure. The worst threat wins (RA over TA, then the soonest).
Each alert shows as an np_hud toast (orange for TA, red for RA) with the intruder's callsign, as a banner in the panel,
and marks the contact in the list and on the scope. A sound plays when the level changes (Config.Proximity.sound).
When the conflict is over, the toast is dismissed and the panel shows "Clear of conflict".
Other resources can react with the local client event np_flightradar:proximity.
ATC stations ​
A station is a tower console: a point with a radius in Config.Stations. Players with an allowed job standing within
the radius get the station mode, labelled Tower: unlimited range and primary radar. The shipped config has
LSIA Tower, Sandy Shores Airfield and McKenzie Field. See Configuration → Stations.
There are no markers or props for stations. Put the coordinates where your tower interior or console is. The position
is checked when the panel opens and again every 5 s. A player who walks away loses the station subscription at the
next check: the panel closes with "Flight radar access lost." and opens in the next granted mode on the next F6.
Scanner item ​
The flight_radar item (Flight radar scanner, "Handheld receiver for aircraft transponders.") grants the item
mode with a 4 km range. Using it toggles the panel. It does not show primary radar contacts. See
Installation → Scanner item for registration on each inventory.
Phone app ​
With np_phone running and Config.Phone.enabled, the resource registers a Flightradar store app (blue tile with
a plane icon). It is installed by default unless Config.Phone.job or Config.Phone.item gate it.
While the app is open, the client subscribes in phone mode and forwards every update to the app. The app shows:
- a live scope (north-up, heading-up while you are flying) and an All / Helicopters / Planes / Emergency filter,
- the contact list with squawk, model, altitude, speed, distance and bearing,
- a detail sheet per contact with altitude, speed, vertical speed, heading, distance, bearing and Set waypoint,
- "No radar access" when the server denies the phone mode.
Emergency notifications from above also arrive as phone notifications from the Flightradar app.
Map blips are not drawn for a phone-only subscription unless Config.Blips.showForPhone = true. The subscription pauses
while the phone is put away and resumes when it opens again. In an aircraft, the onboard radar keeps priority and
the app shows its data.
Commands and keys ​
| Command | Key | Description |
|---|---|---|
/radar |
F6 |
Open the panel, then take mouse focus (in a vehicle), then close it |
/squawk <code> |
Set the squawk (4 digits, 0 – 7). Pilot, or copilot if allowed | |
/transponder [on|off] |
Switch the transponder on or off. Without an argument it toggles | |
/callsign [text] |
Set the transponder callsign (A-Z, 0-9, -, max. 8). Empty resets it |
Command names come from Config.Commands, the default key from Config.Keys.panel. Players can rebind the key under
Settings → Key Bindings → FiveM. With np_menu, the global radial has a Flight radar entry (shown when any panel
mode is granted) and the vehicle radial a Transponder submenu (shown to the pilot or copilot of an aircraft).