Postal codes on a FiveM server: baked into the map, or drawn by a script?
Postal codes are how roleplay servers give players a way to say where they are. GTA V has no addresses, so the community invented a numbered grid over the map. There are two completely different ways to put that grid in front of a player, and running both at once is a mistake almost every new server makes.

#The two approaches
Neither is wrong. They answer slightly different questions: the baked grid tells a player where everything is, the script tells them where they are.
| Baked into the map | Drawn by a script | |
|---|---|---|
| What the player sees | Numbers across the whole map | One number, usually near the minimap |
| Runtime cost | None | A loop, however small |
| Works before resources load | Yes | No |
| Renumbering | Needs a re-render | Edit a config |
| Readable while driving | Only at higher zoom | Always — it is a HUD element |
| Can desync from dispatch | No | Yes, if two resources use different data |
#How a baked postal map works
The numbers are pixels in the minimap texture, rendered at the same resolution as the roads and the coastline. There is nothing to run and nothing to configure — the map has the grid on it the same way it has street names on it.
The trade-off is that the numbers scale with the map. At full radar zoom while driving they are small; on the pause map they are perfectly legible. This is why most servers that use a baked grid also run a small "nearest postal" HUD element, which is the one legitimate reason to have both.
#How a postal script works
A postal resource ships a list of coordinates with a number attached to each, finds the closest one to the player, and draws it. That is the whole idea; the differences between implementations are the size of the list and how efficiently they search it.
-- the shape of the data every postal resource uses
local postals = {
{ code = '119', x = -1037.0, y = -2737.0 },
{ code = '120', x = -900.4, y = -2600.1 },
-- ~1600 more
}The performance mistake
A naive implementation searches all 1600 entries every frame. At 60 FPS that is 96,000 distance calculations per second for a number that changes maybe twice a minute.
-- fine: recompute a few times a second, not every frame
CreateThread(function()
while true do
Wait(500)
nearest = findNearest(GetEntityCoords(PlayerPedId()))
end
end)#Which one should your server run?
- You already run a postal HUD or a dispatch that draws postals — take the no-postals map. Two sets of numbers is worse than either alone.
- You want players to be able to read the grid off the pause map — take the baked map.
- You use custom postal numbering — take the no-postals map and let your script own the numbers.
- You are starting from nothing and want the least moving parts — take the baked map. It cannot break.
#The standard grid
Nearly every server uses the same community postal set, which is why a player from one server can read numbers on another. The numbers run roughly 1 to 1500 across the island, denser in Los Santos and sparse in the north.
Renumbering to something custom is possible and almost always a bad idea: you lose the shared vocabulary, and every new player has to relearn the map.
#Making dispatch and the map agree
- 01 Find which postal data your dispatch uses
It is a Lua table or a JSON file in the dispatch resource. Note the number range and a few sample coordinates.
- 02 Compare against your HUD resource
If they are different files, they will eventually disagree. Point both at one shared file.
- 03 Decide who owns the numbers
Either the map or the script. If the map is baked, the script must match it — not the other way round.
- 04 Spot-check three locations
Pillbox, the airport and Paleto. If all three agree, the sets match.
Questions
Can I have postal codes without a script?
Do baked postal codes cost performance?
Can I change the numbers on a baked map?
Why does my server show two different postal numbers?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.