RU/onUnban: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with '__NOTOC__ {{RU/Server event}} Это событие вызывается, когда разбанивают. ==Parameters== <syntaxhighlight lang="lua"> ban theBan </syntaxhighlight> *'''theBan ''': Th…')
 
No edit summary
 
Line 1: Line 1:
{{translate}}
__NOTOC__
__NOTOC__
{{RU/Server event}}
{{RU/Server event}}

Latest revision as of 07:25, 26 June 2010

Warning.png This page requires local translation. If page will remain not translated in reasonable period of time it would be deleted.
After translating the page completely, please remove the ‎{{translate}}‎ tag from the page.


Это событие вызывается, когда разбанивают.

Parameters

ban theBan
  • theBan : The ban that will be removed.

Source

The source of this event is the element that was responsible for the unbanning. If no responsible was specified, the source is the global root element.

Cancel effect

If this event is canceled, the requested unban is not performed.

Example

This example does...

root = getRootElement()

function announceUnban( theBan )
	if getElementType( source ) then --Check if a player unbanned the IP/Serial
		outputChatBox( getPlayerName( source ) .. " unbanned " .. ( getBanSerial(theBan) or getBanIP(theBan) ) ) --Output to the chatbox saying the player has unbanned the IP/Serial
	end
end

addEventHandler( "onUnban", root, announceUnban ) --Adds the event handler for 'onUnban'

See Also

RU/Server events

Event functions