Adding multiple markers table for delivery

Hey i’m trying to make this little script that needs multiple marker stops/steps but i can’t really find a way to do this. If any of you guys could point me in the right direction i would be thankful. So right now i have a marker that spawns a van but i need to figure out how to make it so when you are done at the marker 1 it gives you new gps to other marker and one before that is not active anymore and it keeps going till you have completed 6-7 different markers.

You could set a waypoint and then start a loop that checks if the player is near the set location. If the player is near it you could then draw the marker. You could then add another check to see if the player is standing inside the marker.

Maybe wait a couple of seconds until you set the other waypoint. And since you should be using a loop and an array to store all the coordinates you could just increment an x variable once the player has been in the marker and it should then use the next location.

Here’s a short example:

const waypoints = {
    0: {x: 82.4000015258789, y: 170.42628479003906, z: 103.70218200683594}
}

let x = 0;

// Wrap this in a loop
// If the player is near the coordinates, draw the marker..
waypoints[x].x

// If the player is standing inside the marker, wait x seconds and then increase the value
x++

You could use that x variable to read the values which you’ll then use for the DrawMarker native. And all you have to do is to increase that x value if you want to move on to another location.

1 Like

is this solved?

Not really still trying to figure it out.