All products

np_cellnet

Cell towers, carriers and signal for np_phone. The server decides per player whether calls, texts and data work, and the phone shows it: real bars in the status bar, texts that wait for the network, calls that crackle and drop. Towers can be jammed, stormed and sabotaged, technicians fix them, and the police pull cell-site records with a warrant.

v0.1.0ESX · qbx · qb · standaloneRequires np_phoneEnglish · German
Price TBAStore link follows at release
Installation guideDocumentation
Version
0.1.0
Addon of
np_phone (required): its network provider API, the status bar, the RPC gate and the outbox
Frameworks
ESX first, qbx, qb, standalone
Inventory
np_inventory first, then ox_inventory, qb-inventory or none
Database
oxmysql, tables created on start
Optional
np_admin, np_hud, np_surveillance, np_payments, np_banking, np_minigames, np_prophandler and a weather sync
Languages
English, German
Build
The UI once (Vite and React), the phone app and the tower editor
The CellNet phone app on four phones: the coverage map of Badger with tower ranges, an offline tower and two busy ones, the Status tab with LTE, 3 of 4 bars, -87 dBm and the tower load, the Switch plan sheet with the plans of Badger, Whiz and Tinkle, and the Field Test with the serving cell, five neighbours and the score factors
The CellNet phone app on four phones: the coverage map of Badger with tower ranges, an offline tower and two busy ones, the Status tab with LTE, 3 of 4 bars, -87 dBm and the tower load, the Switch plan sheet with the plans of Badger, Whiz and Tinkle, and the Field Test with the serving cell, five neighbours and the score factors

Rendered from the NUI in the browser with mock data. The world shots use a placeholder skyline, not a game scene.

What's in it

np_phone has no towers of its own, every phone has full service. np_cellnet is the network: it tells np_phone how good the connection is, player by player.

Signal, decided on the server

  • About 35 towers across Los Santos, Blaine County, Paleto Bay, Mount Chiliad and Cayo Perico, plus the ones staff place.
  • Distance falloff, interiors and tunnels, weather, dead and weak zones and congestion make the score. The client can only lower it.
  • Bars, 5G / LTE / 3G / E, dBm and the serving tower, pushed to np_phone only when they change.

Carriers, SIMs and plans

  • Badger, Whiz and Tinkle with their own towers, shared masts, partner roaming and Cayo Perico.
  • A sim_card item decides the carrier, or a carrier per character without items.
  • Weekly plans with a data allowance and autopay, SOS while unpaid, 3G above the allowance. Switch at a carrier store.

Wi-Fi and capacity

  • Hotspots at cafés, clubs, apartments, the airport, PD and EMS: data at full speed, no plan usage and Wi-Fi Calling. Job and password hotspots.
  • A dead tower hands its phones to the next one. A full one answers Network Busy.
  • 911 and 912 always pass and pre-empt the newest normal call on an overloaded tower.

Jammers and the detector

  • A placed cell_jammer kills calls, texts, data and Wi-Fi around it, not even 911 gets through, until its battery runs out or someone picks it up.
  • Police get a jammer_detector: a chip with a compass arrow to the nearest jammer.
  • Jammer positions never reach the clients.

Outages and sabotage

  • Storms knock out rural towers, and staff force outages with a timer.
  • Cut the fibre with a bolt cutter or pull the breaker at a tower cabinet. The tower runs on its battery first, then goes dark.
  • A silent alarm reaches police and technicians, and np_surveillance gets an intel entry.

Telecom technician job

  • CellOps in the app: towers down, busy or on backup power, repair jobs with a waypoint.
  • Repairs at the cabinet with parts and an np_minigames game checked on the server, paid per repair.
  • COW masts (cells on wheels) for events and blackouts, and tower upgrades from 3G to LTE to 5G bought by the boss.

Cell-site records

  • Every cell change is logged: number, handset, tower and position on a 50 m grid, kept 14 days by default.
  • Records for a number and a time window, and a live triangulation from the towers that hear the phone.
  • A SIM swap changes the number, not the handset, so the records link both.

Staff (np_admin)

  • The tower editor (/cellnet): place and tune towers live, draw dead zones by walking, switch the world rules.
  • The nodes np_cellnet.admin, .records and .jammer, live settings, staff actions and an audit log. No ACE.
  • The Nimbus UI follows the server theme. English and German.

