Jump to content

How do i attach vehicle to an object?


yesyesok

Recommended Posts

You need to use the AttachElements function.

Syntax:

bool attachElements ( element theElement, element theAttachToElement, [ float xPosOffset, float yPosOffset, float zPosOffset, float xRotOffset, float yRotOffset, float zRotOffset ] ) 

Example:

function attachObjects() -- Let's make a function 
    local marker = createMarker ( 0, 0, 10, "cylinder", 1.5, 255, 255, 0, 170 ) -- Creating the marker 
    local car = createVehicle(551, 0, 0, 10) -- Creating the vehicle 
     
    attachElements(marker, car) -- Now we have a marker that's attached into vehicle- 
end -- Close the function 

Link to comment

hey, I tried Alot but still i'm not able to attach vehicle to objects, I'm trying to make moving vehicle, So i decided to attach the vehicle to moving object and change the alpha of the objects, Objects are getting created but vehicles are not getting attached to it.

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