OnClientLogout: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (See Also for server events)
Line 17: Line 17:
This example does...
This example does...
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
function logout ()
blabhalbalhb --abababa
outputChatBox( "You have succesfuly logged out!", source )
--This line does this...
end
mooo
addEventHandler("onClientLogout",getRootElement(),logout)
</syntaxhighlight>
</syntaxhighlight>
[[Category:Needs Example]]


{{See also/Server event|Client events}}
{{See also/Server event|Client events}}

Revision as of 10:50, 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 does...

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

See Also

Client events


Event functions