Lua IsPlayer

From ArcEmu-Wiki
Jump to: navigation, search

Usage

 :IsPlayer() - No Arguments

Description

Returns true if the unit is a player, false if the unit is not.


Example

    function SomeUnit_OnEnterCombat(pUnit, Event) 
        if not pUnit:IsPlayer() then 
            pUnit:SendChatMessage(11, 0, "Yiieeeeeee! Me run!") 
        end 
    end
Personal tools