[Release] Nearest Postal Script

Nearest Postal

This is the nearest postal script, it shows your nearest postal below the PLD display and will also show you the distance from it. This can also draw a route from your location to a postal of your choice.

Images

Text

Text Display

Routes

Installation

  1. There are 2 ways to install it, and I recommend the first
    1. Run the following command in a terminal
      • git clone https://github.com/blockba5her/nearest-postal.git
    2. Download the code from the GitHub releases
  2. As of now, this script supports 3 postal maps. From what I have seen, these are the most popular
  3. To setup the postal map, open the fxmanifest.lua file and change the variable postalFile to one of the files above
    • NOTE: This defaults as the new-postals.json file

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 refreshRate configuration 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.lua file

Special Thanks

Special thanks to all of the recent GitHub contributors who continue to work on the script.

Bugs

  • Some scripts that delete player blips end up deleting all blips, which can cause problems with the route portion of this script.

TOS

Please do not redistribute this script on other websites without my knowledge, you are allowed to

  • Modify my script without release
  • Fork my github post and modify the script
  • Pull request with the original script for updates and improvements
39 Likes

Now that’s epic.

1 Like

Maybe add support to the OCRP map

Is the OCRP map public release? And if it is can you send it?

Yuppers, [Release] OCRP Community Releases if you add it I willlll sooo use this [Release] OCRP Community Releases

4 Likes

Will work on it

2 Likes

I love this script and its function. Awesome work!!!


For those of us who use the server side pld (note this is not the scripthook pld) use these cords in the pld scrip to raise it high enough so the postal script can be seen

in the config.lua change the default x & y to this:
x = 1.050
y = 0.975

and if your a ocd person like myself and want the postal to be aligned with the pld, use this in the pld script:
in the cl.lua change the default text to this:
DrawText(0.225, 0.963)

Should look like the below photo if done correctly.

Screenshot_1

13 Likes

10/10

2 Likes

Great! Waiting for that OCRP map version!

amazing release. how can i adjust the location of the text? thanks!

1 Like

@Digger @Dev_Rocket @XxFri3ndlyxX @CaydenFranklin

OCRP postal map is now available.

3 Likes

Will download now, thanks for the work!

This is amazing, and thank you so much for adding support for our map

4 Likes

(Update fixed problem so I am removing this report.)

I do not believe this is a problem with the script… Try restarting your game or deleting caches.xml

(Update fixed problem so I am removing this report.)

Hop on my discord and we’ll figure it out

ok dm me.

Hotfix has been published fixing @Apollo0604’s issue

1 Like

Upon running the /postal command, it errors in the console.
“Error running call reference function for resource postals: citizen:/scripting/lua/scheduler.lua403: cl.lua:89: attempt to index a nil value (field ‘format’)”
Any help?