Jump to content

Problem z markerami


Recommended Posts

Witam, mam taki skrypt i wszystko działa ale chciałem zrobić aby pokazywały się po kolei markery a nie wszystkie na raz

Kod server-side:

local markers = { 
    {0, 0, 4}, 
    {23, 4, 4}, 
    {41, 7, 3} 
} 
  
for i, v in ipairs(markers) do 
    local marker = createMarker(unpack(markers[i])) 
    if i == #markers then 
        setMarkerIcon(marker, "finish") 
        addEventHandler("onMarkerHit", marker, function() 
            destroyElement(source) 
        end) 
    else 
        setMarkerIcon(marker, "arrow") 
        setMarkerTarget(marker, unpack(markers[i + 1])) 
        addEventHandler("onMarkerHit", marker, function() 
            destroyElement(source) 
        end) 
    end 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...