FiveM Postal Map: Build Your Own with a /gps Command
You will end up with a postal map resource for your server: codes printed on the map, a /gps command that sets a waypoint, and an export your other scripts can call.
A FiveM postal map prints a number on every part of the map, so a player can say "I'm at postal 2003" and police, EMS or dispatch know where to go. This guide shows how to build your own postal map instead of downloading a fixed pack: pick a postal set or import your own, choose the map style and the look of the codes, and export it all as one resource.
You'll use the Minimap Live Editor, which needs a Discord sign-in. Postal codes and the in-game script are on the free plan, which gives one minimap export per day.
What a FiveM postal map is
A postal map has two parts that must match:
- The codes printed on the map, so players can read them on the radar and the pause map.
- The postal data: every code with its X and Y world coordinates. Scripts use it for a waypoint command, a "nearest postal" line on the HUD or a dispatch system.
If the printed codes and the data come from different sets, call-outs point to the wrong place. A resource built in the editor ships both from the same set.
Download a postal map or build your own
Ready-made postal maps are quick to install, but the map style, the resolution and the numbering are fixed, and the popular downloads are reposts of a few older releases. When you build your own, you pick:
- the base style: Color, Original, Past Gen, Satellite, Real Map or Real Map Dawn;
- the postal set, or your own codes;
- the look of the codes;
- extras on the same map, such as gang zones, labels or street names;
- the name of the chat command.
If you already like a minimap that has no postal codes, import its six tiles (PC Legacy .ytd files or images) as the base and add only the postal layer.

