RemoveBan
From Multi Theft Auto: Wiki
This function will remove a specific ban.
Syntax
Required Arguments
- theBan: The ban to be removed.
Optional Arguments
NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.
- responsibleElement: The element that is responsible for removing the ban element. This can be a player or the root (getRootElement()).
Returns
Returns true if the ban was removed succesfully, false if invalid arguments are specified.
Example
This example removes all the bans when the resource is started and outputs to everyone the players.
addEventHandler("onResourceStart",resourceRoot,function() bans = getBans() for i,d in ipairs(bans)do nick = getBanNick(d) if(removeBan(d))then outputChatBox(nick.."has been removed from ban",root) end end end)
This example removes the ban for IP 1.2.3.4
See Also
- addBan
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBans
- getBanSerial
- getBanTime
- getBanUsername
- getUnbanTime
- removeBan
FROM VERSION 1.3.1 ONWARDS