Heatmaps ​
np_net keeps a grid of the map per day and counts what happened in each cell: where players spend their time, where they crash, time out, die or have low FPS. Staff look at it in a viewer that np_net serves itself, no Grafana needed.

Only counts per cell are stored. There are no names, identifiers or routes in the data.
Layers ​
| Layer | Counted when | Position from |
|---|---|---|
presence (player time) |
Every np_net_heatmap_sample_ms (30 s), for each spawned player, in player-minutes |
Server |
vehicle |
The same, while the player sits in a vehicle | Server |
death |
esx:onPlayerDeath, baseevents:onPlayerDied or baseevents:onPlayerKilled; once per player per 10 s |
Server |
low_fps |
A client report says the last 5 s ran below np_net_heatmap_low_fps (30) |
Server |
drop_<category> |
A player drops. One layer per drop category: drop_crash, drop_timeout, drop_reliable_overflow, … |
Last position, at most a minute old |
| Your own | exports.np_net:AddHeat |
Your resource |
Positions always come from the server, also for deaths and low FPS that a client reports. A client only decides when such a point is counted (and that is rate-limited), never where. A modified client can't paint the map.
The server sees player positions with OneSync. np_net refreshes them every 5 s, so a crash is placed where the player was a few seconds before. Players who haven't spawned yet are skipped.
Viewer ​
Open http://<server>:30120/np_net/heatmap and enter the token: np_net_heatmap_token, or np_net_token if that
isn't set. The token stays in that browser tab only (sessionStorage).
| Control | |
|---|---|
| Range | Today, 7 days, 30 days, all days on disk, or a custom from / to |
| Cell | 50, 100, 200 or 400 m. Never finer than the cell the days were recorded with |
| Scale | Linear, √ (default) or log. The top 0.5 % of cells are capped so one extreme cell doesn't wash out the rest |
| Per player-hour | Divides the layer by the player time in each cell. Cells with less than half a player-hour are left out |
| Smooth | Blurs the cells into a smooth map; off shows the raw grid |
| Layers | One layer at a time, with its total in the range |
| Time of day | The layer by server hour, with the peak hour |
| Hotspots | The top cells with the nearest known place. Click one to zoom there |
Drag to pan, scroll to zoom, hover a cell for its value and position.
Per player-hour ​
A busy square always has many crashes, because many players are there. Per player-hour shows where something happens more often than the crowd explains. A heavy MLO, a broken interior or a streaming hotspot stands out even when few players go there:

Good questions to ask the viewer:
- Player time over 30 days: where do players actually play? Which areas are empty and need content?
- Time of day of player time: when is the server full? When should events happen?
- Crashes / low FPS per player-hour: which MLOs, props or areas cost too much?
- Timeouts clustered in one place: a resource or an area that floods clients with entities or events.
- Deaths: dangerous roads, spawn camping, PvP zones that grew where they shouldn't.
- In a vehicle vs. player time: roads that are used, places people go on foot.
Deep links ​
The viewer reads its state from the URL, so a view can be shared:
/np_net/heatmap?layer=drop_crash&normalize&range=30&cell=200&scale=log&at=925,45
layer, normalize, range (1, 7, 30, all), cell, scale (linear, sqrt, log), at=x,y (centre
and zoom in), cells (smoothing off). ?demo shows generated sample data without a server.
Map image ​
Without an image the viewer draws a kilometre grid and known places (Legion Square, Sandy Shores, Paleto Bay, …). np_net ships no map image. To show the real map underneath:
- Put a GTA V map image into the resource as
web/map.jpg(or.png/.webp). np_net reads it once at start and serves it at/np_net/heatmap/mapwith the token. Or setnp_net_heatmap_map_urlto anhttp(s)URL. - Set the world area the image covers:cfgThe values depend on the image. Check them against the place markers and adjust until they line up.
set np_net_heatmap_map_bounds "-5600,-4000,6000,8400" # example: minX,minY,maxX,maxY of your image
Data on disk ​
data/heatmap-index.json the days on disk
data/heatmap-2026-10-07.json one file per day: per layer the total, 24 hour buckets and the cells
- Today's file is written every 5 minutes, on
npnet heatmap saveand when np_net stops. After a restart np_net continues today's file. - Days older than
np_net_heatmap_days(30) are deleted. - Days and hours are the server's local time.
- A cell size change (
np_net_heatmap_cell) applies from the next day. The viewer merges days with different cell sizes into the coarsest. - Each layer keeps at most
np_net_heatmap_max_cells(40000) cells a day. Points in new cells beyond that only count in the totals and innp_net_heatmap_ignored_total{reason="cell_cap"}.
A busy server with 50 m cells writes a few hundred kB to a few MB per day.
Your own layers ​
Any server resource can add points:
exports.np_net:AddHeat('robbery', coords) -- vector3 or { x =, y = }
exports.np_net:AddHeat('robbery', source) -- a player id: their current position
exports.np_net:AddHeat('fuel_bought', coords, 40) -- weight, default 1
| Layer name | Lower case letters, digits and _, starts with a letter, at most 32 characters |
| Layers per day | At most 48, built-in ones included |
| Weight | A number above 0, at most 1 000 000 |
| Returns | true, or false, reason (bad_layer, bad_value, off_map, too_many_layers, no_position, disabled) |
Custom layers appear in the viewer under Custom.
Security ​
/np_net/heatmap/dataand/np_net/heatmap/mapneed the bearer token. The viewer page and its stylesheets don't: they contain no data.- Give staff
np_net_heatmap_token. It opens the heatmap but not/np_net/metrics; once it is set, the scrape token no longer opens the heatmap. np_net_allow_ipsapplies to every heatmap address too.- One data request per second and address; more get
429. - The page is sent with a strict Content-Security-Policy,
X-Frame-Options: DENYandno-referrer.