File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,3 +20,5 @@ nearest = nil
2020pBlip = nil
2121
2222exports (' getPostal' , function () return nearest and nearest .code or nil end )
23+ exports (' getDistance' , function () return nearest and nearest .dist or nil end )
24+ exports (' getNearest' , function () return nearest end )
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ Citizen.CreateThread(function()
2222 while postals == nil do Wait (1 ) end
2323
2424 local delay = math.max (config .updateDelay and tonumber (config .updateDelay ) or 300 , 50 )
25- if not delay or tonumber (delay ) <= 0 then
26- error (" Invalid render delay provided, it must be a number > 0 " )
25+ if not delay or tonumber (delay ) < 50 then
26+ error (" Invalid render delay provided, it must be a number > 50 " )
2727 end
2828
2929 local postals = postals
6565
6666-- text display thread
6767Citizen .CreateThread (function ()
68+ if config .text .display == false then
69+ return
70+ end
6871 local posX = config .text .posX
6972 local posY = config .text .posY
7073 local _string = " STRING"
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ config = {
33 versionCheck = true ,
44
55 text = {
6+ -- Turn on or off the text display
7+ display = true ,
68 -- The text to display on-screen for the nearest postal.
79 -- Formatted using Lua strings, http://www.lua.org/pil/20.html
810 format = ' ~y~Nearest Postal~w~: %s (~g~%.2fm~w~)' ,
@@ -44,6 +46,7 @@ config = {
4446 },
4547
4648 -- How often in milliseconds the postal code is updated on each client.
47- -- I wouldn't recommend anything lower than 50ms for performance reasons
49+ -- Default: 300
50+ -- Minimum: 50
4851 updateDelay = nil ,
4952}
You can’t perform that action at this time.
0 commit comments