Jump to content

Need some advice here


tigerman

Recommended Posts

  • Moderators

Hi tigerman,

When you attach a marker on a vehicle, the marker take the position of the vehicle also if you use offsets.

So create a marker ( don't hide during the test ) which is bigger than the vehicle and attach it to the vehicle.

Try to enter in the marker and if he doesn't work, try to go on the vehicle.

Tell me if you are detected and where.

Link to comment
  • Moderators

So create a setTimer like that:

  
local marker = createMarker( x, y, z, ... ) 
setElementID( marker, "marker1" ) 
setTimer( updateThePosition, 50, 0 ) 
  
function updateThePosition() 
    local veh = ... 
    local marker = getElementByID( "marker1" ) 
    if veh then 
        local x, y, z= getElementPosition( veh ) 
        if marker then 
            setElementPosition( marker, x, y, z ) 
        end 
    end 
end 
  

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