removeBan
Client-side
Server-side
Shared
This function will remove a specific ban.
OOP Syntax Help! I don't understand this!
- Method:ban:remove(...)
Syntax
bool removeBan ( ban theBan, [ player responsibleElement = nil ] )Required arguments
- theBan: The ban to be removed.
Optional arguments
Note: when using optional arguments, you might need to supply all arguments before the one you wish to use.
- responsibleElement (default: nil): The element that is responsible for removing the ban element. This can be a player or the root.
Returns
Returns true if the ban was removed succesfully, false if invalid arguments are specified.
- bool: result
Code Examples
server
This example removes all the bans when the resource is started and outputs to everyone the players.
addEventHandler("onResourceStart",resourceRoot,function() local bans = getBans() for i,d in ipairs(bans) do local nick = getBanNick(d)
if (removeBan(d)) then outputChatBox(nick.." has been unbanned.",root) end endend)