No Admin Message on ban!

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

Moderators: Lapo, Bax

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

No Admin Message on ban!

Post by Ninjaoninja2 »

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!

Post by Ninjaoninja2 »

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

Re: No Admin Message on ban!

Post by Lapo »

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
Post Reply