Shopping Cart

[How-to] Integrate Nearest Postal Within Your 911 Script – Modding Tutorials

The methods I use may not be the best performance wise, if you have anything better then please feel free to let me know.

Scripts used:
Nearest Postal
Any 911 Script, I use my own therefore I can’t suggest one.

As far as I’ve tested, this doesn’t change based on the postal codes you use. This should work with any of them.

1- Install Nearest Postal and ensure it fully works on your server before doing this.
2- In the Nearest Postal folder, Open “” with an editor of your choice.
3- Add the following code around line 61 (After the thread)

exports("npostal", function()
	return postals[nearest.i].code

4- In your 911 script, add this where you define your variables.
local postal = exports.npostal:npostal();


Now to get this to actually show up, you’ll want your chat message to look something like this… DO NOT COPY THE BELOW CODE, IT IS MADE FOR MY SCRIPT. IT WILL PROBABLY BREAK YOUR SCRIPT. IT IS JUST AN EXAMPLE.

TriggerClientEvent('chatMessage', -1, '', {255,255,0}, '^*^1911 Caller: ^r' .. playername .. '^*^4 | Location: ^r' .. location .. '^*^4 | Postal: ^r' .. postal .. '^*^4 | Report: ^r' .. msg)

If you have any issues, I’ll try my best to help you out.

Leave a Reply
FiveM ESX Scripts

The best scripts and maps

Best support

Problems? We are there to help!

Wide range of products

We have a wide range of products

100% Secure Checkout

Easy and encrypted