CertainLimit Posted August 1, 2012 Share Posted August 1, 2012 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
Castillo Posted August 1, 2012 Share Posted August 1, 2012 local positions = { { 0, 0, 0 }, { 0, 5, 6 } } function getRandomCoordinates ( ) return unpack ( positions [ math.random ( #positions ) ] ) end Example: local x, y, z = getRandomCoordinates ( ) Link to comment
CertainLimit Posted August 1, 2012 Author Share Posted August 1, 2012 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 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
Castillo Posted August 1, 2012 Share Posted August 1, 2012 They are not spam topics, asking for help is not spam. http://www.lua.org/manual/5.1/manual.html#pdf-unpack Link to comment
CertainLimit Posted August 1, 2012 Author Share Posted August 1, 2012 They are not spam topics, asking for help is not spam.http://www.lua.org/manual/5.1/manual.html#pdf-unpack Aaah got it thanks. Solved. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now