AttachTrailerToVehicle

AttachTrailerToVehicle

Description:
Function AttachTrailerToVehicle attached a vehicle to another vehicle as a trailer.
This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn).


Parameters:
(trailerid, vehicleid)
int trailerid The ID of the vehicle that will be pulled.
int vehicleid The ID of the vehicle that will pull the trailer.


Return Values:
This function always returns 1, even if neither of the vehicle IDs passed are valid.


Examples:
new vehicleid = CreateVehicle(...);
new trailerid = CreateVehicle(...);
 
AttachTrailerToVehicle(trailerid, vehicleid);


Related Functions
The following functions may be useful, as they are related to this function in one way or another.