AttachTrailerToVehicle

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:35, 23 January 2014
Smithy (Talk | contribs)

← Previous diff
Current revision
Connor Mead (Talk | contribs)

Line 27: Line 27:
[[de:AttachTrailerToVehicle]] [[de:AttachTrailerToVehicle]]
 +[[fr:AttachTrailerToVehicle]]
[[ru:AttachTrailerToVehicle]] [[ru:AttachTrailerToVehicle]]

Current revision



Description:

Attach a vehicle to another vehicle as a trailer.


Image:32px-Circle-style-warning.png

Important
Note

This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn).


Parameters:
(trailerid, vehicleid)
traileridThe ID of the vehicle that will be pulled.
vehicleidThe 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.


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.

In other languages