OnClientLogout: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
 
m (Changed "DeprecatedWithAlt" template to "Deprecated")
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
__NOTOC__
{{Server event}}
{{Deprecated|onPlayerLogout|}}


__NOTOC__
This event is triggered when a user logs out of their account in-game.
This event is blahblah and is used for blahblah.


==Syntax==  
==Parameters==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
void onClientLogin ( account previous_account, account current_account )
account thePreviousAccount, account theCurrentAccount
</syntaxhighlight>  
</syntaxhighlight>  
*'''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 [[event system#Event source|source]] of this event is the client [[element]] that logged out. For example a player.


==Example==  
==Example==  
This example does...
This example displays a message if the client logs out.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
function loggedOut()
blabhalbalhb --abababa
outputChatBox( "You have successfully logged out!", source )
--This line does this...
end
mooo
addEventHandler("onClientLogout",getRootElement(),loggedOut)
</syntaxhighlight>
</syntaxhighlight>
{{See also/Server event|Client events}}

Latest revision as of 16:21, 13 February 2015

Emblem-important.png This event is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use onPlayerLogout instead.


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 loggedOut()
	outputChatBox( "You have successfully logged out!", source )
end
addEventHandler("onClientLogout",getRootElement(),loggedOut)

See Also

Client events


Event functions