how to ban/kick people
-
- Posts: 81
- Joined: 15 Aug 2010, 23:16
- Contact:
how to ban/kick people
I was wondering... Is there a way to ban people if they dont get banned by the auto ban? Or if they broke one of your rules How could i ban them?
Last edited by skybucks100 on 17 Aug 2010, 04:51, edited 1 time in total.
Best Regards,
Skybucks100
Skybucks100
With user being a 'moderator', you can manually ban a user by doing something like this:
var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"
smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user
smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user
var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"
smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user
smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user
Smartfox's forum is my daily newspaper.
-
- Posts: 81
- Joined: 15 Aug 2010, 23:16
- Contact:
BigFIsh wrote:With user being a 'moderator', you can manually ban a user by doing something like this:
var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"
smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user
smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user
Is there a way i could make a website like... www.mybanningwebsiteexample.com/bannauser.(what ever it would be)
Best Regards,
Skybucks100
Skybucks100
Re:
skybucks100 wrote:BigFIsh wrote:With user being a 'moderator', you can manually ban a user by doing something like this:
var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"
smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user
smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user
Is there a way i could make a website like... http://www.mybanningwebsiteexample.com/bannauser.(what ever it would be)
Yes, you could set your game up with a database and use PHP to ban users.
- zachofthegolden1
- Posts: 89
- Joined: 05 Sep 2011, 19:31
Re: how to ban/kick people
When banning a user for example on my game i have 2 ways of banning. One of them is a function in my main extension set to kick the user and set active to 0 in the database so on login if active = 0 show permenant ban message. Or you could use the one that is part of smartfox mentioned above for tempory bans etc.
-ZG1
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 64 guests