GetVehicleTrailer
Description:
Function GetVehicleTrailer get the ID of the trailer attached to a vehicle.
This function does not work for trains. |
Parameters:
(vehicleid)
int | vehicleid | The ID of the vehicle to get the trailer of. |
Return Values:
The vehicle ID of the trailer or 0 if no trailer is attached.
Examples:
new trailerid = GetVehicleTrailer(vehicleid); DetachTrailerFromVehicle(trailerid);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- AttachTrailerToVehicle: Attach a trailer to a vehicle.
- DetachTrailerFromVehicle: Detach a trailer from a vehicle.
- IsTrailerAttachedToVehicle: Check if a trailer is attached to a vehicle.