Admin tool feature !

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Admin tool feature !

Postby faisal007 » 03 Feb 2017, 07:20

Hello,

Is there a way to make announcements to all players. Lets say an event is going on and we want notify all players in the game possibly a ticker animating in the game screen.

Or we have to make separate java applet (implemented smartfox server side api ) that will sync with php/database and make announcements to all players.

Or is there a better way ? or how to do it.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Admin tool feature !

Postby Lapo » 03 Feb 2017, 09:15

You can send a moderator message.
See the documentation here

You can send it to a Room, the whole Zone or a selection of Users of your choice.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Re: Admin tool feature !

Postby faisal007 » 03 Feb 2017, 14:13

Ok, so for that purpose I will need to create moderator logins as well ? and make a module for them at client side so that they can send messages ?

One more thing, is there any event going on after some time lets say a tournament after one week, and we have crone job running in php server, so how can I notify all players in zone ? can php talk to smartfox to notify all users ? or what will be the procedure ?

Thanks.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Admin tool feature !

Postby Lapo » 03 Feb 2017, 17:58

faisal007 wrote:Ok, so for that purpose I will need to create moderator logins as well ? and make a module for them at client side so that they can send messages ?

Not necessarily. If you already have a login check system, you just need to recognize those users that are defined (somewhere) as moderators. This is typically a field in the database that you can check at login time and then activate the privilege for the User in SmartFox.
More on this here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager

One more thing, is there any event going on after some time lets say a tournament after one week, and we have crone job running in php server, so how can I notify all players in zone ? can php talk to smartfox to notify all users ? or what will be the procedure ?

You can use the Task Scheduler to schedule any message/activity at any time.
http://docs2x.smartfoxserver.com/Gettin ... wtos#item7

If this needs to be triggered by the php server is going to be more tricky. The PHP will have to call a servlet running in SFS2X's webserver which in turn will trigger the message.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Re: Admin tool feature !

Postby faisal007 » 06 Feb 2017, 06:52

Alright so you mean to say that we should schedule all tasks on smartfoxserver. That way we will easily trigger messages to all users when required.
That way we will also be free from crone jobs and etc. It sounds good.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Admin tool feature !

Postby Lapo » 06 Feb 2017, 10:08

Yes, exactly :)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 100 guests