Zone User Count

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

Moderators: Lapo, Bax

Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Zone User Count

Postby Bosskafett » 18 Apr 2012, 14:21

How do you count the amount of users in a zone?

thanks,
Jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Re: Zone User Count

Postby Bosskafett » 19 Apr 2012, 16:41

Anybody??? i havent figured it yet.
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Zone User Count

Postby rjgtav » 19 Apr 2012, 22:33

Hey
Firstly, don't stress if we don't answer in the same day as you post your question ;)
Well, you have 2 ways to achieve this:

1) You can use a simple Zone Extension, and retrieve the user count by doing Zone.getUserCount(). For more information you can check the Server-Side ActionScript API Documentation.

2) You can also retrieve the Zone's info (name and user count) by using a php/asp/jsp file or by sending a simple xml message from the client to the server. This feature is called "External Zone Info", and you can find more information about it on this chapter of the docs.
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 “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 29 guests