Coverage
How many bars a phone has, and what happens when it has none.
It ships switched off. A city that has not asked for coverage gets the phone it always had — full bars everywhere, nothing refused, nothing measured:
-- shared/config/signal.luaEnabled = false, -- turn it on when you want bars that come from where the player is standingSwitched on and nothing else changed, still nothing much happens: with no masts and no dead zones the map has full coverage and the only difference is a signal meter that finally tells the truth. Add one line below and it starts to mean something.
All of it is decided on the server, from where the player is actually standing. A client deciding its own signal is a client with no bars while somebody is calling it and four while it is calling out.
What no signal means
Section titled “What no signal means”The same thing airplane mode means, because it is the same fact from the other direction: the city cannot reach that phone.
- Calls in and out are refused, and the phone says You have no signal here rather than not available.
- Messages will not send, and messages sent to them are kept.
- Everything the city tried to deliver is handed over the moment the bars come back — nothing is lost, it waits.
- The phone itself carries on: the camera, the notes, the torch, the photos already on it.
The status bar draws the bars it has, and at nothing it says No service.
Out of town, with nothing to set up
Section titled “Out of town, with nothing to set up”-- shared/config/signal.luaCity = { Centre = vector3(195.0, -890.0, 30.0), -- Legion Square, near enough Full = 3000.0, -- full signal within this None = 9000.0, -- nothing at all past this},Full bars in the city, and they come down one at a time on the way out. Measured on a live server with the defaults above:
| Where | Bars |
|---|---|
| Legion Square | 4 |
| Sandy Shores | 3 |
| Paleto Bay | 1 |
Set City = false to switch it off and use masts alone.
Masts, for a city where coverage is a thing players can point at
Section titled “Masts, for a city where coverage is a thing players can point at”Range = 900.0, -- full signal this close to a mastFade = 1400.0, -- and nothing this much further outMasts = { vector3(-75.0, -818.0, 326.0), -- the tower on Maze Bank vector3(2358.0, 2570.0, 46.0), -- the masts above Sandy Shores},When this list has anything in it, the bars come from the nearest mast and City is ignored. A mast somebody blew up is a neighbourhood with no phones until it is fixed — which is the version worth having if your city wants to do something with it.
Dead = { { Coords = vector3(895.0, -3245.0, -98.0), Radius = 120.0, Bars = 0 }, -- the labs { Coords = vector3(480.0, -1310.0, 29.0), Radius = 40.0, Bars = 1 }, -- the chop shop},A hole wins over whatever the masts say, and where two overlap the smaller number wins: a bunker inside a valley is not better covered for being in both. Bars = 0 is nothing; any other number is a basement that still gets one bar.
A sphere because a sphere is a thing you can find the middle of with one command.
For other resources
Section titled “For other resources”exports.mic_phone:GetSignal(src) --> 0 to Config.Signal.Barsexports.mic_phone:SetJammed(src, true) --> takes their bars away until you give them backBoth of these work with coverage switched off. GetSignal answers the full count, so a script can read it without asking whether the feature exists — and jamming still takes somebody’s bars away, because a heist or a prison that wants a building with no phones in it should not need the whole feature configured first. That is the one case where a phone can lose its signal on a default install, and it is because another resource asked for it.
Jamming is server-side on purpose: a state bag the client could write is a state bag the client can clear. It is the one a heist, a prison or a story uses — jam everybody in the building, and let go when it ends.
Reading it costs nothing at all through the bag:
if (Player(src).state.phoneSignal or 4) == 0 then -- nobody is calling the police from in hereendThe small print
Section titled “The small print”- None of the timing matters until
Enabled = true; with it off nothing is measured at all. - It is worked out every
Config.Signal.Tickseconds, five by default. It is a distance check against a short list, and it is nothing anybody needs to the second. Config.Signal.Telldecides whether the phone says a word when the bars run out and when they come back. Both are on: losing signal needs a reason, and getting it back is the moment everything waiting arrives.