WoW API < UnitInVehicle

Checks whether a specified unit is within an vehicle.

Arguments[edit | edit source]

the Unit to check

Returns[edit | edit source]

isTrue isTrue - returns 1 if the specified unit is in a vehicle, nil otherwise.

Example[edit | edit source]

 if UnitInVehicle("target") then
   SendChatMessage("My Target is in a vehicle.", "SAY");
   SendChatMessage("My Target is not in a vehicle.", "SAY");

Result[edit | edit source]

Says "My Target is in a vehicle." if the target is in a vehicle, "My Target is not in a vehicle." otherwise.

Community content is available under CC-BY-SA unless otherwise noted.