attachTrailerToVehicle | Multi Theft Auto: Wiki Skip to content

attachTrailerToVehicle

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function attaches a trailer type vehicle to a trailer-towing-type vehicle.

Syntax

attachTrailerToVehicle ( )

Code Examples

server

This example will create a trailer and a trailer tower, then attach them.

newvehicle = createVehicle ( 515, 0, 0, 4 ) -- create a trailer tower (roadtrain)
setTimer(
function()
trailer = createVehicle ( 435, 0, 0, 4 ) -- create a trailer
attachTrailerToVehicle ( newvehicle, trailer ) -- attach them
end, 50, 1)

See Also

Vehicle Functions