<?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=Bardokas</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=Bardokas"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Bardokas"/>
	<updated>2026-05-18T21:00:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15857</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15857"/>
		<updated>2008-02-19T13:28:35Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: In Example is resourceStart, I think must be onClientResourceStart...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will camera fade in, when resource transfere will be finished.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
resourceRoot = getResourceRootElement(getThisResource())&lt;br /&gt;
function checkTransfer()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(checkTransfer,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else &lt;br /&gt;
		fadeCamera(true)  -- TransferBox isnt active, fade in camera&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,resourceRoot,checkTransfer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerCanBeKnockedOffBike&amp;diff=15832</id>
		<title>SetPlayerCanBeKnockedOffBike</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerCanBeKnockedOffBike&amp;diff=15832"/>
		<updated>2008-02-17T12:03:01Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: Tweaked Example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function controls if you can fall of your bike.&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 setPlayerCanBeKnockedOffBike ( player thePlayer, bool canBeKnockedOffBike )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' the player whose knockoffstatus being changed&lt;br /&gt;
*'''state:''' the true or false state&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sets the canBeKnockedOff status true or false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local player = getLocalPlayer()&lt;br /&gt;
function changeCanBeKnockedOff ( command )&lt;br /&gt;
-- The player should enter /knock&lt;br /&gt;
status = canPlayerBeKnockedOffBike (player)&lt;br /&gt;
 if (status == true) then&lt;br /&gt;
  setPlayerCanBeKnockedOffBike (player, false )&lt;br /&gt;
  outputChatBox ( &amp;quot;Now you can't be knocked off your bike.&amp;quot; )&lt;br /&gt;
  else&lt;br /&gt;
  setPlayerCanBeKnockedOffBike (player, true )&lt;br /&gt;
  outputChatBox ( &amp;quot;Now you can be knocked off your bike.&amp;quot; )&lt;br /&gt;
  -- Get the player and set true or false&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;knock&amp;quot;, changeCanBeKnockedOff )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15830</id>
		<title>Talk:IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15830"/>
		<updated>2008-02-17T08:50:21Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example could be improved, avoid using getThisResource() in the event handler and use it as the element argument for addEventHandler. Faster and neater. [[User:EAi|eAi]] 18:53, 16 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Done. &lt;br /&gt;
--[[User:Bardokas|Bardokas]] 02:46, 17 February 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15829</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15829"/>
		<updated>2008-02-17T08:49:45Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: Fixed example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will camera fade in, when resource transfere will be finished.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
resourceRoot = getResourceRootElement(getThisResource())&lt;br /&gt;
function OnClientResrcStart(resourcename)&lt;br /&gt;
	CheckTransfere()&lt;br /&gt;
end&lt;br /&gt;
function CheckTransfere()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else fadeCamera(true)  -- TransferBox isnt active, fade in camera&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,resourceRoot,OnClientResrcStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15828</id>
		<title>Talk:IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15828"/>
		<updated>2008-02-17T08:46:42Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example could be improved, avoid using getThisResource() in the event handler and use it as the element argument for addEventHandler. Faster and neater. [[User:EAi|eAi]] 18:53, 16 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Done. But for me it didnt working... &lt;br /&gt;
--[[User:Bardokas|Bardokas]] 02:46, 17 February 2008 (CST)&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15827</id>
		<title>Talk:IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:IsTransferBoxActive&amp;diff=15827"/>
		<updated>2008-02-17T08:45:49Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example could be improved, avoid using getThisResource() in the event handler and use it as the element argument for addEventHandler. Faster and neater. [[User:EAi|eAi]] 18:53, 16 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
Done. But for me it didnt working...&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15826</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15826"/>
		<updated>2008-02-17T08:29:20Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: Example tweak&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will camera fade in, when resource transfere will be finished.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnClientResrcStart(resourcename)&lt;br /&gt;
	CheckTransfere()&lt;br /&gt;
end&lt;br /&gt;
function CheckTransfere()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else fadeCamera(true)  -- TransferBox isnt active, fade in camera&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,getThisResource(),OnClientResrcStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15814</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15814"/>
		<updated>2008-02-16T20:00:40Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will camera fade in, when resource transfere will be finished.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnClientResrcStart(resourcename)&lt;br /&gt;
	if(resourcename==getThisResource()) then&lt;br /&gt;
		CheckTransfere()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CheckTransfere()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else fadeCamera(true)  -- TransferBox isnt active, fade in camera&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,getRootElement(),OnClientResrcStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15813</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15813"/>
		<updated>2008-02-16T19:58:26Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnClientResrcStart(resourcename)&lt;br /&gt;
	if(resourcename==getThisResource()) then&lt;br /&gt;
		CheckTransfere()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CheckTransfere()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else fadeCamera(true)  -- TransferBox isnt active, fade in camera&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,getRootElement(),OnClientResrcStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15812</id>
		<title>IsTransferBoxActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsTransferBoxActive&amp;diff=15812"/>
		<updated>2008-02-16T19:57:50Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: Added example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the transferbox is visible or 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 isTransferBoxActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the transferbox is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnClientResrcStart(resourcename)&lt;br /&gt;
	if(resourcename==getThisResource()) then&lt;br /&gt;
		CheckTransfere()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CheckTransfere()&lt;br /&gt;
	if isTransferBoxActive() == true then&lt;br /&gt;
		setTimer(CheckTransfere,2000,1) -- Check again after 2 seconds&lt;br /&gt;
	else fadeCamera(true) end -- TransferBox isnt active, fade in camera&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;,getRootElement(),OnClientResrcStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerEvent&amp;diff=15804</id>
		<title>TriggerEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerEvent&amp;diff=15804"/>
		<updated>2008-02-16T18:59:51Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will trigger a named [[event]] on a specific [[element]] in the [[element tree]]. See [[event system]] for more information on how the event system works.&lt;br /&gt;
&lt;br /&gt;
You should avoid triggering events on the [[root element]] unless you really need to. Doing this triggers the event on every element in the element tree, which is potentially very CPU intensive. Use as specific (i.e. low down the tree) element as you can.&lt;br /&gt;
&lt;br /&gt;
You can use the value returned from this function to determine if the event was cancelled by one of the event handlers. You should determine what your response (if any) to this should be based on the event's purpose. Generally, cancelling an event should prevent any further code being run that is dependent on whatever triggered that event. For example, if you have an ''onFlagCapture'' event, cancelling it would be expected to prevent the flag being able to be captured. Similarly, if you have ''onPlayerKill'' as an event you trigger, canceling it would either be expected to prevent the player being killed from dying or at least prevent the player from getting a score for it.&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 triggerEvent ( string eventName, element baseElement, [ var argument1, ... ] )    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''eventName:''' The name of the event you wish to trigger&lt;br /&gt;
*'''baseElement:''' The element you wish to trigger the event on. See [[event system]] for information on how this works.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argument1:''' The first argument that the event handler expects should be added after the ''baseElement'' variable.&lt;br /&gt;
**''NOTE:'' This function can have more than one of these arguments specified, once for each argument the event handler is expecting.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
* Returns '''nil''' if the arguments are invalid or the event could not be found.  &lt;br /&gt;
* Returns '''true''' if the event was triggered successfully, and ''was not'' cancelled using [[cancelEvent]].&lt;br /&gt;
* Returns '''false''' if the event was triggered successfully, and ''was'' cancelled using [[cancelEvent]].&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
If you define a new custom event as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Get the root map element&lt;br /&gt;
rootElement = getRootElement ()&lt;br /&gt;
&lt;br /&gt;
-- Add a new event called onSpecialEvent&lt;br /&gt;
addEvent ( &amp;quot;onSpecialEvent&amp;quot;, true )&lt;br /&gt;
-- Define our handler function&lt;br /&gt;
function specialEventHandler ( text )&lt;br /&gt;
	outputChatBox ( text )&lt;br /&gt;
end&lt;br /&gt;
-- Add the event handler&lt;br /&gt;
addEventHandler ( &amp;quot;onSpecialEvent&amp;quot;, rootElement, specialEventHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then trigger this event later on using:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
triggerEvent ( &amp;quot;onSpecialEvent&amp;quot;, rootElement, &amp;quot;test&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerJoin&amp;diff=15802</id>
		<title>OnClientPlayerJoin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerJoin&amp;diff=15802"/>
		<updated>2008-02-16T17:28:51Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is triggered when a [[player]] joins a server. It is triggered for all players other than the local player.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
''None''&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that joined the server.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;OnClientPlayerJoin&amp;quot;, getRootElement(),onLocalPlayerJoin)&lt;br /&gt;
function onLocalPlayerJoin()&lt;br /&gt;
	outputChatBox(&amp;quot;You've joined the server!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerJoin&amp;diff=15801</id>
		<title>OnClientPlayerJoin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerJoin&amp;diff=15801"/>
		<updated>2008-02-16T17:28:40Z</updated>

		<summary type="html">&lt;p&gt;Bardokas: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is triggered when a [[player]] joins a server. It is triggered for all players other than the local player.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
''None''&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that joined the server.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;OnClientPlayerJoin&amp;quot;, getRootElement(),onLocalPlayerJoin)&lt;br /&gt;
function onLocalPlayerJoin()&lt;br /&gt;
	outputChatBox(&amp;quot;You've joined the server!&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==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Bardokas</name></author>
	</entry>
</feed>