WoW:API UnitInVehicle: Difference between revisions
Jump to navigation
Jump to search
(New page: {{wowapi}} Checks whether a specified unit is within an vehicle. == Arguments == ("unit") '''unit''' - the Unit to check == Returns == isTrue '''isTrue''' - return...) |
m (Move page script moved page API UnitInVehicle to API UnitInVehicle without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
== Arguments == | == Arguments == | ||
;[[UnitId|unit]] : the Unit to check | |||
== Returns == | == Returns == | ||
Line 12: | Line 10: | ||
== Example == | == Example == | ||
if UnitInVehicle("target") then | |||
SendChatMessage("My Target is in a vehicle.", "SAY"); | |||
else | |||
SendChatMessage("My Target is not in a vehicle.", "SAY"); | |||
end | |||
== Result == | |||
Says "My Target is in a vehicle." if the target is in a vehicle, "My Target is not in a vehicle." otherwise. | |||
[[Category:World of Warcraft API]] | [[Category:World of Warcraft API]] |
Latest revision as of 04:47, 15 August 2023
← WoW API < UnitInVehicle
Checks whether a specified unit is within an vehicle.
Arguments[edit]
- unit
- the Unit to check
Returns[edit]
isTrue isTrue - returns 1 if the specified unit is in a vehicle, nil otherwise.
Example[edit]
if UnitInVehicle("target") then SendChatMessage("My Target is in a vehicle.", "SAY"); else SendChatMessage("My Target is not in a vehicle.", "SAY"); end
Result[edit]
Says "My Target is in a vehicle." if the target is in a vehicle, "My Target is not in a vehicle." otherwise.