Jump to content

Question because of Tables


Twiz.

Recommended Posts

Hello guys , ive got a Question. I have a Table with Coordinates, i tryed everything to create a Marker with the Coordinate but it wont show up can you help me, or show me how i can get the Coordinate out of there to get a Marker with it. Sorry for my Bad english, i hope you can understand / help me.

local markerTable = { 
[1]= "-1697.4000244141, -122.19999694824, 2.5999999046326", 
[2]= "-1697.4000244141, -122.19999694824, 3.5999999046326", 
[3]= "-1697.4000244141, -122.19999694824, 4.5999999046326" 
} 
  
local playerBlip = {} 
local playerMarker = {} 
  
local pVeh = { 
    [1] = "Intruder", 
    [2] = "Elegy" 
}  
  
function mark(x, y, z, source) 
local rando = math.random(1, 2)   
veh = createVehicle(getVehicleModelFromName(pVeh[rando]), -1695.1999511719, -119.59999847412, 3.4000000953674) 
local randomv = math.random(1, #markerTable) 
local kord = markerTable[randomv] 
local x, y, z = gettok(kord, 1, ','), gettok(kord, 2, ','), gettok(kord, 3, ',') 
playerBlip[source] = createBlip(x, y, z, 41, 2, 255, 0, 0, 255, 0, 9999.9, source) 
playerMarker[source] = createMarker(x, y, z-0.5, "cylinder", 2.0, 0, 0, 255, 200, source) 
addEventHandler("onMarkerHit",playerMarker[source], hit) 
end 

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