Jump to content

How to return x, y, z from a table and create a ped.


Recommended Posts

I want to return x, y ,z from a table and then it will create a ped in a random location. this is what i have

gPedLocations = { 
  
    { 1932.1513671875, -1773.64453125, 13.3828125 }, 
    { 1937.0458984375, -1786.009765625, 13.390598297119 } 
  
} 
  
function createThePed() 
    local x, y, z =  gPedLocations[ math.random(#gPedLocations) ] 

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