Lua GetPlayer

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



Syntax

pPlayer = GetPlayer(string[case sensitiv] Playername)


Returns

Player Object
(false, if player not exist)


Example

  function TimedEvent()
      local pPlayer = GetPlayer("Syke")
      if (pPlayer) then
         pPlayer:SendBroadcastMessage("Hello, Syke!")
      end
  end
 
  RegisterTimedEvent("TimedEvent", 30000, 1)   -- time in ms
Personal tools