Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
(Change return values)
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
{{wowapi}}
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
 
Checks if a specified unit is a player.
 
isTrue = UnitIsPlayer(unit)
   
 
== Arguments ==
UnitIsPlayer(UnitId)
 
  +
;unit: String - [[UnitId]] of the unit to check.
   
 
== Returns ==
Determines if the unit is a player.
 
  +
;isTrue : Boolean - true if the unit is a player, false otherwise.
----
 
;''Arguments''
 
 
:<i>[[API_TYPE_UnitId|UnitId]]</i>
 
 
----
 
;''Returns''
 
 
:<i>True/False</i>
 
 
----
 
;''Example''
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
 
if (UnitIsPlayer(UnitId)) then
 
--Do something here
 
elseif (UnitIsPlayer(UnitId) ~= nil) then
 
--Do something here
 
end
 
 
----
 
{{WoW API}}
 

Revision as of 12:07, 29 October 2014

Checks if a specified unit is a player.

isTrue = UnitIsPlayer(unit)

Arguments

unit
String - UnitId of the unit to check.

Returns

isTrue
Boolean - true if the unit is a player, false otherwise.