[FREE] [STANDALONEM] Fivem-HelpWaypoints

Simple fivem script for creating helpful markers on the map in the game making gameplay easier and looking nice

local coords = vec3(2281.5424804688, 4813.0190429688, 55.574935913086 - 1.0)

while true do 
    local playercoords = GetEntityCoords(PlayerPedId())
    local dist = #(coords-playercoords)
    local metry = math.ceil(dist * 1)
    exports['shinyx-HelpWaypoints']:DrawDestination(coords, "Example", metry)
    Wait(0)
end
5 Likes

Hello, cool but the direction doesnt work

1 Like

while true do
local playercoords = GetEntityCoords(PlayerPedId())
local dist = #(coords-playercoords)
local metry = math.ceil(dist * 1)
exports[‘shinyx-HelpWaypoints’]:DrawDestination(coords, “Example”, metry)
Wait(0)
end

Now it should work

1 Like

No :frowning: i see a white rect on the side of screen, also if the coordinates is in front of me

1 Like

can you send screenshot?

1 Like

download new version

Oh now i see the texture! But for me is ever on the side of screen, i nevere see it in front of me like your screen (when im near the point)

r u sure that you put right coordinates?

Yes, I try also with more cords I had in other scripts, nothing. :face_holding_back_tears:

r u using loop?

very buggy, had to remake most of the code but other than that its nice

Mind sharing?

wdym?

Nothing

CreateThread(function()
    RequestStreamedTextureDict('texture', true) 
    while not HasStreamedTextureDictLoaded('texture') do
        Wait(0)
    end
end)

exports('DrawDestination', function(coords, label, meters)
    DrawDestination(coords, label, meters)
end)

function DrawDestination(coords, label, meters)
    coords = vector3(coords.x, coords.y, coords.z + 1)
    local success, X, Y = GetScreenCoordFromWorldCoord(coords.x, coords.y, coords.z)
    if success then
        local icon_size = 1.5
        local text_size = 0.25

        if HasStreamedTextureDictLoaded('texture') then
            DrawSprite("texture", "e-key", X, Y - 0.015, 0.018 * icon_size, 0.025 * icon_size, 0.0, 255, 255, 255, 255)
        else
            print("Error: Texture dictionary 'commonmenu' not loaded!")
        end
        SetTextCentre(true)
        SetTextScale(0.0, text_size)
        SetTextEntry("STRING")
        AddTextComponentString(label .. " | " .. meters .. "m")
        DrawText(X, Y + 0.015)
    else
        print("Warning: Coordinates cannot be converted to screen position.")
    end
end

-- Example waypoint thread
CreateThread(function()
    local coords = vec3(725.287415, -1422.674316, 31.422318 -1)

    while true do 
        local playercoords = GetEntityCoords(PlayerPedId())
        local dist = #(coords - playercoords)
        local meters = math.ceil(dist)

        exports['shinyx-HelpWaypoints']:DrawDestination(coords, "Example", meters)
        Wait(0)
    end
end)

Here u go man :slight_smile:

Quite cool, I optimized the code more and made it go along with using waypoint on map so players will have kinda like Forza style waypoint with beam and indicator, cool starting point, still needs better codding but yeah if someone knows what to do with it it’s quite cool to use.