<?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=Bosss</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=Bosss"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Bosss"/>
	<updated>2026-05-18T13:15:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=11897</id>
		<title>BindKey</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=11897"/>
		<updated>2007-09-10T13:58:41Z</updated>

		<summary type="html">&lt;p&gt;Bosss: /* 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, which will be called when the key is pressed. Keys that are bound to actual keyboard keys are displayed and can be modified by the user from the settings window.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &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;
&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 ( source, key, keyState, [ var arguments, ... ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:The values passed to this function are:&lt;br /&gt;
:*'''source:''' 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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bindKey ( string key, string keyState, string bindName, 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;
*'''bindName:''' The name for this key bind when it appears in the client's settings dialog.&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 ( key, 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;
===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.&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 ( source, 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 ( getClientName ( source ) .. &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 ( source )&lt;br /&gt;
  bindKey ( source, &amp;quot;F1&amp;quot;, &amp;quot;down&amp;quot;, funcInput )   -- bind the player's F1 down key&lt;br /&gt;
  bindKey ( source, &amp;quot;F1&amp;quot;, &amp;quot;up&amp;quot;, funcInput )     -- bind the player's F1 up key&lt;br /&gt;
  bindKey ( source, &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;false&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 ( source )&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;
==See Also==&lt;br /&gt;
{{Input functions}}&lt;/div&gt;</summary>
		<author><name>Bosss</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsRadarAreaFlashing&amp;diff=11609</id>
		<title>IsRadarAreaFlashing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsRadarAreaFlashing&amp;diff=11609"/>
		<updated>2007-08-30T05:33:17Z</updated>

		<summary type="html">&lt;p&gt;Bosss: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows detection of whether a radar area is flashing 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 isRadarAreaFlashing ( radararea theRadararea )               &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theRadararea:''' The radar area you wish to check the state of flashing&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the radar area is flashing, ''false'' if it is not or if it doesn't exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example checks whether the radar area in the variable ''glenpark'' is flashing, and announces it if it is.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkArea(sourcePlayer)&lt;br /&gt;
    if ( isRadarAreaFlashing ( glenpark ) ) then          -- if the radar area in the variable glenpark is flashing&lt;br /&gt;
        outputChatBox ( &amp;quot;Glen Park is under attack!!!&amp;quot; )  -- announce it&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkArea&amp;quot;, checkArea)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area functions}}&lt;/div&gt;</summary>
		<author><name>Bosss</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PreloadMissionAudio&amp;diff=8978</id>
		<title>PreloadMissionAudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PreloadMissionAudio&amp;diff=8978"/>
		<updated>2007-07-07T18:10:00Z</updated>

		<summary type="html">&lt;p&gt;Bosss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function preloads a game sound into a specific sound slot. The sound can then be played with [[PlayMissionAudio]].&lt;br /&gt;
&lt;br /&gt;
==Usage== &lt;br /&gt;
Both server-side and client-side. &amp;quot;thePlayer&amp;quot; argument isn't used in client-side version of this function.&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 preloadMissionAudio ( player thePlayer, int sound, int slot )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer''': the [[player]] you want to play the sound for.&lt;br /&gt;
*'''sound''': the [[int]] sound id to play (interpreted as unsigned short). Valid values are those from the '''data/AudioEvents.txt''' file.&lt;br /&gt;
*'''slot''': [[int]] sound slot in which you preloaded the sound.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully preloaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==  &lt;br /&gt;
See [[PlayMissionAudio]].&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Audio_functions}}&lt;/div&gt;</summary>
		<author><name>Bosss</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Projectiles&amp;diff=8974</id>
		<title>Template:Projectiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Projectiles&amp;diff=8974"/>
		<updated>2007-07-07T13:15:31Z</updated>

		<summary type="html">&lt;p&gt;Bosss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;** '''16:''' Grenade&lt;br /&gt;
** '''17:''' Tear Gas Grenade&lt;br /&gt;
** '''18:''' Molotov&lt;br /&gt;
** '''19:''' Rocket (simple)&lt;br /&gt;
** '''20:''' Rocket (heat seeking)&lt;br /&gt;
** '''21:''' Air Bomb&lt;/div&gt;</summary>
		<author><name>Bosss</name></author>
	</entry>
</feed>