<?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=KariiiM</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=KariiiM"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/KariiiM"/>
	<updated>2026-05-23T16:42:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=47406</id>
		<title>OnPlayerVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=47406"/>
		<updated>2016-04-19T00:18:44Z</updated>

		<summary type="html">&lt;p&gt;KariiiM: /* 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 leaves a vehicle, for whatever reason.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat, player jacker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': A vehicle element representing the vehicle in which the player exited from&lt;br /&gt;
*'''seat''': An integer representing the seat in which the player was before exiting&lt;br /&gt;
*'''jacker''': A player element representing the player who jacked the driver&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 vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds a 'moto' helmet to a player when he gets on a nrg bike, and removes it when he gets off.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addHelmetOnEnter ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    addPedClothes ( source, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot;, 16 ) -- add the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), addHelmetOnEnter )&lt;br /&gt;
&lt;br /&gt;
function removeHelmetOnExit ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    removePedClothes ( source, 16 ) -- remove the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleExit&amp;quot;, getRootElement(), removeHelmetOnExit )&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>KariiiM</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OutLinedRectangle&amp;diff=47382</id>
		<title>OutLinedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OutLinedRectangle&amp;diff=47382"/>
		<updated>2016-04-16T17:21:32Z</updated>

		<summary type="html">&lt;p&gt;KariiiM: KariiiM moved page OutLinedRectangle to DxDrawOutLinedRectangle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DxDrawOutLinedRectangle]]&lt;/div&gt;</summary>
		<author><name>KariiiM</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46887</id>
		<title>RestartResource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46887"/>
		<updated>2016-03-21T16:28:24Z</updated>

		<summary type="html">&lt;p&gt;KariiiM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function restarts a running resource. Restarting will destroy all the elements that the resource has created (as stopping the resource does).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function does not restart the resource immediately. Restarts are queued up until the end of the server's frame to ensure that they occur in the correct order (and that dependent resources can start and stop correctly). The resource being restarted will have an [[onResourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidated during the restart, though of course, the resource's name will not. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool restartResource ( resource theResource [, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[resource]]:restart}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the [[resource]] you want to restart.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''persistent:''' Unused&lt;br /&gt;
*'''configs:''' Reload configs?&lt;br /&gt;
*'''maps:''' Reload maps?&lt;br /&gt;
*'''scripts:''' Reload (server) scripts?&lt;br /&gt;
*'''html:''' Reload html files (for resource web access)?&lt;br /&gt;
*'''clientConfigs:''' Reload client configs?&lt;br /&gt;
*'''clientScripts:''' Reload client scripts?&lt;br /&gt;
*'''clientFiles:''' Reload files?&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the resource was restarted, ''false'' if the restart failed, or an invalid resource was passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example 1: This function restarts all running resources.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function restartAllResources()&lt;br /&gt;
	-- we store a table of resources&lt;br /&gt;
	local allResources = getResources()&lt;br /&gt;
	-- for each one of them,&lt;br /&gt;
	for index, res in ipairs(allResources) do&lt;br /&gt;
		-- if it's running,&lt;br /&gt;
		if getResourceState(res) == &amp;quot;running&amp;quot; then&lt;br /&gt;
			-- then restart it&lt;br /&gt;
			restartResource(res)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: This example will restart the specify resource every 3600000 milliseconds (hour).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setTimer(&lt;br /&gt;
    function()  &lt;br /&gt;
	--restarting this resource every hour&lt;br /&gt;
        restartResource(getThisResource())&lt;br /&gt;
    end,&lt;br /&gt;
3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>KariiiM</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46886</id>
		<title>RestartResource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46886"/>
		<updated>2016-03-21T16:28:04Z</updated>

		<summary type="html">&lt;p&gt;KariiiM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function restarts a running resource. Restarting will destroy all the elements that the resource has created (as stopping the resource does).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function does not restart the resource immediately. Restarts are queued up until the end of the server's frame to ensure that they occur in the correct order (and that dependent resources can start and stop correctly). The resource being restarted will have an [[onResourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidated during the restart, though of course, the resource's name will not. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool restartResource ( resource theResource [, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[resource]]:restart}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the [[resource]] you want to restart.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''persistent:''' Unused&lt;br /&gt;
*'''configs:''' Reload configs?&lt;br /&gt;
*'''maps:''' Reload maps?&lt;br /&gt;
*'''scripts:''' Reload (server) scripts?&lt;br /&gt;
*'''html:''' Reload html files (for resource web access)?&lt;br /&gt;
*'''clientConfigs:''' Reload client configs?&lt;br /&gt;
*'''clientScripts:''' Reload client scripts?&lt;br /&gt;
*'''clientFiles:''' Reload files?&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the resource was restarted, ''false'' if the restart failed, or an invalid resource was passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example 1: This function restarts all running resources.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function restartAllResources()&lt;br /&gt;
	-- we store a table of resources&lt;br /&gt;
	local allResources = getResources()&lt;br /&gt;
	-- for each one of them,&lt;br /&gt;
	for index, res in ipairs(allResources) do&lt;br /&gt;
		-- if it's running,&lt;br /&gt;
		if getResourceState(res) == &amp;quot;running&amp;quot; then&lt;br /&gt;
			-- then restart it&lt;br /&gt;
			restartResource(res)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: This example will restart the specify resource every 3600000 milliseconds (hour).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setTimer(&lt;br /&gt;
    function()  &lt;br /&gt;
	--restarting this resource every hour&lt;br /&gt;
        restartResource(getThisResource())&lt;br /&gt;
    end,&lt;br /&gt;
3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Note| The function restartResource need ACL rights to work. }}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>KariiiM</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46885</id>
		<title>RestartResource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RestartResource&amp;diff=46885"/>
		<updated>2016-03-21T15:53:49Z</updated>

		<summary type="html">&lt;p&gt;KariiiM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function restarts a running resource. Restarting will destroy all the elements that the resource has created (as stopping the resource does).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function does not restart the resource immediately. Restarts are queued up until the end of the server's frame to ensure that they occur in the correct order (and that dependent resources can start and stop correctly). The resource being restarted will have an [[onResourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidated during the restart, though of course, the resource's name will not. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool restartResource ( resource theResource [, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[resource]]:restart}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the [[resource]] you want to restart.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''persistent:''' Unused&lt;br /&gt;
*'''configs:''' Reload configs?&lt;br /&gt;
*'''maps:''' Reload maps?&lt;br /&gt;
*'''scripts:''' Reload (server) scripts?&lt;br /&gt;
*'''html:''' Reload html files (for resource web access)?&lt;br /&gt;
*'''clientConfigs:''' Reload client configs?&lt;br /&gt;
*'''clientScripts:''' Reload client scripts?&lt;br /&gt;
*'''clientFiles:''' Reload files?&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the resource was restarted, ''false'' if the restart failed, or an invalid resource was passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Example 1: This function restarts all running resources.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function restartAllResources()&lt;br /&gt;
	-- we store a table of resources&lt;br /&gt;
	local allResources = getResources()&lt;br /&gt;
	-- for each one of them,&lt;br /&gt;
	for index, res in ipairs(allResources) do&lt;br /&gt;
		-- if it's running,&lt;br /&gt;
		if getResourceState(res) == &amp;quot;running&amp;quot; then&lt;br /&gt;
			-- then restart it&lt;br /&gt;
			restartResource(res)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: This example will restart the specify resource every 3600000 milliseconds (hour).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setTimer(&lt;br /&gt;
    function()  &lt;br /&gt;
	--restarting this resource every hour&lt;br /&gt;
        restartResource(getThisResource())&lt;br /&gt;
    end,&lt;br /&gt;
3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>KariiiM</name></author>
	</entry>
</feed>