How can I get the number of connected users?

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
HumanPoweredGames
Posts: 71
Joined: 19 Oct 2011, 16:40
Location: Alaska
Contact:

How can I get the number of connected users?

Post by HumanPoweredGames »

How can I get the number of currently connected users from within my extension?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: How can I get the number of connected users?

Post by rjgtav »

Hi,
I think the only way possible is to sum up the user count of each Zone.
You can use the getZone(zoneName) method for retrieving the Zone object corresponding to the Zone with the name specified and then use the Zone.getUserCount() method for retrieving the number of users currently logged in that Zone.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
HumanPoweredGames
Posts: 71
Joined: 19 Oct 2011, 16:40
Location: Alaska
Contact:

Re: How can I get the number of connected users?

Post by HumanPoweredGames »

That will work. Thanks!
Post Reply