Jump to content

Problem


Recommended Posts

Hello every body, Sorry i made 2 topics for now , But however this is the last thing to do in my script

Okay i made every thing , The GUI evey thing, Its about a mission actually

Is there a way to create a table so?, I mean, The player steps in the marker, It warps him into the vehicle

A blip be created in the map, And a marker be created there

Is there a way to create a table and put in it some positions create randomly in the map?

So when the player steps in, The blip/Marker/Money requiered be created there randomly so.

I can make the Blip/Marker/Money that the vehicle have to go to this marker, All is easy

But, What should i make to make this table that creates the blip/marker in this place

Like:

createMarker(randomPosition,...) 
createBlip(randomPosition,41)  

I wanna put the positions my self so..

Sorry for making 2 topics in a row, Its just the last part of my script

Thanks for your time.

Link to comment
local positions = 
    { 
        { 0, 0, 0 }, 
        { 0, 5, 6 } 
    } 
  
function getRandomCoordinates ( ) 
    return unpack ( positions [ math.random ( #positions ) ] ) 
end 

Example:

local x, y, z = getRandomCoordinates ( ) 

Looks interesting :P

Okay gonna try that, Sorry for these 2 spam topics for you

And seriously thanks for what you did in them :)

Thanks.

EDIT:What does unpack means?

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