Skip to main content

IsTrailerAttachedToVehicle

Description

Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any).

NameDescription
vehicleidThe ID of the vehicle to check for trailers.

Returns

true - The vehicle has a trailer attached.

false - The vehicle does not have a trailer attached.

Examples

if (IsTrailerAttachedToVehicle(vehicleid))
{
printf("Vehicle %i has a trailer!", vehicleid);
}