OnClientLogout: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 15: Line 15:


==Example==  
==Example==  
This example does...
This example displays a message if the client logs out.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function onLogOut ()
function onLogOut ()

Revision as of 10:52, 16 February 2008

This event is triggered when a user logs out of their account in-game.

Parameters

account thePreviousAccount, account theCurrentAccount
  • thePreviousAccount: The account the client was logged in as
  • theCurrentAccount: The account the client is a part of now (usually a guest account)

Source

The source of this event is the client element that logged out. For example a player.

Example

This example displays a message if the client logs out.

function onLogOut ()
	outputChatBox( "You have succesfuly logged out!", source )
end
addEventHandler("onClientLogout",getRootElement(),onLogOut)

See Also

Client events


Event functions