IsTrailerAttachedToVehicle

IsTrailerAttachedToVehicle

Description:
Function IsTrailerAttachedToVehicle checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any).


Parameters:
(vehicleid)
int vehicleid The ID of the vehicle to check for trailers.


Return Values:
  • 1: The vehicle has a trailer attached.
  • 0: The vehicle does not have a trailer attached.


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


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