Jump to content

Hi! Robbery Script!


FlyingSpoon

Recommended Posts

Store all locations in a table:

local markersData = { 
    { x, y, z }, 
    { x, y, z }, 
    { x, y, z } 
    -- ... 
} 

Then use math.random to choose a random marker:

local x,y,z = unpack(markersData[math.random(#markersData)]) 

I assume you want the player to travel a certain distance and prevent the same marker from appearing as the "finish line", if so you can check the distance this way:

local distance = getDistanceBetweenPoints3D( x1,y1,z1, x2,y2,z2 ) 

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...