Difference between revisions of "API UnitIsPlayer"

From Wowpedia
Jump to: navigation, search
 
Line 1: Line 1:
  +
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
UnitIsPlayer(UnitId)
 
   
 
UnitIsPlayer(UnitId)
Determines if the unit is a player and returns true if the unit is.
 
  +
 
Determines if the unit is a player.
  +
----
  +
;''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 18:30, 10 April 2006


UnitIsPlayer(UnitId)

Determines if the unit is a player.


Arguments
UnitId

Returns
True/False

Example
if (UnitIsPlayer(UnitId)) then
   --Do something here
elseif (UnitIsPlayer(UnitId) ~= nil) then
   --Do something here
end

Template:WoW API