<?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=MeKorea</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=MeKorea"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/MeKorea"/>
	<updated>2026-04-30T23:23:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnChatMessage&amp;diff=27513</id>
		<title>OnChatMessage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnChatMessage&amp;diff=27513"/>
		<updated>2011-10-29T22:53:11Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{New feature|3.0120|1.2|&lt;br /&gt;
'''Available only in MTA SA 1.2 and onwards'''&lt;br /&gt;
}}&lt;br /&gt;
This event is triggered when a player uses say, teamsay, me successfully. Or when any message is output to chat using [[outputChatBox]]. It can be used to get the resource responsible for specific [[outputChatBox]] call via the second parameter.&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 theMessage, resource / element theElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theMessage:''' The text that was output to the chatbox&lt;br /&gt;
*'''theElement:''' Player element if chatbox output was done via say, teamsay or me. Resource if it was done via [[outputChatBox]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the root element.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs all chat messages to debug view.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
[lua]&lt;br /&gt;
function onChatMessageHandler(theMessage, thePlayer)&lt;br /&gt;
	outputDebugString(theMessage)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onChatMessage&amp;quot;, root, onChatMessageHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.1.1-9.03316|n/a|}}&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Server events}}&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnChatMessage&amp;diff=27512</id>
		<title>OnChatMessage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnChatMessage&amp;diff=27512"/>
		<updated>2011-10-29T22:52:09Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{New feature|3.0120|1.2|&lt;br /&gt;
'''Available only in MTA SA 1.2 and onwards'''&lt;br /&gt;
}}&lt;br /&gt;
This event is triggered when a player uses say, teamsay, me successfully. Or when any message is output to chat using [[outputChatBox]]. It can be used to get the resource responsible for specific [[outputChatBox]] call via the second parameter.&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 theMessage, resource / element theElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theMessage:''' The text that was output to the chatbox&lt;br /&gt;
*'''theElement:''' Player element if chatbox output was done via say, teamsay or me. Resource element if it was done via [[outputChatBox]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the root element.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs all chat messages to debug view.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
[lua]&lt;br /&gt;
function onChatMessageHandler(theMessage, thePlayer)&lt;br /&gt;
	outputDebugString(theMessage)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onChatMessage&amp;quot;, root, onChatMessageHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.1.1-9.03316|n/a|}}&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Server events}}&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&amp;diff=15546</id>
		<title>EngineReplaceModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&amp;diff=15546"/>
		<updated>2008-01-27T12:15:42Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment.&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 engineReplaceModel ( dff theModel, number modelID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theModel:''' The model to replace the given model ID with&lt;br /&gt;
*'''modelID:''' The model it to replace the model of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Client-Side example for replacing vehicle model and texture with custom ones.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceVehicle ( )&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; replacing the euros vehicle&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD ( &amp;quot;data/euros.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd, 587 )&lt;br /&gt;
dff = engineLoadDFF ( &amp;quot;data/euros.dff&amp;quot;, 587 )&lt;br /&gt;
engineReplaceModel ( dff, 587 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;replaceVeh&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;replaceVeh&amp;quot;, getRootElement(), ReplaceVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Server-side example function for triggering the replace.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCommand ( )&lt;br /&gt;
triggerClientEvent( &amp;quot;replaceVeh&amp;quot;, getRootElement(), replaceVeh )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;replace&amp;quot;, ReplaceCommand )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
Client-Side example for replacing object model, collision and texture with custom ones.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceObject ( )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD( &amp;quot;MyModel.txd&amp;quot; )&lt;br /&gt;
engineImportTXD( txd, 1234 )&lt;br /&gt;
dff = engineLoadDFF( &amp;quot;MyModel.dff&amp;quot;, 1234 )&lt;br /&gt;
col = engineLoadCOL( &amp;quot;MyModel.col&amp;quot; )&lt;br /&gt;
engineReplaceModel( dff, 1234 )&lt;br /&gt;
engineReplaceCOL( col, 1234 )&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;replaceObj&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;replaceObj&amp;quot;, getRootElement(), ReplaceObject )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
Server-side example function for triggering the replace.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCommand ( )&lt;br /&gt;
triggerClientEvent( &amp;quot;replaceObj&amp;quot;, getRootElement(), replaceObj )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;replace&amp;quot;, ReplaceCommand )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreModel&amp;diff=15545</id>
		<title>EngineRestoreModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreModel&amp;diff=15545"/>
		<updated>2008-01-27T11:52:17Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function restores the visual DFF model of the given model ID. This restores the result of [[engineReplaceModel]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreModel ( number modelID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''modelID:''' The model ID to restore the visuals of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the model was successfully restored, ''false'' or ''nil'' if it failed for some reason.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Client-Side example for restoring model / vehicle.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ResetModel ( )&lt;br /&gt;
engineRestoreModel ( 587 )  -- Object / Vehicle to restore to default GTA one.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;restoreClientModel&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;restoreClientModel&amp;quot;, getRootElement(), ResetModel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Server-Side example for triggering model / vehicle restore function with &amp;quot;restore&amp;quot; command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function RestoreModel ( )&lt;br /&gt;
triggerClientEvent ( &amp;quot;restoreClientModel&amp;quot;, getRootElement(), restoreClientModel )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;restore&amp;quot;, RestoreModel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
[[Category:Needs_Example]] &amp;lt;!-- leave this until the example is completed. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreCOL&amp;diff=15544</id>
		<title>EngineRestoreCOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreCOL&amp;diff=15544"/>
		<updated>2008-01-27T11:47:14Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function restores the original collision model of the given model ID. Reverses the effect of [[engineReplaceCOL]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreCOL ( number modelID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''modelID:''' The ID of the model to restore the model of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if this function succeeds, ''false'' or ''nil'' if it fails for some reason.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Client-Side example for restoring object collision with default one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function RestoreCollision ( )&lt;br /&gt;
engineRestoreCOL ( 3356 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;collisionRestore&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;collisionRestore&amp;quot;, getRootElement(), RestoreCollision )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Server-side example function for triggering the restore.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function RestoreCols ( )&lt;br /&gt;
triggerClientEvent ( &amp;quot;collisionRestore&amp;quot;, getRootElement(), collisionRestore )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;restorecol&amp;quot;, RestoreCols)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
[[Category:Needs_Example]] &amp;lt;!-- leave this until the example is completed. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceCOL&amp;diff=15543</id>
		<title>EngineReplaceCOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceCOL&amp;diff=15543"/>
		<updated>2008-01-27T11:41:42Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function replaces the collision file of the given model id to the collision file passed. Use [[engineLoadCOL]] to load the collision file first.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceCOL ( col theCol, number modelID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''theCol:''' The collision file to replace with&lt;br /&gt;
*'''modelID:''' The model ID whose collision file you want to replace&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the collision was successfully replaced, ''false'' or ''nil'' if the collision could not be replaced for a reason.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Client-Side example for replacing object collision with custom one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCollision ( )&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; Replacing Collision Data.&amp;quot; )&lt;br /&gt;
col = engineLoadCOL( &amp;quot;myColFile.col&amp;quot; )&lt;br /&gt;
engineReplaceCOL( col, 3356 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;collisionReplace&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;collisionReplace&amp;quot;, getRootElement(), ReplaceCollision )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Server-side example function for triggering the replace.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCols ( )&lt;br /&gt;
triggerClientEvent ( &amp;quot;collisionReplace&amp;quot;, getRootElement(), collisionReplace )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;replacecol&amp;quot;, ReplaceCols)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
[[Category:Needs_Example]] &amp;lt;!-- leave this until the example is completed. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>MeKorea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerTarget&amp;diff=15291</id>
		<title>OnClientPlayerTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerTarget&amp;diff=15291"/>
		<updated>2008-01-25T20:41:21Z</updated>

		<summary type="html">&lt;p&gt;MeKorea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is triggered whenever the local player targets an element.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
*'''target:''' The element the player targetted.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that targeted the element.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs the type of the target the client is aiming at&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function targetingActivated ( target )&lt;br /&gt;
	if ( target ) then&lt;br /&gt;
		outputChatBox(tostring(getElementType(target)))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerTarget&amp;quot;, getRootElement(), targetingActivated )&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>MeKorea</name></author>
	</entry>
</feed>