FiveM postal codes: the three built-in sets
The editor ships three postal sets. These numbers come from the sets' own data:
| Set | Codes | Numbers used | Typical gap between codes | Share in the bottom row of map tiles |
|---|---|---|---|---|
| New | 1,687 | 1000 to 10140 (4 and 5 digits) | about 56 m | 49% |
| OCRP | 865 | 10 to 3031 (2 to 4 digits) | about 84 m | 40% |
| Oulsen | 945 | 1 to 946 (893 is unused) | about 137 m | 28% |
The typical gap is the median distance from a code to its nearest neighbor, so it shows how precise a call-out is. New is the densest: about half of its codes sit in the bottom row of map tiles, which holds Downtown, the airport, the port and East Los Santos. Oulsen spreads its codes more evenly, with more of them in the countryside.
Numbers don't carry over between sets. Postal 2003 exists in New and in OCRP, but about 3,100 m apart, and Oulsen stops at 946. If your community already uses one numbering, keep it.
Import your own postals JSON
Click "+ Import" next to "Postal set" and drop a .json file of up to 8 MB. Give the set a name, or it takes the file name. The file must be one JSON object: each key is a postal code, and each value holds numeric x and y world coordinates. These are the first three codes of the New set:
{
"1000": { "x": 1644.12, "y": 6456.06 },
"1001": { "x": 1538.35, "y": 6344.64 },
"1002": { "x": 1579.37, "y": 6591.44 }
}
- Entries without numeric
xandyare skipped, and other fields are ignored. - A JSON list doesn't work as you'd expect. The importer reads keys, so the entries of an array get numbered 0, 1, 2 and so on, and their own code fields are lost. Turn a list into an object keyed by code first.
- A custom set saves with the project. Right-click its chip to remove it.
- In the exported
postals.json, codes are cut to 16 characters and coordinates are rounded to 2 decimals. The editor uploads the whole set in one form field of at most 1 MB, so a huge set (around 20,000 codes with long decimals) can make the export fail. Round the coordinates to 2 decimals before you import a set that big.
How to make a custom postal map for FiveM
- Open the Minimap Live Editor, sign in with Discord, type a project name, pick a base map and click "Create project". The name becomes the resource folder, so choose it with care: "My RP map" becomes
my-rp-map. - Click Postals in the left toolbar and turn on "Show postal codes". The codes appear as one locked layer called "Postal Codes".
- Under "Postal set", keep New (selected first) or pick OCRP or Oulsen, or click "+ Import" for your own file.
- Style the codes (see the next section).
- Check the In-Game Script card at the top of the panel. Its switch is on by default, and the card then reads "Bundled in your export". Click its cog (Script settings) to rename the chat command.
- Add anything else you want on the same map, such as gang zones or street names. The custom FiveM minimap tutorial covers every tool.
- Click Export, choose a resolution (1K or 2K on the free plan, 3K or 4K for Supporters) and download the zip.
Pick a base map and a postal set, style the codes and export a resource with the /gps script.
Style the postal codes
| Control | Range | Default |
|---|---|---|
| Color | Any color, with transparency | White |
| Font | Built-in fonts, or one you upload | Outfit |
| Size | 1 to 20 | 5 |
| Outline color and width | Width 0 to 8 | Black, 1 |
| Shadow color, blur and offset | Blur 0 to 20, offset 0 to 12 | Black, 3, 1 |
| Opacity | 5% to 100% | 100% |
Codes are drawn in bold, centered on their coordinates. Size is measured on the editor's 2048 × 3072 canvas, and the export scales the whole map with the resolution. A size 5 code uses a 5-pixel font in a 1K tile, 10 pixels at 2K, 15 at 3K and 20 at 4K. In dense parts of the city, codes can overlap, so lower the Size or use a sparser set.
- Per-code overrides: type a code under "Per-code overrides" and click Add to give that one code its own color, size, font or text. The Text field changes only what is printed:
/gpsandGetPostalCoordsstill use the real code. - Filters: a filter with Tiles scope recolors the map under the codes. A Whole map filter recolors the codes too.
- Layer order: the Postal Codes layer sits just above the base map, under street names and your own drawings.
- Script without printed codes: hide the Postal Codes layer with its eye icon in the Layers panel. Hidden layers aren't exported, but the script still is.
The postal script: /gps and GetPostalCoords
The README.txt in the export doesn't describe the postal script yet, so here is how it works. With the script on, the zip gets two extra files, postal.lua and postals.json, and fxmanifest.lua ends with these lines:
shared_script 'postal.lua'
files {
'postals.json'
}
postals.json holds the set you picked, in the import format shown above, on one line. postal.lua loads it when the resource starts and adds a chat command and an export. For what the other manifest lines do, see fxmanifest.lua explained.
The chat command
A player types /gps 2003. The script sets a waypoint on that postal and answers in chat: "Waypoint set to postal 2003". Without a number it replies "Usage: /gps <postal>", and a code that isn't in the set gets "Unknown postal: 99999".
You can rename the command in Script settings: up to 24 characters, using lowercase letters, numbers, - and _. If another resource already registers the same command, for example an older postal script, pick another name or remove that script. The chat replies use the chat:addMessage event, so they need the standard chat resource or one that handles that event. The waypoint is set either way.
The GetPostalCoords export
Any other resource can look up a postal, by number or by string. It gets a vector3 back, or nil for an unknown code. Use the resource folder name in the call:
-- client script in another resource
local coords = exports['my-rp-map']:GetPostalCoords('2003')
if coords then
SetNewWaypoint(coords.x, coords.y)
end
The same call works from JavaScript (exports['my-rp-map'].GetPostalCoords('2003')) and C# (Exports["my-rp-map"].GetPostalCoords("2003")). Because postal.lua is a shared script, the export works in server scripts too. The Z value is always 0.0, since the data stores no height: use the result for waypoints, blips and 2D distance checks, not to teleport a player.
Show the nearest postal
The export has no "nearest postal" function, but postals.json is listed under files, so your own client script can read it. This example prints the postal closest to the player:
-- client.lua in your own resource
-- add dependency 'my-rp-map' to that resource's fxmanifest.lua
local raw = LoadResourceFile('my-rp-map', 'postals.json')
local postals = raw and json.decode(raw) or {}
local function nearestPostal()
local pos = GetEntityCoords(PlayerPedId())
local bestCode, bestDist
for code, p in pairs(postals) do
local dist = #(vector2(pos.x, pos.y) - vector2(p.x, p.y))
if not bestDist or dist < bestDist then
bestCode, bestDist = code, dist
end
end
return bestCode, bestDist
end
RegisterCommand('nearestpostal', function()
local code, dist = nearestPostal()
if code then
print(('Nearest postal: %s (%.0f m)'):format(code, dist))
end
end, false)
To show it on your HUD, call nearestPostal() about once a second rather than every frame.
Install and test the postal map
- Copy the
my-rp-mapfolder from the zip into your server'sresources/folder. - Add
ensure my-rp-maptoserver.cfg, restart the server and join. - Type
/gpswith a code from your set, for example/gps 2003for New or OCRP, or/gps 500for Oulsen. A waypoint should appear. - Open the pause map and check that the codes are easy to read at the zoom levels your players use.
Postals and Cayo Perico
Postal codes work on the main map only. The editor doesn't draw postals on the Cayo Perico view, and none of the three built-in sets has a code on the island. The southernmost code in any set sits near Y -3,518, while the island's map is centered near X 4700, Y -5145. Every export still includes the Cayo Perico map itself, without codes, and Supporters can restyle the island in the Cayo Perico editor (beta).
Troubleshooting the postal map
| Problem | Likely cause | Fix |
|---|---|---|
/gps does nothing | postal.lua isn't in the folder: "Show postal codes" or the script toggle was off at export | Turn both on and export again. |
Console shows postals.json not found | The file was moved or deleted | Put it back next to fxmanifest.lua and keep the files line. |
Console shows failed to parse postals.json | The file was edited and is no longer valid JSON | Fix the JSON, or export again. |
| "Unknown postal" | That code isn't in the set you exported | Check the number: New, OCRP and Oulsen use different codes. |
| Waypoint works, but no chat reply | Your chat resource doesn't handle chat:addMessage | Use the standard chat resource, or change the messages in postal.lua. |
exports['my-rp-map'] fails in another script | Wrong resource name, or the map resource isn't started yet | Use the folder name, and start the map resource before the scripts that call it. |
| Codes overlap or are hard to read | Size too large for a dense set, or a low export resolution | Lower the Size, try a sparser set, or export at 2K or higher. |
| Old postal codes still show on the map | Your previous postal map resource still streams its own tiles | Remove it from server.cfg, so only one map resource runs. |
Frequently asked questions
Which postal set should I use for FiveM?
Keep the numbering your players and dispatch already know, because codes do not carry over between sets. On a new server, New gives the most precise call-outs in the city, and Oulsen has the shortest numbers (1 to 946).
Can I use my own postal codes on a FiveM map?
Yes. Import a JSON file (8 MB at most) that maps each code to its GTA world x and y, like { "100": { "x": 0, "y": 0 } }. The editor prints that set on the map and bundles the same set with the /gps script.
Is there a FiveM postal map with Cayo Perico?
Not from this editor. It places postals on the main map only, and the New, OCRP and Oulsen sets all stop well north of the island. The exported resource does include the Cayo Perico map, just without codes.
How do I show the nearest postal in FiveM?
The export does not draw it on the HUD, so you need a small client script. It can load the bundled postals.json with LoadResourceFile, find the code closest to the player and update about once a second.
Is the postal map free to make?
Yes. The free plan lets you export one minimap a day at 1K or 2K after a Discord sign-in, with the postal codes and the /gps script included. Supporter ($15/month) adds unlimited exports and 3K or 4K.
Try the Minimap Live Editor
Design your GTA V minimap live in the browser. Add gang zones, labels, images and custom tints, then export a drop-in FiveM resource in one click. Free every day, unlimited for Supporters.
Open the Minimap Live Editor