Mod Tools

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

ImmenseTurmoil
Posts: 20
Joined: 26 Mar 2005, 17:11
Contact:

Mod Tools

Postby ImmenseTurmoil » 02 Apr 2005, 20:41

Hey. To allow moderators to kick/ban, I decided to make mod tools. The mod tools are a movie clip that is only visible if they are mods. I have a field for username and a field for reason and buttons for kick and ban. But I have one question.

Code: Select all

var dataObj:Object = {}

dataObj.id = userId.toString()
dataObj.msg = msg

smartFox.sendXtMessage("$dmn", "kick", dataObj)

Is that the code that I put on the button for kick?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Apr 2005, 07:58

That's correct!
The params are:

"$dmn" : this is the name of the admin extension, never change it
"kick": is the command you want to invoke ("ban" is also available)
dataObj: an object with the userId (as a string) and the mod message

:)
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 87 guests