Hey nice work. Is it possible to make it set a normal waypoint?
How do i fix this problem?
On my install, I looked in the config.lua file, adjust the PosX and PosY settings by just a bit.
Thanks, got it fixed!
I added my own postals and all of a sudden the script won’t work and it says “SCRIPT ERROR: @nearestpostal/cl.lua:8: bad argument #1 to ‘for iterator’ (table expected nil)” can someone help?
the scripting is
—@class PostalData : table<number, vec>
—@field code string
—@type table<number, PostalData>
postals = nil
Citizen.CreateThread(function()
postals = LoadResourceFile(GetCurrentResourceName(), GetResourceMetadata(GetCurrentResourceName(), ‘postal_file’))
postals = json.decode(postals)
for i, postal in ipairs(postals) do postals[i] = { vec(postal.x, postal.y), code = postal.code } end
end)
—@class NearestResult
—@field code string
—@field dist number
nearest = nil
—@class PostalBlip
—@field 1 vec
—@field p PostalData
—@field hndl number
pBlip = nil
exports(‘getPostal’, function() return nearest and nearest.code or nil end)
Hey there!
This is a great release with some nice features! However, it does not feature a system where only in a vehicle. Our server likes a nice sleek look to our on foot UI and this just clutters it! If you want to have this only show postal when in a vehicle, do this!
Find
- cl_render
Go to the bottom around line 68 you should find this thread
Citizen.CreateThread(function()
local posX = config.text.posX
local posY = config.text.posY
local _string = "STRING"
local _scale = 0.42
local _font = 4
while true do
playerPed = PlayerPedId()
inVehicle = IsPedInAnyVehicle(playerPed, false)
if inVehicle then
if nearest and not IsHudHidden() then
SetTextScale(_scale, _scale)
SetTextFont(_font)
SetTextOutline()
BeginTextCommandDisplayText(_string)
AddTextComponentSubstringPlayerName(nearestPostalText)
EndTextCommandDisplayText(posX, posY)
end
end
Citizen.Wait(0)
end
end)
Replace it with this
Citizen.CreateThread(function()
local posX = config.text.posX
local posY = config.text.posY
local _string = "STRING"
local _scale = 0.42
local _font = 4
while true do
playerPed = PlayerPedId()
inVehicle = IsPedInAnyVehicle(playerPed, false)
if inVehicle then
if nearest and not IsHudHidden() then
SetTextScale(_scale, _scale)
SetTextFont(_font)
SetTextOutline()
BeginTextCommandDisplayText(_string)
AddTextComponentSubstringPlayerName(nearestPostalText)
EndTextCommandDisplayText(posX, posY)
end
end
Citizen.Wait(0)
end
end)
how do i get mine like this?
am i missing something?? only have nearest postal mine
Hi. I was wondering if you knew where you got your map and if you could send me the link pls.
It legit wont move no matter what i set it to!
Is there a version of this that is client-side or can this one be used that way?
does this map work with badssentials are the postal codes right
Is there a way to have it only show when in the car?
Does someone have the map OCRP Area map with cayo perico ??
Is there an export where you can push a vector and return a postal?
here
hai,nice mod…
btw is possible to change “postal point” to “original way point”?
thank
Seems that have it installed. Map shows the postal codes , but not seeing street address to right of map showing up at all. Any ideals on what i am doing wrong?
hello, i dont understand. when I want to put it into my server I need a a __resource.lua or fxmanifest.lua and script files / folder. for me to add it, any idea how.
works perfects thanks!