[Release] Nearest Postal Script

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)
4 Likes