Jump to content

How to make multiple markers in dimension and interior?


Zalmon

Recommended Posts

How do i make all 3 of these markers go to the specified interior/dimension? I put them in a table, and I don't want them in the same spot. Here is my current script, but the markers wont show up :(:(:(

  
posis = {{362.502,150.813,1025.78},{353.758,193.991,1019.98},{351.345,164.059,1019.98}} 
  
function setDimensions() 
    if ( getElementDimension ( posis ) == 0 ) then 
    setElementDimension (posis , 1 )   
    setElementInterior (posis , 3) 
        end 
end 
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), setDimensions  ) 
  

Link to comment

posis is a table, you are using it like a element...

posis = {{362.502, 150.813, 1025.78, 1, 3}, {353.758, 193.991, 1019.98, 1, 3}, {351.345, 164.059, 1019.98, 1, 3}} 
  
function setDimensions() 
        for i,v in pairs(posis) do 
        local marker = createMarker(v[1], v[2], v[3], "cylinder", 2, 255, 0, 0, 255) 
        setElementDimension (marker , v[4] ) 
        setElementInterior (marker , v[5]) 
        end 
end 
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), setDimensions  ) 

Try that.

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