A closer look

What lives where

np_cellnet is an addon and np_phone its host. np_cellnet decides the network state, np_phone shows it and enforces it in every app.

np_cellnet (this resource)np_phone
Towers, carriers, SIMs, plans, Wi-Fi hotspots, dead zonesThe network state per player (setNetwork), shown in the status bar, Control Center and Settings → Cellular
The signal score, bars, network type, dBm and tower loadThe RPC gate: every app call needs sms, voice, data-lite or data, with readable errors
Tower capacity (network_busy) and the emergency rules, through an rpc hookThe outbox: texts wait for the network and send themselves on reconnect
Data usage per phone call to the server, through an rpcResult hookCall quality by the weaker side, voice drop-outs, dropped calls on lost service
Jammers, outages, sabotage, the technician job, cell-site recordsThe CellNet app as a store app that opens without service, notifications and the Dynamic Island

Everything np_cellnet hands to np_phone is registered in one attach, in any start order and again after every np_phone restart. Without a provider np_phone simply has full service everywhere.

How the signal is made

Every two seconds the server scores the nearest towers of each player's carrier. No database access in the tick.

FactorDefault effect
Distance100 × (1 − (d / reach)^1.6), a taller mast reaches further
Interior−18
Underground−55 in tunnels, the subway and basements
Weather−14 in a thunderstorm, −6 in rain, from the server's weather script (or the player's own weather without one)
ZonesA dead zone is 0, a weak zone subtracts its penalty, optionally limited in height
CongestionUp to −15 as the tower load goes from 70 to 100 %
JammerNothing else matters: jammed
  • Bars and type: 4 bars from a score of 75, 1 bar from 12. 5G steps down to LTE, 3G and E as the signal fades.
  • Roaming: the best tower of your carrier or a shared mast, else a partner's or Cayo Perico's, if the world rule and the phone's Roaming switch allow it.
  • SOS: no SIM, an unpaid plan or no usable tower means 0 bars and emergency calls only, as long as some tower hears the phone.
  • Tunable live: the tick, the bar thresholds, the penalties and the world rules in np_admin and the tower editor.

The CellNet app

On every phone by default, and it opens without service, so you can find out why you have none.

The coverage map, the Status tab, the Switch plan sheet and the Field Test
  • Coverage: towers, ranges, dead zones, Wi-Fi and carrier stores per carrier, and "Best signal nearby" with a waypoint.
  • Status: bars, type, score, tower, dBm and load, the outages of your carrier, your plan and what you used.
  • Plans: switch carrier or plan at a carrier store. A new carrier means a new SIM.
  • Field Test: dial *3001#12345#* or long-press the version for the serving cell, the neighbours and every score factor.

CellOps for technicians, Records for the police

Two tabs that only show up for the right job.

CellOps alerts and a repair job, the tower upgrade list, the Records form and a triangulation with the cell records
  • Repairs: accept a job, drive to the cabinet, bring a fibre kit or fuses and win the minigame. The server checks distance, parts and time.
  • COW masts at your position for events and blackouts, and upgrades (E → 3G → LTE → 5G, more slots) for the boss grade.
  • Records: a number and a time window give the towers, handovers, phone off and SIM swaps of that handset.
  • Triangulation: rings from up to three towers and an estimated position, tighter with more towers.
  • With np_surveillance both need a warrant, the results land on the case as intel and "Cell towers" is a live source on the ops map.

Towers in the world, and the tools to run them

Staff place and tune towers live, without a restart. Players cut them, jam them and fix them.

The tower editor with the tower list, the map, a tower's form, the dead zones and the world rules
  • Tower editor: add a tower at your position, set carrier, type, range, height, call and data slots, backup power, sabotage cooldown and online state.
  • Dead zones: walk the edge and add a point at each corner. World rules switch interiors, weather, 911 on any carrier, jammers, sabotage and roaming.
  • At the cabinet: hold E to cut the fibre or G to pull the breaker, or repair it as a technician. Prompts and progress bars through np_hud.
  • np_admin: open the editor, force an outage, restore all towers or give a SIM, and every change, sabotage, repair and records query in the audit log.

Set it up

Compatibility

