<?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=Jasper+Wiljijwelwetenhea</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=Jasper+Wiljijwelwetenhea"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Jasper_Wiljijwelwetenhea"/>
	<updated>2026-05-23T17:00:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:SetPedAnimation&amp;diff=33139</id>
		<title>Talk:SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:SetPedAnimation&amp;diff=33139"/>
		<updated>2012-09-04T20:10:28Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: /* Lol at example 2 */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why is there only the ''one'' ped argument actually needed? An argument specyfing if it should start or cancel would be more useful imo [[User:1337MaVe|1337MaVe]] 07:32, 9 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Lol at example 2 ==&lt;br /&gt;
&lt;br /&gt;
Why would you setElementData when the camera renders client-side? This is retarded.&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetGaragePosition&amp;diff=25173</id>
		<title>GetGaragePosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetGaragePosition&amp;diff=25173"/>
		<updated>2011-01-15T16:17:24Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: Example edited&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{client function}}&lt;br /&gt;
This function outputs X, Y and Z position of given garage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getGaragePosition ( int garageID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''garageID:''' The [[Garage|garage ID]] that represents the garage door that is being checked.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three ''float''s indicating the position of the garage, ''x'', ''y'' and ''z'' respectively.&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;
This element has to create a blip at the nearest garage and removes it in 10 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getNearestGarageFromElement (element)&lt;br /&gt;
  nearestID = -1&lt;br /&gt;
  nearestDistance = 999999999999&lt;br /&gt;
  local ex,ey,ez = getElementPosition (element)&lt;br /&gt;
  for i=0,49 do&lt;br /&gt;
    local x,y,z = getGaragePosition (i)&lt;br /&gt;
    if (getDistanceBetweenPoints3D (ex,ey,ez,x,y,z) &amp;lt; nearestDistance) then&lt;br /&gt;
      nearestID = i&lt;br /&gt;
      nearestDistance = getDistanceBetweenPoints3D (ex,ey,ez,x,y,z)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  local _nearestID = nearestID&lt;br /&gt;
  nearestID = nil&lt;br /&gt;
  return _nearestID&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler (&amp;quot;findgarage&amp;quot;,&lt;br /&gt;
function(command)&lt;br /&gt;
  local garageID = getNearestGarageFromElement (getLocalPlayer())&lt;br /&gt;
  if (garageID ~= -1) then&lt;br /&gt;
    local x,y,z = getGaragePosition (garageID)&lt;br /&gt;
    local garageBlip = createBlip (x,y,z,41)&lt;br /&gt;
    setTimer (&lt;br /&gt;
      function (garageBlip)&lt;br /&gt;
        destroyElement (garageBlip)&lt;br /&gt;
      end&lt;br /&gt;
    ,10000,1,garageBlip)&lt;br /&gt;
  end&lt;br /&gt;
end)&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;
{{Client world functions}}&lt;br /&gt;
[[Category:Needs_More_Examples]]&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Dictionary&amp;diff=25031</id>
		<title>Dictionary</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Dictionary&amp;diff=25031"/>
		<updated>2011-01-09T21:09:01Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Over the years MTA's community has come across some new terms and words. They are most often used in IRC and on the forums but some are also featered in the game. What follows is an alphabetical list.&lt;br /&gt;
&amp;lt;hr /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Bitchpack (verb)&lt;br /&gt;
 Use of the lack of enter vehicle animation in MTA 0.x in order to get unlimited players into a &lt;br /&gt;
 vehicle&lt;br /&gt;
&lt;br /&gt;
* Johnline (being a ..) (noun)&lt;br /&gt;
 acting immature, using a lot of sexual related insults hoping to make you look cool/mature.&lt;br /&gt;
&lt;br /&gt;
* MAD_BOY (noun)&lt;br /&gt;
 When something is refered to as old or outdated&lt;br /&gt;
&lt;br /&gt;
* Ransom&lt;br /&gt;
 GTANet's resident bastard operator from hell&lt;br /&gt;
 The act of being cheered by JasperNL=D&lt;br /&gt;
&lt;br /&gt;
* RIFK&lt;br /&gt;
 A common typographical error of &amp;quot;rofl&amp;quot;, has also come to be known as an acronym &lt;br /&gt;
 for &amp;quot;rolling in fucking kitchens.&amp;quot; Though first pioneered in #mta by Jani, it is most&lt;br /&gt;
 frequently used by BrophY and Johnline&lt;br /&gt;
&lt;br /&gt;
* Robpol86 (verb)/(noun)&lt;br /&gt;
 -Consistent use of mushrooms in order to grow and the ability to jump incredibly high&lt;br /&gt;
 -Also a mythical creature with a mustache of supernatural size and ability&lt;br /&gt;
 -&amp;lt;s&amp;gt;Being cheered by JasperNL=D&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* YOIV&lt;br /&gt;
 -Your Opinion Is Void (aka &amp;quot;pulling a Luke&amp;quot;)&lt;br /&gt;
 -Used to discribe a situation where an admin uses his powers to force his own opinion onto &lt;br /&gt;
 a person or a group of people.&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=25030</id>
		<title>BindKey</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=25030"/>
		<updated>2011-01-09T21:08:13Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Binds a player's key to a handler function or command, which will be called when the key is pressed. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server - Syntax 1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( player thePlayer, string key, string keyState, function handlerFunction,  [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The player you wish to bind the key of.&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys and [[control names]] for a list of possible controls.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''handlerFunction:''' The function that will be triggered when the player's key is pressed. This function should have the form:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function functionName ( player keyPresser, string key, string keyState, [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:The values passed to this function are:&lt;br /&gt;
:*'''keyPresser:''' The player who pressed the key&lt;br /&gt;
:*'''key:''' The key that was pressed&lt;br /&gt;
:*'''keyState:''' The state of the key that was pressed, ''down'' if it was pressed, ''up'' if it was released.&lt;br /&gt;
:*'''arguments''' The optional arguments you specified when calling [[bindKey]] (see below).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server - Syntax 2&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This alternative syntax allows you to bind a key with a command.  This will also allow users to customize the control in their Settings menu.  Use in conjunction with [[addCommandHandler]] to add handler functions to the keybind.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( player thePlayer, string key, string keyState, string commandName, string arguments )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The player you wish to bind the key of.&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''commandName:''' The name of the command that the key should be binded to.  &lt;br /&gt;
*'''arguments''' Space delimited arguments that are entered as if one was typing the command.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client - Syntax 1&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( string key, string keyState, function handlerFunction,  [ var arguments, ... ] ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys and [[control names]] for a list of possible controls.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
&amp;lt;!--*'''bindName:''' The name for this key bind when it appears in the client's settings dialog.--&amp;gt;&lt;br /&gt;
*'''handlerFunction:''' The function that will be triggered when the player's key is pressed. This function should have the form:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function functionName ( string key, string keyState, [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:The values passed to this function are:&lt;br /&gt;
:*'''key:''' The key that was pressed&lt;br /&gt;
:*'''keyState:''' The state of the key that was pressed, ''down'' if it was pressed, ''up'' if it was released.&lt;br /&gt;
:*'''arguments''' The optional arguments you specified when calling [[bindKey]] (see below).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client - Syntax 2&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This alternative syntax allows you to bind a key with a command.  This will also allow users to customize the control in their Settings menu.  Use in conjunction with [[addCommandHandler]] to add handler functions to the keybind.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( string key, string keyState, string commandName, string arguments )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''commandName:''' The name of the command that the key should be binded to.  &lt;br /&gt;
*'''arguments''' Space delimited arguments that are entered as if one was typing the command.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''arguments:''' Any arguments you may want to pass to the function when the key is pressed by the user. Any number of arguments of  can be specified, each being passed to the designated function. You may not pass functions.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Example 1&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;
This example will bind a player's 'F1' key and 'fire' control to 1 input function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function funcInput ( player, key, keyState )&lt;br /&gt;
  local state = &amp;quot;let go of&amp;quot;&lt;br /&gt;
  if ( keyState == &amp;quot;down&amp;quot; ) then&lt;br /&gt;
    state = &amp;quot;pressed&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  outputChatBox ( getPlayerName ( player) .. &amp;quot; &amp;quot; .. state .. &amp;quot; the &amp;quot; .. key .. &amp;quot; key!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function bindTheKeys ( player, commandName )&lt;br /&gt;
  bindKey ( player, &amp;quot;F1&amp;quot;, &amp;quot;down&amp;quot;, funcInput )   -- bind the player's F1 down key&lt;br /&gt;
  bindKey ( player, &amp;quot;F1&amp;quot;, &amp;quot;up&amp;quot;, funcInput )     -- bind the player's F1 up key&lt;br /&gt;
  bindKey ( player, &amp;quot;fire&amp;quot;, &amp;quot;both&amp;quot;, funcInput ) -- bind the player's fire down and up control&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bindme&amp;quot;, bindTheKeys )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2&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;
This example will bind a player's 'F1' key and 'fire' control to 1 input function, clientside.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function funcInput ( key, keyState )&lt;br /&gt;
  local state = &amp;quot;let go of&amp;quot;&lt;br /&gt;
  if ( keyState == &amp;quot;down&amp;quot; ) then&lt;br /&gt;
    state = &amp;quot;pressed&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  outputChatBox ( &amp;quot;You &amp;quot; .. state .. &amp;quot; the &amp;quot; .. key .. &amp;quot; key!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function bindTheKeys ()&lt;br /&gt;
  bindKey ( &amp;quot;F1&amp;quot;, &amp;quot;down&amp;quot;, funcInput )   -- bind the player's F1 down key&lt;br /&gt;
  bindKey ( &amp;quot;F1&amp;quot;, &amp;quot;up&amp;quot;, funcInput )     -- bind the player's F1 up key&lt;br /&gt;
  bindKey ( &amp;quot;fire&amp;quot;, &amp;quot;both&amp;quot;, funcInput ) -- bind the player's fire down and up control&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bindme&amp;quot;, bindTheKeys )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;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;
This example says how cool &amp;lt;s&amp;gt;Robpol86&amp;lt;/s&amp;gt; Ransom is if players wants to move.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function fanFunction()&lt;br /&gt;
  bindKey (source,&amp;quot;forwards&amp;quot;,&amp;quot;down&amp;quot;,&lt;br /&gt;
    function(player,key,state)&lt;br /&gt;
      outputChatBox (getPlayerName (player) .. &amp;quot;#FFFF00 thinks Ransom is cool.&amp;quot;,getRootElement(),255,255,0,true)&lt;br /&gt;
    end&lt;br /&gt;
  )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerLogin&amp;quot;,getRootElement(),fanFunction)&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;
{{Input functions}}&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Dictionary&amp;diff=25029</id>
		<title>Dictionary</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Dictionary&amp;diff=25029"/>
		<updated>2011-01-09T20:25:36Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Over the years MTA's community has come across some new terms and words. They are most often used in IRC and on the forums but some are also featered in the game. What follows is an alphabetical list.&lt;br /&gt;
&amp;lt;hr /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Bitchpack (verb)&lt;br /&gt;
 Use of the lack of enter vehicle animation in MTA 0.x in order to get unlimited players into a &lt;br /&gt;
 vehicle&lt;br /&gt;
&lt;br /&gt;
* Johnline (being a ..) (noun)&lt;br /&gt;
 acting immature, using a lot of sexual related insults hoping to make you look cool/mature.&lt;br /&gt;
&lt;br /&gt;
* MAD_BOY (noun)&lt;br /&gt;
 When something is refered to as old or outdated&lt;br /&gt;
&lt;br /&gt;
* Ransom&lt;br /&gt;
 GTANet's resident bastard operator from hell&lt;br /&gt;
&lt;br /&gt;
* RIFK&lt;br /&gt;
 A common typographical error of &amp;quot;rofl&amp;quot;, has also come to be known as an acronym &lt;br /&gt;
 for &amp;quot;rolling in fucking kitchens.&amp;quot; Though first pioneered in #mta by Jani, it is most&lt;br /&gt;
 frequently used by BrophY and Johnline&lt;br /&gt;
&lt;br /&gt;
* Robpol86 (verb)/(noun)&lt;br /&gt;
 -Consistent use of mushrooms in order to grow and the ability to jump incredibly high&lt;br /&gt;
 -Also a mythical creature with a mustache of supernatural size and ability&lt;br /&gt;
 -Being cheered by JasperNL=D&lt;br /&gt;
&lt;br /&gt;
* YOIV&lt;br /&gt;
 -Your Opinion Is Void (aka &amp;quot;pulling a Luke&amp;quot;)&lt;br /&gt;
 -Used to discribe a situation where an admin uses his powers to force his own opinion onto &lt;br /&gt;
 a person or a group of people.&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientDebugMessage&amp;diff=25022</id>
		<title>OnClientDebugMessage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientDebugMessage&amp;diff=25022"/>
		<updated>2011-01-09T11:19:41Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when client-side debug messages (for instance errors or warnings) would appear in the debug window. This event doesn't require the debug window to be enabled to trigger, however.&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 message, int level, string file, int line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''message''': The message which was outputted in the server console, without details like file, line etc&lt;br /&gt;
*'''level''': The type of debug message which was outputted&lt;br /&gt;
**'''0:''' &amp;quot;Custom&amp;quot; message&lt;br /&gt;
**'''1:''' Error message&lt;br /&gt;
**'''2:''' Warning message&lt;br /&gt;
**'''3:''' Information message&lt;br /&gt;
*'''file''': The file from which the debug message was outputted&lt;br /&gt;
**'''Note:''' May return [[nil]] when the source could not be found&lt;br /&gt;
*'''line''': The line in file '''file''' where the debug message was outputted&lt;br /&gt;
**'''Note:''' May return [[nil]] when the source could not be found&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 (easy) example outputs the debug message in the console, so you don't need to open debugscript 3 :D&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler (&amp;quot;onClientDebugMessage&amp;quot;,getRootElement(),&lt;br /&gt;
function(message,level,file,line)&lt;br /&gt;
  outputConsole (message,getLocalPlayer())&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Other client events===&lt;br /&gt;
{{Client_other_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs_Example]]&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetGaragePosition&amp;diff=25021</id>
		<title>GetGaragePosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetGaragePosition&amp;diff=25021"/>
		<updated>2011-01-09T11:15:30Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: Example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{client function}}&lt;br /&gt;
