<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scripteri</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scripteri"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Scripteri"/>
	<updated>2026-05-02T12:18:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerQuit&amp;diff=78781</id>
		<title>OnPlayerQuit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerQuit&amp;diff=78781"/>
		<updated>2024-01-24T13:11:48Z</updated>

		<summary type="html">&lt;p&gt;Scripteri: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player disconnects from the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string quitType, string reason, element responsibleElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''quitType''': How the player left. Possible values:&lt;br /&gt;
**''&amp;quot;Unknown&amp;quot;''&lt;br /&gt;
**''&amp;quot;Quit&amp;quot;''&lt;br /&gt;
**''&amp;quot;Kicked&amp;quot;''&lt;br /&gt;
**''&amp;quot;Banned&amp;quot;''&lt;br /&gt;
**''&amp;quot;Bad Connection&amp;quot;''&lt;br /&gt;
**''&amp;quot;Timed out&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
*'''reason''': If the player was kicked or banned, the reason given goes here. If the player was '''not''' kicked or banned, this will be false.&lt;br /&gt;
*'''responsibleElement''': The element that was responsible for kicking or banning the player. This is commonly another player, but can also be the console element.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that left the server.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
This event cannot be canceled.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example gets a quitting player's name and outputs that they left the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- we register quitPlayer as a handler for the event&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerQuit&amp;quot;, getRootElement(), function()&lt;br /&gt;
	function()&lt;br /&gt;
		outputChatBox(getPlayerName(source)..&amp;quot; has left the server (&amp;quot;..QuitType..&amp;quot;)&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Scripteri</name></author>
	</entry>
</feed>