| .. | ||
| .github/workflows | ||
| cl.lua | ||
| cl_commands.lua | ||
| cl_dev.lua | ||
| cl_render.lua | ||
| config.lua | ||
| fxmanifest.lua | ||
| LICENSE | ||
| new-postals.json | ||
| ocrp-postals.json | ||
| old-postals.json | ||
| README.md | ||
| sv.lua | ||
| version.json | ||
Nearest Postals
This script displays the nearest postal next to map, and allows you to navigate to specific postal codes with /postal
Installation
- There are 2 ways to install it, and I recommend the first
- Run the following command in a terminal
- git clone https://github.com/blockba5her/nearest-postal.git
 
- Download the code from the GitHub releases
 
- Run the following command in a terminal
- As of now, this script supports 3 postal maps. From what I have seen, these are the most popular
- new-postals.json-> New and Improved Postals
- old-postals.json-> Original Postals
- ocrp-postals.json-> OCRP Postals
 
- To setup the postal map, open the fxmanifest.luafile and change the variablepostalFileto one of the files above- NOTE: This defaults as the new-postals.jsonfile
 
- NOTE: This defaults as the 
Command
To draw a route to a certain postal, type /postal [postalName] and to remove just type /postal
It will automatically remove the route when within 100m of the destination
Updates
1.5
- Major performance improvements
- Added the refreshRateconfiguration option
- Simplified distance calculation logic
- Separated code into separate files
- Prebuild the postal list with vectors at startup
- Use FiveM Lua 5.4
1.4
- Performance Improvements
- New config options added
- Fix some tiny bugs (and leftover code)
1.3
- Improvements in selection of postal map
- Fix dev mode being on
1.2.1
- Fixes to missing postals on improved postal map
1.2
- Updates to README.md
- Version check
- Fixes for Improved Postal map
- Updates to dev API
1.1.1
- Fixed issue with blip name being set to nil, clearing the screen of all other text
1.1
- Added OCRP postals
- Added config.luafile
Development
This script provides a simple way of working on a new postal map
- In the resource fxmanifest.luafile, uncomment thecl_dev.luarequirement line
- Do refreshandrestart nearest-postalin-game
- Teleport to the first postal code in numerical order
- Type /setnext [postalCode]where postalCode is the postal that you are at
- Type /nextto insert it
- Teleport to the next postal code in numerical order
- Type /nextto insert it
- Repeat from step 6 on
If you make a mistake, you can either remove a specific postal using /remove [postalCode] or remove the last postal inserted with /rl (this will decrease the next value also)
When done with that, you can print all of the postals you just inserted into console with the /json command and then copy it from your CitizenFX.log file
Discord
Join my discord for support and more scripts