This function outputs X, Y and Z position of given garage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getGaragePosition ( int garageID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''garageID:''' The [[Garage|garage ID]] that represents the garage door that is being checked.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three ''float''s indicating the position of the garage, ''x'', ''y'' and ''z'' respectively.&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;
This element has to create a blip at the nearest garage and removes it in 10 seconds. (untested)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getNearestGarageFromElement (element)&lt;br /&gt;
  local nearestID = -1&lt;br /&gt;
  local nearestDistance = 999999999999&lt;br /&gt;
  local ex,ey,ez = getElementPosition (element)&lt;br /&gt;
  for i=0,49 do&lt;br /&gt;
    local x,y,z = getGaragePosition (i)&lt;br /&gt;
    if (getDistanceBetweenPoints3D (ex,ey,ez,x,y,z) &amp;lt; nearestDistance) then&lt;br /&gt;
      local nearestID = i&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  return nearestID&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler (&amp;quot;findgarage&amp;quot;,&lt;br /&gt;
function(command)&lt;br /&gt;
  local garageID = getNearestGarageFromElement (getLocalPlayer())&lt;br /&gt;
  if (garageID ~= -1) then&lt;br /&gt;
    local x,y,z = getGaragePosition (garageID)&lt;br /&gt;
    local garageBlip = createBlip (x,y,z,41)&lt;br /&gt;
    setTimer (&lt;br /&gt;
      function (garageBlip)&lt;br /&gt;
        destroyElement (garageBlip)&lt;br /&gt;
      end&lt;br /&gt;
    ,10000,1,garageBlip)&lt;br /&gt;
  end&lt;br /&gt;
end)&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;
{{Client world functions}}&lt;br /&gt;
[[Category:Needs_More_Examples]]&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HasObjectPermissionTo&amp;diff=25019</id>
		<title>HasObjectPermissionTo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HasObjectPermissionTo&amp;diff=25019"/>
		<updated>2011-01-09T11:05:44Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns whether or not the given object has access to perform the given action. &lt;br /&gt;
&lt;br /&gt;
Scripts frequently wish to limit access to features to particular users. The naïve way to do this would be to check if the player who is attempting to perform an action is in a particular group (usually the Admin group). The main issue with doing this is that the Admin group is not guaranteed to exist. It also doesn't give the server admin any flexibility. He might want to allow his 'moderators' access to the function you're limiting access to, or he may want it disabled entirely. &lt;br /&gt;
&lt;br /&gt;
This is where using the ACL properly comes in, and luckily this is very easy. It all comes down to using this function. This, somewhat confusingly named function lets you check if an ACL object (a player or a resource) has a particular ACL right. In this case, we just care about players.&lt;br /&gt;
&lt;br /&gt;
So, first of all, think of a name for your 'right'. Let's say we want a private area only certain people can go in, we'll call our right accessPrivateArea. Then, all you need to do is add one 'if' statement to your code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if hasObjectPermissionTo ( player, &amp;quot;resource.YourResourceName.accessPrivateArea&amp;quot;, false ) then&lt;br /&gt;
-- Whatever you want to happen if they're allowed in&lt;br /&gt;
else&lt;br /&gt;
-- Whatever you want to happen if they aren't&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that we've named the ''right'' using ''resource.YourResourceName.accessPrivateArea'' - this is just for neatness, so that the admin knows what resource the right belongs to. It's strongly advised you follow this convention. The ''false'' argument specifies the 'defaultPermission', false indicating that if the user hasn't had the right allowed or dissallowed (i.e. the admin hasn't added it to the config), that it should default to being not allowed.&lt;br /&gt;
&lt;br /&gt;
The only downside of using this method is that the admin has to modify his config. The upsides are that the admin has much more control and your script will work for any server, however the admin has configured 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 hasObjectPermissionTo ( string / element theObject, string theAction [, bool defaultPermission = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theObject:''' The object to test if has permission to. This can be a client element (ie. a player), a resource or a string in the form &amp;quot;user.&amp;lt;name&amp;gt;&amp;quot; or &amp;quot;resource.&amp;lt;name&amp;gt;&amp;quot;.&lt;br /&gt;
*'''theAction:''' The action to test if the given object has access to. Ie. &amp;quot;function.kickPlayer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''defaultPermission:''' The default permission if none is specified in either of the groups the given object is a member of. If this is left to true, the given object will have permissions to perform the action unless the opposite is explicitly specified in the [[ACL]]. If false, the action will be denied by default unless explicitly approved by the [[Access Control List]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the given object has permission to perform the given action, ''false'' otherwise. Returns ''nil'' if the function failed because of bad arguments.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example kicks a player if the user using it has access to the kickPlayer function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Ban command&lt;br /&gt;
function onKickCommandHandler ( playerSource, commandName, playerToKick, stringReason )&lt;br /&gt;
    -- Does the calling user have permission to kick the player? Default&lt;br /&gt;
    -- to false for safety reasons. We do this so any user can't use us to&lt;br /&gt;
    -- kick players.&lt;br /&gt;
    if ( hasObjectPermissionTo ( playerSource, &amp;quot;function.kickPlayer&amp;quot;, false ) ) then&lt;br /&gt;
&lt;br /&gt;
        -- Do we have permission to kick the player? We do this so we can fail&lt;br /&gt;
        -- nicely if this resource doesn't have access to call that function.&lt;br /&gt;
        if ( hasObjectPermissionTo ( getThisResource (), &amp;quot;function.kickPlayer&amp;quot;, true ) ) then&lt;br /&gt;
            -- Kick him&lt;br /&gt;
            kickPlayer ( playerToKick, playerSource, stringReason )&lt;br /&gt;
        else&lt;br /&gt;
            -- Resource doesn't have any permissions, sorry&lt;br /&gt;
            outputChatBox ( &amp;quot;kick: The admin resource is not able to kick players. Please give this resource access to 'function.kickPlayer' in the ACL to use this function.&amp;quot;, playerSource )&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        -- User doesn't have any permissions&lt;br /&gt;
        outputChatBox ( &amp;quot;kick: You don't have permissions to use this command.&amp;quot;, playerSource )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;kick&amp;quot;, onKickCommandHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function checks if a player is admin&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function isAdmin (player)&lt;br /&gt;
  if (hasObjectPermissionTo (player,&amp;quot;command.aexec&amp;quot;,false)) then&lt;br /&gt;
    return true&lt;br /&gt;
  else&lt;br /&gt;
    return false&lt;br /&gt;
  end&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;
&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;
{{ACL_functions}}&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Element/Ped&amp;diff=25017</id>
		<title>Talk:Element/Ped</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Element/Ped&amp;diff=25017"/>
		<updated>2011-01-09T11:03:27Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Not that this is a forum but, I've been trying to use the function createPed and it keeps returning an error about a nil value.&lt;br /&gt;
If anyone has any information about this particular function please add it in here thanks.&lt;br /&gt;
&lt;br /&gt;
== createPed() is a DP3 function ==&lt;br /&gt;
&lt;br /&gt;
If you check [[CreatePed]] page, it clearly says &amp;quot;From version DP3 onwards&amp;quot;. --[[User:Ryden|Ryden]] 12:13, 19 August 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No dimension thing? --[[User:Jasper Wiljijwelwetenhea|JasperNL=D]] 11:03, 9 January 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=24998</id>
		<title>BindKey</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=24998"/>
		<updated>2011-01-08T10:58:51Z</updated>

		<summary type="html">&lt;p&gt;Jasper Wiljijwelwetenhea: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Binds a player's key to a handler function or command, which will be called when the key is pressed. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server - Syntax 1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( player thePlayer, string key, string keyState, function handlerFunction,  [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The player you wish to bind the key of.&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys and [[control names]] for a list of possible controls.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''handlerFunction:''' The function that will be triggered when the player's key is pressed. This function should have the form:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function functionName ( player keyPresser, string key, string keyState, [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:The values passed to this function are:&lt;br /&gt;
:*'''keyPresser:''' The player who pressed the key&lt;br /&gt;
:*'''key:''' The key that was pressed&lt;br /&gt;
:*'''keyState:''' The state of the key that was pressed, ''down'' if it was pressed, ''up'' if it was released.&lt;br /&gt;
:*'''arguments''' The optional arguments you specified when calling [[bindKey]] (see below).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server - Syntax 2&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This alternative syntax allows you to bind a key with a command.  This will also allow users to customize the control in their Settings menu.  Use in conjunction with [[addCommandHandler]] to add handler functions to the keybind.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( player thePlayer, string key, string keyState, string commandName, string arguments )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The player you wish to bind the key of.&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''commandName:''' The name of the command that the key should be binded to.  &lt;br /&gt;
*'''arguments''' Space delimited arguments that are entered as if one was typing the command.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client - Syntax 1&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( string key, string keyState, function handlerFunction,  [ var arguments, ... ] ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys and [[control names]] for a list of possible controls.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
&amp;lt;!--*'''bindName:''' The name for this key bind when it appears in the client's settings dialog.--&amp;gt;&lt;br /&gt;
*'''handlerFunction:''' The function that will be triggered when the player's key is pressed. This function should have the form:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function functionName ( string key, string keyState, [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:The values passed to this function are:&lt;br /&gt;
:*'''key:''' The key that was pressed&lt;br /&gt;
:*'''keyState:''' The state of the key that was pressed, ''down'' if it was pressed, ''up'' if it was released.&lt;br /&gt;
:*'''arguments''' The optional arguments you specified when calling [[bindKey]] (see below).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client - Syntax 2&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This alternative syntax allows you to bind a key with a command.  This will also allow users to customize the control in their Settings menu.  Use in conjunction with [[addCommandHandler]] to add handler functions to the keybind.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( string key, string keyState, string commandName, string arguments )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''key:''' The key or control you wish to bind to the command. See [[key names]] for a list of possible keys.&lt;br /&gt;
*'''keyState:''' A string that has one of the following values:&lt;br /&gt;
**'''&amp;quot;up&amp;quot;:''' If the bound key should trigger the function when the key is released&lt;br /&gt;
**'''&amp;quot;down&amp;quot;:''' If the bound key should trigger the function when the key is pressed&lt;br /&gt;
**'''&amp;quot;both&amp;quot;:''' If the bound key should trigger the function when the key is pressed or released&lt;br /&gt;
*'''commandName:''' The name of the command that the key should be binded to.  &lt;br /&gt;
*'''arguments''' Space delimited arguments that are entered as if one was typing the command.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''arguments:''' Any arguments you may want to pass to the function when the key is pressed by the user. Any number of arguments of  can be specified, each being passed to the designated function. You may not pass functions.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Example 1&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;
This example will bind a player's 'F1' key and 'fire' control to 1 input function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function funcInput ( player, key, keyState )&lt;br /&gt;
  local state = &amp;quot;let go of&amp;quot;&lt;br /&gt;
  if ( keyState == &amp;quot;down&amp;quot; ) then&lt;br /&gt;
    state = &amp;quot;pressed&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  outputChatBox ( getPlayerName ( player) .. &amp;quot; &amp;quot; .. state .. &amp;quot; the &amp;quot; .. key .. &amp;quot; key!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function bindTheKeys ( player, commandName )&lt;br /&gt;
  bindKey ( player, &amp;quot;F1&amp;quot;, &amp;quot;down&amp;quot;, funcInput )   -- bind the player's F1 down key&lt;br /&gt;
  bindKey ( player, &amp;quot;F1&amp;quot;, &amp;quot;up&amp;quot;, funcInput )     -- bind the player's F1 up key&lt;br /&gt;
  bindKey ( player, &amp;quot;fire&amp;quot;, &amp;quot;both&amp;quot;, funcInput ) -- bind the player's fire down and up control&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bindme&amp;quot;, bindTheKeys )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2&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;
This example will bind a player's 'F1' key and 'fire' control to 1 input function, clientside.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function funcInput ( key, keyState )&lt;br /&gt;
  local state = &amp;quot;let go of&amp;quot;&lt;br /&gt;
  if ( keyState == &amp;quot;down&amp;quot; ) then&lt;br /&gt;
    state = &amp;quot;pressed&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
  outputChatBox ( &amp;quot;You &amp;quot; .. state .. &amp;quot; the &amp;quot; .. key .. &amp;quot; key!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function bindTheKeys ()&lt;br /&gt;
  bindKey ( &amp;quot;F1&amp;quot;, &amp;quot;down&amp;quot;, funcInput )   -- bind the player's F1 down key&lt;br /&gt;
  bindKey ( &amp;quot;F1&amp;quot;, &amp;quot;up&amp;quot;, funcInput )     -- bind the player's F1 up key&lt;br /&gt;
  bindKey ( &amp;quot;fire&amp;quot;, &amp;quot;both&amp;quot;, funcInput ) -- bind the player's fire down and up control&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bindme&amp;quot;, bindTheKeys )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;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;
This example says how cool Robpol86 is if players wants to move.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function fanFunction()&lt;br /&gt;
  bindKey (source,&amp;quot;forwards&amp;quot;,&amp;quot;down&amp;quot;,&lt;br /&gt;
    function(player,key,state)&lt;br /&gt;
      outputChatBox (getPlayerName (player) .. &amp;quot;#FFFF00 thinks Robpol86 is cool.&amp;quot;,getRootElement(),255,255,0,true)&lt;br /&gt;
    end&lt;br /&gt;
  )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerLogin&amp;quot;,getRootElement(),fanFunction)&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;
{{Input functions}}&lt;/div&gt;</summary>
		<author><name>Jasper Wiljijwelwetenhea</name></author>
	</entry>
</feed>