np_phone is required. Everything else is optional, detected at start and has a fallback. No ACE anywhere.

AreaSupported
Phonenp_phone with the network provider API (required)
Frameworkes_extended, then qbx_core, qb-core or standalone
Inventorynp_inventory, then ox_inventory, qb-inventory (and the ps / lj forks) or none. Without one the carrier lives on the character
Databaseoxmysql (required)
Moneynp_payments, then the framework bank and cash. np_banking holds that bank account
Notificationsnp_hud, or the built-in Nimbus toasts, prompts and progress bars
WeatherRenewed-Weathersync, qb-weathersync, vSync, or the weather the clients report
np_* siblingsnp_admin, np_hud, np_surveillance, np_payments, np_banking, np_minigames and np_prophandler

Installation

Build the UI once, then start it after np_phone. The tables are created at start.

  1. Put the resource in resources/ as np_cellnet and build the UI:
    cd web && npm install && npm run build
  2. Start it after np_phone and oxmysql:
    ensure oxmysql
    ensure es_extended     # or qbx_core / qb-core
    ensure np_inventory    # optional: or ox_inventory / qb-inventory
    ensure np_phone
    ensure np_cellnet
  3. Items: nothing to do with np_inventory, it registers them at runtime. On ox_inventory or qb-inventory, paste the item blocks from docs/INTEGRATIONS.md.
  4. With np_admin, grant np_cellnet.admin, np_cellnet.records and np_cellnet.jammer. Without it, Config.Admins and the framework's admin groups are staff.
  5. Check shared/config/: carriers and plans, the telecom job, the police jobs for records, jammer and sabotage values. The most used ones are live settings in np_admin.
  6. In game, open /cellnet and move any tower cabinet that ended up inside a wall. The default coordinates are approximate.

For your own scripts

Server exports and events. Runtime towers you add are owner-tracked and go away when your resource stops.

-- server
local state = exports.np_cellnet:getSignal(src)   -- bars, type, tower, score ...
exports.np_cellnet:isJammed(coords)
exports.np_cellnet:setTowerOnline('LS-07', false, 'event', 600)
exports.np_cellnet:addTower({ id = 'FEST-1', label = 'Festival',
  carrier = 'shared', coords = vec3(700.0, 600.0, 130.0), type = 'LTE' })
exports.np_cellnet:addUsage(src, 25)              -- MB your resource used

AddEventHandler('np_cellnet:towerStatus', function(towerId, online, reason) end)

-- np_phone, for any resource: what an RPC needs
exports.np_phone:setRpcNeed('racing.join', 'data')

Also getTowers, getCellRecords, triangulate, getPlan and giveSim, and the events np_cellnet:signal, np_cellnet:sabotage and np_cellnet:jammer.

Questions

Does it work without np_phone?

No. np_cellnet is an addon of np_phone and needs its network provider API: np_phone shows the bars, gates the apps and queues the texts, np_cellnet only decides the state. It attaches whenever np_phone is ready, also after a restart of either.

What happens to np_phone without np_cellnet?

Nothing changes: without a network provider every phone has full service and the status bar shows the carrier from np_phone's config.

Can players still call 911 in a dead zone?

On SOS, yes: emergency calls pass on any carrier's tower that hears the phone (a world rule), and they pre-empt normal calls on a full tower. A jammer is the one thing that blocks them too.

Do the police need np_surveillance for records?

No. Without it the police job (or np_cellnet.records) decides and every request goes to the np_admin log. With it, records and triangulation need a warrant and the results are filed on the case.

Do I need np_inventory?

No. np_inventory is the first choice and registers the items itself, ox_inventory and qb-inventory work with the item blocks from the docs. Without any inventory the carrier lives on the character, and jammers, detectors and parts are not available.

Is it tested in game?

Not yet on a live server. The logic is covered by a Lua test suite with fake natives, an in-memory database, a fake np_phone host and fakes of the siblings, but nobody has made a call through it in GTA yet.

Does a SIM swap change my number?

In the cell records, yes: a SIM with its own number is logged under it, and the records link it to the handset. Calls and texts still use np_phone's one number per character.

Works well with

Ensure it after np_phone, and every bar means something.

Installation, every config key and every export are in the docs.

Install np_cellnet