Returns whether a unit is in a vehicle. A unit can be riding in a vehicle without controlling it: to test whether a unit is controlling a vehicle, use UnitControllingVehicle or UnitHasVehicleUI.
Note: multi-passenger mounts appear as vehicles for passengers but not for the owner.
See also Vehicle functions.
Signature:
inVehicle = UnitInVehicle("unit") or UnitInVehicle("name")
Arguments:
unit- A unit to query (string, unitID)name- The name of a unit to query; only valid forplayer,pet, and party/raid members (string)
Returns:
inVehicle- 1 if the unit is in a vehicle; otherwise nil (1nil)