onUnban
Client-side
Server-side
Shared
This event is triggered when a ban is removed from the server.
Parameters
ban theBan, player responsibleElement
- theBan: the ban that will be removed.
- responsibleElement: the player who removed the ban, otherwise returns nil.
Source
element: The source is always the global root element.
Canceling
If this event is canceled, the requested unban is not performed.
Code Examples
server
This example does...
root = getRootElement()
function announceUnban( theBan, responsibleElement ) if getElementType( responsibleElement ) then --Check if a player unbanned the IP/Serial outputChatBox( getPlayerName( responsibleElement ) .. " unbanned " .. ( getBanSerial(theBan) or getBanIP(theBan) ) ) --Output to the chatbox saying the player has unbanned the IP/Serial endend
addEventHandler( "onUnban", root, announceUnban ) --Adds the event handler for 'onUnban'