Thread Tools Display Modes
06-25-11, 08:35 AM   #1
Seamoon
A Defias Bandit
Join Date: Jun 2011
Posts: 2
Player online

Hello
I was just wondering if there is any way to check if player is online before sending him an addon message.

Because if they're not it results into: No player named 'xyz' is currently playing. Which is kinda annoying, and I could just stop sending the message if I knew that they're off
  Reply With Quote
06-25-11, 08:50 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Code:
/who Name
should help
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
06-25-11, 08:52 AM   #3
AcidWeb
A Theradrim Guardian
 
AcidWeb's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 68
http://wowprogramming.com/docs/api/UnitIsConnected
  Reply With Quote
06-25-11, 09:55 AM   #4
Seamoon
A Defias Bandit
Join Date: Jun 2011
Posts: 2
Thank you very much

No idea why I didn't notice that before :O
  Reply With Quote
06-25-11, 01:38 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
That won't work without a valid unit token "target", "focus" or a unitname only if it's in the party / raid etc.

Your only option is with SendWho() or the clever trick Saiket is using in _Corpse with the friendlist.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Player online


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off