onPlayerLogout | Multi Theft Auto: Wiki Skip to content

onPlayerLogout

Client-side
Server-side
Shared

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

element: The source of this event is the player that logged out.

Canceling

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

Code Examples

server

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