Lua GetTeam

From ArcEmu-Wiki
Jump to: navigation, search
+/-
Main Page        LuaArcEmu Website     ArcEmu Forum     Bug Tracker



Syntax

int Team = pPlayer:GetTeam()

Description

Will return a numerical value 0 or 1.
0 = Alliance
1 = Horde

Examples

function OnEnterCombat(pUnit, event, pAttacker)
  if(pAttacker:GetTeam() == 0) then
    pUnit:SendChatMessageToPlayer(14, 0, "Damn you Alliance!", pAttacker)
  else
    pUnit:SendChatMessageToPlayer(14, 0, "Damn you Horde!", pAttacker)
  end
end
Personal tools