OnClientPlayerQuit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client event}}
{{Client event}}
This event is triggered when a remote player quits the game
This event is triggered when a remote player quits the game or leaves the server.


==Parameters==
==Parameters==
Line 35: Line 35:
===Client event functions===
===Client event functions===
{{Client_event_functions}}
{{Client_event_functions}}
[[Category:Incomplete]]

Revision as of 00:56, 27 January 2008

This event is triggered when a remote player quits the game or leaves the server.

Parameters

string reason
  • reason: A string representing the reason why the player quit.

Quit reason string can be: - "Unknown" - "Quit" - "Kicked" - "Banned" - "Bad Connection" - "Timed out"

Source

The source of this event is the player that quit the game.

Example

This example prints a message in server window when player leaves the server.

function onQuitGame( reason )
    print( getPlayerName( getLocalPlayer() ).." has left the server ("..reason..")" )
end
addEventHandler( "onClientPlayerQuit", getRootElement(), onQuitGame )

See Also

Client player events


Client event functions