WoW:API UnitIsAFK: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Updated to match the current API boilerplate.) |
||
Line 1: | Line 1: | ||
{{ | {{wowapi}} __NOTOC__ | ||
= | |||
Checks if a unit is AFK. | |||
isAFK = UnitIsAFK([[UnitId|unitId]]) | |||
=== Arguments === | === Arguments === | ||
:;unitId : The [[UnitId]] to check | |||
=== Returns === | === Returns === | ||
:; isAFK : [[Boolean]] - Whether the unit is AFK | |||
== Example == | == Example == | ||
afk = UnitIsAFK("player"); | |||
if afk then | |||
DEFAULT_CHAT_FRAME:AddMessage("You are AFK"); | |||
end | |||
< | <big>'''Results'''</big> | ||
If the player is AFK, it outputs "You are AFK" to the default chat window. |
Revision as of 18:39, 25 June 2007
Checks if a unit is AFK.
isAFK = UnitIsAFK(unitId)
Arguments
- unitId
- The UnitId to check
Returns
- isAFK
- Boolean - Whether the unit is AFK
Example
afk = UnitIsAFK("player"); if afk then DEFAULT_CHAT_FRAME:AddMessage("You are AFK"); end
Results
If the player is AFK, it outputs "You are AFK" to the default chat window.