OnPlayerLogout: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
==Source==
==Source==
The [[event system#Event source|source]] of this event is the player that logged out.
The [[event system#Event source|source]] of this event is the player that logged out.
==Cancel effect==
If you cancel this event the player will not be logged out.


==Example==  
==Example==  

Revision as of 15:30, 6 August 2010

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 player that logged out.

Cancel effect

If you cancel this event the player will not be logged out.

Example

This example displays a message if the player logs out.

function loggedOut()
	outputChatBox( "You have successfully logged out!", source )
end
addEventHandler("onPlayerLogout",getRootElement(),loggedOut)

See Also

Player events


Event functions