<?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=TinneS</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=TinneS"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/TinneS"/>
	<updated>2026-04-29T01:47:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30110</id>
		<title>OnClientProjectileCreation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30110"/>
		<updated>2012-04-27T14:02:40Z</updated>

		<summary type="html">&lt;p&gt;TinneS: /* 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 [[projectile]] is created.&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 creator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[projectile]] that was created.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This will output a chatbox message when someone creates a projectile.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function projectileCreation()&lt;br /&gt;
	outputChatBox(&amp;quot;A projectile was created!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), projectileCreation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will punish a player for throwing a teargas grenade. When he throws it he keeps getting warped to the location where the teargas got created, and also the teargas keeps getting warped to it. This will result in  +/-60hp loss for the creator.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function punishSatchelUsersz ( creator )&lt;br /&gt;
local zeType = getProjectileType( source )&lt;br /&gt;
if zeType == 17 then&lt;br /&gt;
local zePlayerName = getPlayerName ( creator )&lt;br /&gt;
outputChatBox ( zePlayerName..&amp;quot; is a noob teargas user! But he got punished for it don't worry.&amp;quot; )&lt;br /&gt;
local x, y, z = getElementPosition ( source ) --Getting the position from the projectile creator&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, source, x, y, z-0.5 )&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, creator, x, y, z-0.5 )&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), punishSatchelUsersz )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client projectile events===&lt;br /&gt;
{{Client_projectile_events}}&lt;/div&gt;</summary>
		<author><name>TinneS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30109</id>
		<title>OnClientProjectileCreation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30109"/>
		<updated>2012-04-27T14:02:15Z</updated>

		<summary type="html">&lt;p&gt;TinneS: /* 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 [[projectile]] is created.&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 creator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[projectile]] that was created.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function projectileCreation()&lt;br /&gt;
	outputChatBox(&amp;quot;A projectile was created!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), projectileCreation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will punish a player for throwing a teargas grenade. When he throws it he keeps getting warped to the location where the teargas got created, and also the teargas keeps getting warped to it. This will result in  +/-60hp loss for the creator.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function punishSatchelUsersz ( creator )&lt;br /&gt;
local zeType = getProjectileType( source )&lt;br /&gt;
if zeType == 17 then&lt;br /&gt;
local zePlayerName = getPlayerName ( creator )&lt;br /&gt;
outputChatBox ( zePlayerName..&amp;quot; is a noob teargas user! But he got punished for it don't worry.&amp;quot; )&lt;br /&gt;
local x, y, z = getElementPosition ( source ) --Getting the position from the projectile creator&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, source, x, y, z-0.5 )&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, creator, x, y, z-0.5 )&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), punishSatchelUsersz )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client projectile events===&lt;br /&gt;
{{Client_projectile_events}}&lt;/div&gt;</summary>
		<author><name>TinneS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30108</id>
		<title>OnClientProjectileCreation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientProjectileCreation&amp;diff=30108"/>
		<updated>2012-04-27T14:00:48Z</updated>

		<summary type="html">&lt;p&gt;TinneS: /* 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 [[projectile]] is created.&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 creator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[projectile]] that was created.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function projectileCreation()&lt;br /&gt;
	outputChatBox(&amp;quot;A projectile was created!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), projectileCreation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function punishSatchelUsersz ( creator )&lt;br /&gt;
local zeType = getProjectileType( source )&lt;br /&gt;
if zeType == 17 then&lt;br /&gt;
local zePlayerName = getPlayerName ( creator )&lt;br /&gt;
outputChatBox ( zePlayerName..&amp;quot; is a noob teargas user! But he got punished for it don't worry.&amp;quot; )&lt;br /&gt;
local x, y, z = getElementPosition ( source ) --Getting the position from the projectile creator&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, source, x, y, z-0.5 )&lt;br /&gt;
setTimer ( setElementPosition, 50, 250, creator, x, y, z-0.5 )&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(), punishSatchelUsersz )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client projectile events===&lt;br /&gt;
{{Client_projectile_events}}&lt;/div&gt;</summary>
		<author><name>TinneS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnSettingChange&amp;diff=30107</id>
		<title>OnSettingChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnSettingChange&amp;diff=30107"/>
		<updated>2012-04-27T13:17:30Z</updated>

		<summary type="html">&lt;p&gt;TinneS: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when resource setting has been changed. For instance, this event would trigger if you would edit the settings of the Race resource through the Admin panel.&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 setting, string oldValue, string newValue&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''setting''': The setting which was changed. For instance: &amp;quot;*race.ghostmode&amp;quot;&lt;br /&gt;
*'''oldValue''': The previous value. Please note that this value is in [[JSON]]. To get a normal Lua value, use [[fromJSON]]&lt;br /&gt;
*'''newValue''': The new value. Also in [[JSON]]&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makeSettingsChangesVisible ( setting, oldValue, newValue )&lt;br /&gt;
whatItWas = fromJSON ( oldValue )&lt;br /&gt;
whatItsNow = fromJSON ( newValue )&lt;br /&gt;
outputDebugString ( &amp;quot;The setting &amp;quot;..setting..&amp;quot; was &amp;quot;..whatItWas..&amp;quot; and has been changed to &amp;quot;..whatItsNow..&amp;quot;.&amp;quot; ) --Making the setting change visible in debug (use /debugscript [number] to see it)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onSettingChange&amp;quot;, getRootElement(), makeSettingsChangesVisible ) --adding the event&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Server events}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs_Example]]&lt;/div&gt;</summary>
		<author><name>TinneS</name></author>
	</entry>
</feed>