Get online players

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

amarkovits
Posts: 7
Joined: 08 Dec 2010, 07:44

Get online players

Postby amarkovits » 26 Nov 2012, 21:24

Is there a method to get the number of online users in my current zone?

Andrei
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Get online players

Postby rjgtav » 26 Nov 2012, 23:47

Hi,

The client doesn't have access to those values. You have to get it from the server-side.
The most efficient ways are to run a timer, at a fixed rate, on the server-side which updates a database or a file on the webserver with the zones' userCount, or to use a servlet approach.
You should check this topic, where this question is discussed.
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.

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 4 guests