No Admin Message on ban!

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

Moderators: Lapo, Bax

Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

No Admin Message on ban!

Postby Ninjaoninja2 » 27 Jul 2014, 19:48

Hello,
I have setup an in-game banning feature by selecting a user from the User List and then banning them by a button here's my button code:

Code: Select all

on (release) {
   var userId:Number = userList_lb.getSelectedItem().data;
   var dataObj:Object = {};
   dataObj.id = userId.toString();
   dataObj.msg = "You have been banned";
   dataObj.mode = "0";
   smartfox.sendXtMessage("$dmn","ban",dataObj);
}

Problem is the message doesn't appear as an Admin Message but it appears in the output so the user won't know they have been banned or kicked.
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: No Admin Message on ban!

Postby Ninjaoninja2 » 31 Jul 2014, 16:37

Solution anybody?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: No Admin Message on ban!

Postby Lapo » 02 Aug 2014, 11:11

If it appears in the "Output" then it means the message is received correctly by the client but it's probably not handling the event.
There's a specific onAdminMessage event that you need to handle:
http://www.smartfoxserver.com/docs/1x/d ... index.html
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 15 guests