<?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=Et-win</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=Et-win"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Et-win"/>
	<updated>2026-04-26T12:22:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ShowChat&amp;diff=41640</id>
		<title>ShowChat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ShowChat&amp;diff=41640"/>
		<updated>2014-08-25T20:18:48Z</updated>

		<summary type="html">&lt;p&gt;Et-win: /* Example */ Added an example for MTA 1.4 and up, since 'isChatVisible' is now a function in MTA itself.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}} &lt;br /&gt;
This function is used to show or hide the player's chat.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool showChat ( bool show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''show:''' A boolean value determining whether to show (''true'') or hide (''false'') the chat.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player's chat was shown or hidden successfully, ''false'' otherwise.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool showChat ( player thePlayer, bool show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The [[player]] whose chat is to be hidden or shown.&lt;br /&gt;
*'''show:''' A boolean value determining whether to show (''true'') or hide (''false'') the chat.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player's chat was shown or hidden successfully, ''false'' otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&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 example toggle's the player's chat when they press the &amp;quot;'''i'''&amp;quot; key.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This example below is for all versions until 1.4:&lt;br /&gt;
local isChatVisible = true --Let's assume the chat is visible as soon as the resource starts.&lt;br /&gt;
&lt;br /&gt;
function chat(key, keyState)&lt;br /&gt;
    if isChatVisible then --Check or the chat is visible.&lt;br /&gt;
        showChat(false) --If it is, hide it.&lt;br /&gt;
        isChatVisible = false&lt;br /&gt;
    else&lt;br /&gt;
        showChat(true) --If it is not, show it.&lt;br /&gt;
        isChatVisible = true&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bindKey(&amp;quot;i&amp;quot;, &amp;quot;down&amp;quot;, chat) --Make a bind key to start the function as soon as a player presses the key 'i'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--This example below is for version 1.4 and up:&lt;br /&gt;
function chat(key, keyState)&lt;br /&gt;
    if isChatVisible() then --Check or the chat is visible.&lt;br /&gt;
        showChat(false) --If it is, hide it.&lt;br /&gt;
    else&lt;br /&gt;
        showChat(true) --If it is not, show it.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bindKey(&amp;quot;i&amp;quot;, &amp;quot;down&amp;quot;, chat) --Make a bind key to start the function as soon as a player presses the key 'i'&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;
{{Server functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=41368</id>
		<title>BindKey</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BindKey&amp;diff=41368"/>
		<updated>2014-08-11T14:25:30Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Added 'Returns'&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;
===Optional Arguments===&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;
===Returns===&lt;br /&gt;
Returns ''true'' if the key was bound, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|7948|bindKey using a command and control name doesn't work}}&lt;br /&gt;
}}&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; &amp;lt;s&amp;gt;Ransom&amp;lt;/s&amp;gt; &amp;lt;s&amp;gt;Aintaro&amp;lt;/s&amp;gt; ADCX 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 ADCX 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>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetChildren&amp;diff=41354</id>
		<title>XmlNodeGetChildren</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetChildren&amp;diff=41354"/>
		<updated>2014-08-11T10:57:42Z</updated>

		<summary type="html">&lt;p&gt;Et-win: /* Returns */ Added &amp;quot;If no nodes are found, it returns an empty table.&amp;quot; @ Returns&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns all children of a particular XML node, or a particular child node.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table/xmlnode xmlNodeGetChildren ( xmlnode parent, [ int index ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''parent:''' This is the [[xmlnode]] you want to retrieve one or all child nodes of. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
* '''index:''' If you only want to retrieve one particular child node, specify its (0-based) index here. For example if you only want the first node, specify 0; the fifth node has index 4, etc.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If '''index''' isn't specified, returns a table containing all child nodes. If '''index''' is specified, returns the corresponding child node if it exists. If no nodes are found, it returns an empty table. Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&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;
Suppose you have an .xml file with random welcome messages:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;messages&amp;gt;&lt;br /&gt;
    &amp;lt;message&amp;gt;Welcome to the deathmatch server, enjoy your stay.&amp;lt;/message&amp;gt;&lt;br /&gt;
    &amp;lt;message&amp;gt;Welcome. Be sure to get your free pizza at Matt's!&amp;lt;/message&amp;gt;&lt;br /&gt;
    &amp;lt;message&amp;gt;Party going on at the LS beach, be there&amp;lt;/message&amp;gt;&lt;br /&gt;
&amp;lt;/messages&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show a random message from this list to joining players, you could use the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()),&lt;br /&gt;
    function()&lt;br /&gt;
        local xml = xmlLoadFile(&amp;quot;welcome.xml&amp;quot;)             -- open the XML file&lt;br /&gt;
        local messageNodes = xmlNodeGetChildren(xml)       -- get all child nodes of the root node (&amp;lt;messages&amp;gt;)&lt;br /&gt;
        g_WelcomeMessages = {}                             -- create a new global variable to store the welcome messages&lt;br /&gt;
        for i,node in ipairs(messageNodes) do              -- loop over all the message nodes&lt;br /&gt;
            g_WelcomeMessages[i] = xmlNodeGetValue(node)   -- retrieve the text in each node&lt;br /&gt;
        end&lt;br /&gt;
        xmlUnloadFile(xml)                                 -- close the XML file&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(),&lt;br /&gt;
    function()&lt;br /&gt;
        local numMessages = #g_WelcomeMessages                        -- get the number of messages&lt;br /&gt;
        local message = g_WelcomeMessages[math.random(numMessages)]   -- pick a random message&lt;br /&gt;
        outputChatBox(message, source, 0, 255, 0)                     -- display it to the joining player&lt;br /&gt;
    end&lt;br /&gt;
)&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;
{{XML functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerUnmute&amp;diff=41249</id>
		<title>OnPlayerUnmute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerUnmute&amp;diff=41249"/>
		<updated>2014-08-09T13:32:19Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Changed sentence @ 'Source'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player has been unmuted by [[setPlayerMuted]].&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player who got unmuted.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will not be unmuted.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs to chatbox the player name who's unmuted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function unmuted()&lt;br /&gt;
    outputChatBox(getPlayerName(source) .. &amp;quot; has been unmuted&amp;quot;, root, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerUnmute&amp;quot;, root, unmuted)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerMute&amp;diff=41248</id>
		<title>OnPlayerMute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerMute&amp;diff=41248"/>
		<updated>2014-08-09T13:30:57Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Changed 'unmuted' to 'muted' @ 'Source'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player has been muted by [[setPlayerMuted]].&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player who got muted.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will not be muted.&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 muted()&lt;br /&gt;
    outputChatBox(getPlayerName(source) .. &amp;quot; has been muted.&amp;quot;, root, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerMute&amp;quot;, root, muted)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerMute&amp;diff=41247</id>
		<title>OnPlayerMute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerMute&amp;diff=41247"/>
		<updated>2014-08-09T13:29:40Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Added 'Source'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player has been muted by [[setPlayerMuted]].&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
''none''&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that unmuted.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will not be muted.&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 muted()&lt;br /&gt;
    outputChatBox(getPlayerName(source) .. &amp;quot; has been muted.&amp;quot;, root, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerMute&amp;quot;, root, muted)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=40893</id>
		<title>DxSetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=40893"/>
		<updated>2014-07-16T15:31:58Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Typos @ blendMode @ blend (&amp;quot;The is the&amp;quot; to &amp;quot;This is the&amp;quot;)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the current blend mode for the dxDraw functions. Changing the blend mode can increase the quality when drawing text or certain other images to a render target. As a general guide use '''modulate_add''' when drawing text to a render target, and '''add''' when drawing the render target to the screen. Don't forget to restore the default '''blend''' at the end - See the example below.&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 dxSetBlendMode ( string blendMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''blendMode :''' The blend mode to use which can be one of:&lt;br /&gt;
**'''blend:''' The source textures are alpha blended to the screen/render target. This is the default mode for drawing and gives the results we all know and love.&lt;br /&gt;
**'''add:''' The source textures are added to the screen/render target.&lt;br /&gt;
**'''modulate_add:''' The source textures are multiplied by the alpha and then added to the screen/render target.&lt;br /&gt;
**'''overwrite :''' The source textures are overwritten. This can be useful for clearing render targets.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns true if successful, or ''false'' if invalid arguments were passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to use '''modulate_add''' and '''add''' to avoid quality problems when using a render target:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myRenderTarget = dxCreateRenderTarget(500, 500, true)&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Function to draw text to our render target texture when the 'r' key is pressed&lt;br /&gt;
--&lt;br /&gt;
function updateRenderTarget()&lt;br /&gt;
    dxSetRenderTarget(myRenderTarget, true)&lt;br /&gt;
    dxSetBlendMode(&amp;quot;modulate_add&amp;quot;)  -- Set 'modulate_add' when drawing stuff on the render target&lt;br /&gt;
&lt;br /&gt;
    dxDrawText(&amp;quot;Testing &amp;quot;..getTickCount(), 0, 0, 0, 0, tocolor(255, 255, 255, 255), 2, &amp;quot;clear&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    dxSetBlendMode(&amp;quot;blend&amp;quot;)         -- Restore default blending&lt;br /&gt;
    dxSetRenderTarget()             -- Restore default render target&lt;br /&gt;
end&lt;br /&gt;
bindKey(&amp;quot;r&amp;quot;, &amp;quot;down&amp;quot;, updateRenderTarget )&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Display render target contents&lt;br /&gt;
--&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        dxSetBlendMode(&amp;quot;add&amp;quot;)       -- Set 'add' when drawing the render target on the screen&lt;br /&gt;
        dxDrawImage(100, 200, 500, 500, myRenderTarget, -10)&lt;br /&gt;
        dxSetBlendMode(&amp;quot;blend&amp;quot;)     -- Restore default blending&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03782|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04425|Added overwrite }}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Key_names&amp;diff=38942</id>
		<title>Key names</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Key_names&amp;diff=38942"/>
		<updated>2014-02-23T16:17:25Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Undo revision 38941 by Et-win (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the key names. These can be used by the console commands ''bind'' and ''unbind'' as well as the script functions [[bindKey]] and [[unbindKey]].&lt;br /&gt;
&lt;br /&gt;
Lua table of all the valid key names listed on this page:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;keyTable = { &amp;quot;mouse1&amp;quot;, &amp;quot;mouse2&amp;quot;, &amp;quot;mouse3&amp;quot;, &amp;quot;mouse4&amp;quot;, &amp;quot;mouse5&amp;quot;, &amp;quot;mouse_wheel_up&amp;quot;, &amp;quot;mouse_wheel_down&amp;quot;, &amp;quot;arrow_l&amp;quot;, &amp;quot;arrow_u&amp;quot;,&lt;br /&gt;
 &amp;quot;arrow_r&amp;quot;, &amp;quot;arrow_d&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot;, &amp;quot;7&amp;quot;, &amp;quot;8&amp;quot;, &amp;quot;9&amp;quot;, &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot;, &amp;quot;e&amp;quot;, &amp;quot;f&amp;quot;, &amp;quot;g&amp;quot;, &amp;quot;h&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;j&amp;quot;, &amp;quot;k&amp;quot;,&lt;br /&gt;
 &amp;quot;l&amp;quot;, &amp;quot;m&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;o&amp;quot;, &amp;quot;p&amp;quot;, &amp;quot;q&amp;quot;, &amp;quot;r&amp;quot;, &amp;quot;s&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;u&amp;quot;, &amp;quot;v&amp;quot;, &amp;quot;w&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot;, &amp;quot;num_0&amp;quot;, &amp;quot;num_1&amp;quot;, &amp;quot;num_2&amp;quot;, &amp;quot;num_3&amp;quot;, &amp;quot;num_4&amp;quot;, &amp;quot;num_5&amp;quot;,&lt;br /&gt;
 &amp;quot;num_6&amp;quot;, &amp;quot;num_7&amp;quot;, &amp;quot;num_8&amp;quot;, &amp;quot;num_9&amp;quot;, &amp;quot;num_mul&amp;quot;, &amp;quot;num_add&amp;quot;, &amp;quot;num_sep&amp;quot;, &amp;quot;num_sub&amp;quot;, &amp;quot;num_div&amp;quot;, &amp;quot;num_dec&amp;quot;, &amp;quot;F1&amp;quot;, &amp;quot;F2&amp;quot;, &amp;quot;F3&amp;quot;, &amp;quot;F4&amp;quot;, &amp;quot;F5&amp;quot;,&lt;br /&gt;
 &amp;quot;F6&amp;quot;, &amp;quot;F7&amp;quot;, &amp;quot;F8&amp;quot;, &amp;quot;F9&amp;quot;, &amp;quot;F10&amp;quot;, &amp;quot;F11&amp;quot;, &amp;quot;F12&amp;quot;, &amp;quot;backspace&amp;quot;, &amp;quot;tab&amp;quot;, &amp;quot;lalt&amp;quot;, &amp;quot;ralt&amp;quot;, &amp;quot;enter&amp;quot;, &amp;quot;space&amp;quot;, &amp;quot;pgup&amp;quot;, &amp;quot;pgdn&amp;quot;, &amp;quot;end&amp;quot;, &amp;quot;home&amp;quot;,&lt;br /&gt;
 &amp;quot;insert&amp;quot;, &amp;quot;delete&amp;quot;, &amp;quot;lshift&amp;quot;, &amp;quot;rshift&amp;quot;, &amp;quot;lctrl&amp;quot;, &amp;quot;rctrl&amp;quot;, &amp;quot;[&amp;quot;, &amp;quot;]&amp;quot;, &amp;quot;pause&amp;quot;, &amp;quot;capslock&amp;quot;, &amp;quot;scroll&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;,&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;/&amp;quot;, &amp;quot;#&amp;quot;, &amp;quot;\\&amp;quot;, &amp;quot;=&amp;quot; }&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br\&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid green;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;MOUSE&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''mouse1''' ''(This is left click)''&lt;br /&gt;
* '''mouse2''' ''(This is right click)''&lt;br /&gt;
* '''mouse3''' ''(This is the middle mouse button)''&lt;br /&gt;
* '''mouse4''' &lt;br /&gt;
* '''mouse5'''&lt;br /&gt;
* '''mouse_wheel_up'''&lt;br /&gt;
* '''mouse_wheel_down'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid red;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;ARROW KEYS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''arrow_l'''&lt;br /&gt;
* '''arrow_u'''&lt;br /&gt;
* '''arrow_r'''&lt;br /&gt;
* '''arrow_d'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid blue;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;NUMBERS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''0'''&lt;br /&gt;
* '''1'''&lt;br /&gt;
* '''2'''&lt;br /&gt;
* '''3'''&lt;br /&gt;
* '''4'''&lt;br /&gt;
* '''5'''&lt;br /&gt;
* '''6'''&lt;br /&gt;
* '''7'''&lt;br /&gt;
* '''8'''&lt;br /&gt;
* '''9'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid orange;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;LETTERS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''a'''&lt;br /&gt;
* '''b'''&lt;br /&gt;
* '''c'''&lt;br /&gt;
* '''d'''&lt;br /&gt;
* '''e'''&lt;br /&gt;
* '''f'''&lt;br /&gt;
* '''g'''&lt;br /&gt;
* '''h'''&lt;br /&gt;
* '''i'''&lt;br /&gt;
* '''j'''&lt;br /&gt;
* '''k'''&lt;br /&gt;
* '''l'''&lt;br /&gt;
* '''m'''&lt;br /&gt;
* '''n'''&lt;br /&gt;
* '''o'''&lt;br /&gt;
* '''p'''&lt;br /&gt;
* '''q'''&lt;br /&gt;
* '''r'''&lt;br /&gt;
* '''s'''&lt;br /&gt;
* '''t'''&lt;br /&gt;
* '''u'''&lt;br /&gt;
* '''v'''&lt;br /&gt;
* '''w'''&lt;br /&gt;
* '''x'''&lt;br /&gt;
* '''y'''&lt;br /&gt;
* '''z'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid yellow;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;NUMERIC KEYPAD&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''num_0'''&lt;br /&gt;
* '''num_1'''&lt;br /&gt;
* '''num_2'''&lt;br /&gt;
* '''num_3'''&lt;br /&gt;
* '''num_4'''&lt;br /&gt;
* '''num_5'''&lt;br /&gt;
* '''num_6'''&lt;br /&gt;
* '''num_7'''&lt;br /&gt;
* '''num_8'''&lt;br /&gt;
* '''num_9'''&lt;br /&gt;
* '''num_mul'''&lt;br /&gt;
* '''num_add'''&lt;br /&gt;
* '''num_sep'''&lt;br /&gt;
* '''num_sub'''&lt;br /&gt;
* '''num_div'''&lt;br /&gt;
* '''num_dec'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid pink;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;FUNCTION KEYS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''F1'''&lt;br /&gt;
* '''F2'''&lt;br /&gt;
* '''F3'''&lt;br /&gt;
* '''F4'''&lt;br /&gt;
* '''F5'''&lt;br /&gt;
* '''F6'''&lt;br /&gt;
* '''F7'''&lt;br /&gt;
* '''F8'''&lt;br /&gt;
* '''F9'''&lt;br /&gt;
* '''F10'''&lt;br /&gt;
* '''F11'''&lt;br /&gt;
* '''F12'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid purple;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;OTHER&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''backspace'''&lt;br /&gt;
* '''tab'''&lt;br /&gt;
* '''lalt'''&lt;br /&gt;
* '''ralt'''&lt;br /&gt;
* '''enter'''&lt;br /&gt;
* '''space'''&lt;br /&gt;
* '''pgup'''&lt;br /&gt;
* '''pgdn'''&lt;br /&gt;
* '''end'''&lt;br /&gt;
* '''home'''&lt;br /&gt;
* '''insert'''&lt;br /&gt;
* '''delete'''&lt;br /&gt;
* '''lshift'''&lt;br /&gt;
* '''rshift'''&lt;br /&gt;
* '''lctrl'''&lt;br /&gt;
* '''rctrl'''&lt;br /&gt;
* '''['''&lt;br /&gt;
* ''']'''&lt;br /&gt;
* '''pause'''&lt;br /&gt;
* '''capslock'''&lt;br /&gt;
* '''scroll'''&lt;br /&gt;
* ''';'''&lt;br /&gt;
* ''','''&lt;br /&gt;
* '''-'''&lt;br /&gt;
* '''.'''&lt;br /&gt;
* '''/'''&lt;br /&gt;
* '''#'''&lt;br /&gt;
* '''\'''&lt;br /&gt;
* '''='''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Key_names&amp;diff=38941</id>
		<title>Key names</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Key_names&amp;diff=38941"/>
		<updated>2014-02-23T16:16:43Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Changed keyTable's variable &amp;quot;\\&amp;quot; to &amp;quot;\&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the key names. These can be used by the console commands ''bind'' and ''unbind'' as well as the script functions [[bindKey]] and [[unbindKey]].&lt;br /&gt;
&lt;br /&gt;
Lua table of all the valid key names listed on this page:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;keyTable = { &amp;quot;mouse1&amp;quot;, &amp;quot;mouse2&amp;quot;, &amp;quot;mouse3&amp;quot;, &amp;quot;mouse4&amp;quot;, &amp;quot;mouse5&amp;quot;, &amp;quot;mouse_wheel_up&amp;quot;, &amp;quot;mouse_wheel_down&amp;quot;, &amp;quot;arrow_l&amp;quot;, &amp;quot;arrow_u&amp;quot;,&lt;br /&gt;
 &amp;quot;arrow_r&amp;quot;, &amp;quot;arrow_d&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot;, &amp;quot;7&amp;quot;, &amp;quot;8&amp;quot;, &amp;quot;9&amp;quot;, &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot;, &amp;quot;e&amp;quot;, &amp;quot;f&amp;quot;, &amp;quot;g&amp;quot;, &amp;quot;h&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;j&amp;quot;, &amp;quot;k&amp;quot;,&lt;br /&gt;
 &amp;quot;l&amp;quot;, &amp;quot;m&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;o&amp;quot;, &amp;quot;p&amp;quot;, &amp;quot;q&amp;quot;, &amp;quot;r&amp;quot;, &amp;quot;s&amp;quot;, &amp;quot;t&amp;quot;, &amp;quot;u&amp;quot;, &amp;quot;v&amp;quot;, &amp;quot;w&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot;, &amp;quot;num_0&amp;quot;, &amp;quot;num_1&amp;quot;, &amp;quot;num_2&amp;quot;, &amp;quot;num_3&amp;quot;, &amp;quot;num_4&amp;quot;, &amp;quot;num_5&amp;quot;,&lt;br /&gt;
 &amp;quot;num_6&amp;quot;, &amp;quot;num_7&amp;quot;, &amp;quot;num_8&amp;quot;, &amp;quot;num_9&amp;quot;, &amp;quot;num_mul&amp;quot;, &amp;quot;num_add&amp;quot;, &amp;quot;num_sep&amp;quot;, &amp;quot;num_sub&amp;quot;, &amp;quot;num_div&amp;quot;, &amp;quot;num_dec&amp;quot;, &amp;quot;F1&amp;quot;, &amp;quot;F2&amp;quot;, &amp;quot;F3&amp;quot;, &amp;quot;F4&amp;quot;, &amp;quot;F5&amp;quot;,&lt;br /&gt;
 &amp;quot;F6&amp;quot;, &amp;quot;F7&amp;quot;, &amp;quot;F8&amp;quot;, &amp;quot;F9&amp;quot;, &amp;quot;F10&amp;quot;, &amp;quot;F11&amp;quot;, &amp;quot;F12&amp;quot;, &amp;quot;backspace&amp;quot;, &amp;quot;tab&amp;quot;, &amp;quot;lalt&amp;quot;, &amp;quot;ralt&amp;quot;, &amp;quot;enter&amp;quot;, &amp;quot;space&amp;quot;, &amp;quot;pgup&amp;quot;, &amp;quot;pgdn&amp;quot;, &amp;quot;end&amp;quot;, &amp;quot;home&amp;quot;,&lt;br /&gt;
 &amp;quot;insert&amp;quot;, &amp;quot;delete&amp;quot;, &amp;quot;lshift&amp;quot;, &amp;quot;rshift&amp;quot;, &amp;quot;lctrl&amp;quot;, &amp;quot;rctrl&amp;quot;, &amp;quot;[&amp;quot;, &amp;quot;]&amp;quot;, &amp;quot;pause&amp;quot;, &amp;quot;capslock&amp;quot;, &amp;quot;scroll&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;,&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;/&amp;quot;, &amp;quot;#&amp;quot;, &amp;quot;\&amp;quot;, &amp;quot;=&amp;quot; }&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br\&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid green;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;MOUSE&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''mouse1''' ''(This is left click)''&lt;br /&gt;
* '''mouse2''' ''(This is right click)''&lt;br /&gt;
* '''mouse3''' ''(This is the middle mouse button)''&lt;br /&gt;
* '''mouse4''' &lt;br /&gt;
* '''mouse5'''&lt;br /&gt;
* '''mouse_wheel_up'''&lt;br /&gt;
* '''mouse_wheel_down'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid red;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;ARROW KEYS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''arrow_l'''&lt;br /&gt;
* '''arrow_u'''&lt;br /&gt;
* '''arrow_r'''&lt;br /&gt;
* '''arrow_d'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid blue;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;NUMBERS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''0'''&lt;br /&gt;
* '''1'''&lt;br /&gt;
* '''2'''&lt;br /&gt;
* '''3'''&lt;br /&gt;
* '''4'''&lt;br /&gt;
* '''5'''&lt;br /&gt;
* '''6'''&lt;br /&gt;
* '''7'''&lt;br /&gt;
* '''8'''&lt;br /&gt;
* '''9'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid orange;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;LETTERS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''a'''&lt;br /&gt;
* '''b'''&lt;br /&gt;
* '''c'''&lt;br /&gt;
* '''d'''&lt;br /&gt;
* '''e'''&lt;br /&gt;
* '''f'''&lt;br /&gt;
* '''g'''&lt;br /&gt;
* '''h'''&lt;br /&gt;
* '''i'''&lt;br /&gt;
* '''j'''&lt;br /&gt;
* '''k'''&lt;br /&gt;
* '''l'''&lt;br /&gt;
* '''m'''&lt;br /&gt;
* '''n'''&lt;br /&gt;
* '''o'''&lt;br /&gt;
* '''p'''&lt;br /&gt;
* '''q'''&lt;br /&gt;
* '''r'''&lt;br /&gt;
* '''s'''&lt;br /&gt;
* '''t'''&lt;br /&gt;
* '''u'''&lt;br /&gt;
* '''v'''&lt;br /&gt;
* '''w'''&lt;br /&gt;
* '''x'''&lt;br /&gt;
* '''y'''&lt;br /&gt;
* '''z'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid yellow;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;NUMERIC KEYPAD&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''num_0'''&lt;br /&gt;
* '''num_1'''&lt;br /&gt;
* '''num_2'''&lt;br /&gt;
* '''num_3'''&lt;br /&gt;
* '''num_4'''&lt;br /&gt;
* '''num_5'''&lt;br /&gt;
* '''num_6'''&lt;br /&gt;
* '''num_7'''&lt;br /&gt;
* '''num_8'''&lt;br /&gt;
* '''num_9'''&lt;br /&gt;
* '''num_mul'''&lt;br /&gt;
* '''num_add'''&lt;br /&gt;
* '''num_sep'''&lt;br /&gt;
* '''num_sub'''&lt;br /&gt;
* '''num_div'''&lt;br /&gt;
* '''num_dec'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid pink;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;FUNCTION KEYS&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''F1'''&lt;br /&gt;
* '''F2'''&lt;br /&gt;
* '''F3'''&lt;br /&gt;
* '''F4'''&lt;br /&gt;
* '''F5'''&lt;br /&gt;
* '''F6'''&lt;br /&gt;
* '''F7'''&lt;br /&gt;
* '''F8'''&lt;br /&gt;
* '''F9'''&lt;br /&gt;
* '''F10'''&lt;br /&gt;
* '''F11'''&lt;br /&gt;
* '''F12'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid purple;margin-bottom:3px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;OTHER&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''backspace'''&lt;br /&gt;
* '''tab'''&lt;br /&gt;
* '''lalt'''&lt;br /&gt;
* '''ralt'''&lt;br /&gt;
* '''enter'''&lt;br /&gt;
* '''space'''&lt;br /&gt;
* '''pgup'''&lt;br /&gt;
* '''pgdn'''&lt;br /&gt;
* '''end'''&lt;br /&gt;
* '''home'''&lt;br /&gt;
* '''insert'''&lt;br /&gt;
* '''delete'''&lt;br /&gt;
* '''lshift'''&lt;br /&gt;
* '''rshift'''&lt;br /&gt;
* '''lctrl'''&lt;br /&gt;
* '''rctrl'''&lt;br /&gt;
* '''['''&lt;br /&gt;
* ''']'''&lt;br /&gt;
* '''pause'''&lt;br /&gt;
* '''capslock'''&lt;br /&gt;
* '''scroll'''&lt;br /&gt;
* ''';'''&lt;br /&gt;
* ''','''&lt;br /&gt;
* '''-'''&lt;br /&gt;
* '''.'''&lt;br /&gt;
* '''/'''&lt;br /&gt;
* '''#'''&lt;br /&gt;
* '''\'''&lt;br /&gt;
* '''='''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetColumnWidth&amp;diff=38007</id>
		<title>GuiGridListSetColumnWidth</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetColumnWidth&amp;diff=38007"/>
		<updated>2013-12-31T14:45:13Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Changed boolean from 'guiGridListSetColumnWidth' to 'true' (Last change from me was wrong)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This allows you to set the width of an existing column in a gridlist.&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 guiGridListSetColumnWidth ( element gridList, int columnIndex, number width, bool relative )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to add a column to&lt;br /&gt;
*'''columnIndex:''' Column ID of the size you want to change&lt;br /&gt;
*'''width:''' A float or integer of the width of the column depending on the '''relative''' argument.&lt;br /&gt;
*'''relative:''' A boolean defining whether '''width''' measurements will be relative to the Gridlist size, or absolute pixels.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the gridlist column width was successfully set, ''false'' if bad arguments were given.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a gridlist with one column that is too small to display. After the column has been successfully created, we give it a new width so you can see column.&lt;br /&gt;
&amp;lt;!-- Why these odd positions? Examples look cleaner with numbers like 250 instead of 249. Dunno whether I should change them.--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) &lt;br /&gt;
local column = guiGridListAddColumn ( gridlist, &amp;quot;My column&amp;quot;, 0 )&lt;br /&gt;
&lt;br /&gt;
if column then&lt;br /&gt;
	guiGridListSetColumnWidth ( gridlist, column, 0.5, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetColumnWidth&amp;diff=38006</id>
		<title>GuiGridListSetColumnWidth</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetColumnWidth&amp;diff=38006"/>
		<updated>2013-12-31T14:24:56Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Added boolean 'false' to 'guiGridListSetColumnWidth'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This allows you to set the width of an existing column in a gridlist.&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 guiGridListSetColumnWidth ( element gridList, int columnIndex, number width, bool relative )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to add a column to&lt;br /&gt;
*'''columnIndex:''' Column ID of the size you want to change&lt;br /&gt;
*'''width:''' A float or integer of the width of the column depending on the '''relative''' argument.&lt;br /&gt;
*'''relative:''' A boolean defining whether '''width''' measurements will be relative to the Gridlist size, or absolute pixels.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the gridlist column width was successfully set, ''false'' if bad arguments were given.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a gridlist with one column that is too small to display. After the column has been successfully created, we give it a new width so you can see column.&lt;br /&gt;
&amp;lt;!-- Why these odd positions? Examples look cleaner with numbers like 250 instead of 249. Dunno whether I should change them.--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) &lt;br /&gt;
local column = guiGridListAddColumn ( gridlist, &amp;quot;My column&amp;quot;, 0 )&lt;br /&gt;
&lt;br /&gt;
if column then&lt;br /&gt;
	guiGridListSetColumnWidth ( gridlist, column, 0.5, false)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37767</id>
		<title>GuiGridListSetHorizontalScrollPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37767"/>
		<updated>2013-12-07T01:37:19Z</updated>

		<summary type="html">&lt;p&gt;Et-win: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{client function}}&lt;br /&gt;
This function is used to set the horizontal scroll position from a grid list&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 guiGridListSetHorizontalScrollPosition( element guiGridlist, float fPosition )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''guiGridlist''': The grid list you want to set the horizontal scroll position from&lt;br /&gt;
*'''fPosition''': A float representing the horizontal scroll position (0 - 100)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the horizontal scroll position was set, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.2}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37766</id>
		<title>GuiGridListSetHorizontalScrollPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37766"/>
		<updated>2013-12-07T01:36:20Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Undo revision 37765 by Et-win (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{client function}}&lt;br /&gt;
This function is used to set the horizontal scroll position from a grid list&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 guiGridListSetHorizontalScrollPosition( element guiGridlist, float fPosition )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''guiGridlist''': The grid list you want to set the horizontal scroll position from&lt;br /&gt;
*'''fPosition''': A float representing the horizontal scroll position&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the horizontal scroll position was set, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.2}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37765</id>
		<title>GuiGridListSetHorizontalScrollPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetHorizontalScrollPosition&amp;diff=37765"/>
		<updated>2013-12-07T01:35:29Z</updated>

		<summary type="html">&lt;p&gt;Et-win: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{client function}}&lt;br /&gt;
This function is used to set the horizontal scroll position from a grid list&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 guiGridListSetHorizontalScrollPosition( element guiGridlist, float fPosition )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''guiGridlist''': The grid list you want to set the horizontal scroll position from&lt;br /&gt;
*'''fPosition''': A float representing the horizontal scroll position (0 - 100)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the horizontal scroll position was set, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.2}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListAddRow&amp;diff=36380</id>
		<title>GuiGridListAddRow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListAddRow&amp;diff=36380"/>
		<updated>2013-06-09T14:09:42Z</updated>

		<summary type="html">&lt;p&gt;Et-win: Undo revision 36379 by Et-win (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Adds a row to a grid list.&lt;br /&gt;
&lt;br /&gt;
ATTENTION: Without [[guiGridListSetItemText]] there is no row added to the grid. &lt;br /&gt;
Look at the example, first you give the row a name with '''[[row =]]''' guiGridListAddRow ( playerList ), and then you use [[guiGridListSetItemText]]. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int guiGridListAddRow ( element gridList )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to add a row to&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the row id if it has been created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a player list on the right side of the screen and fills it with the names of the connected players.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function clientsideResourceStart ()&lt;br /&gt;
        local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create the grid list&lt;br /&gt;
        local column = guiGridListAddColumn( playerList, &amp;quot;Player&amp;quot;, 0.85 ) -- Create a 'players' column in the list&lt;br /&gt;
        if ( column ) then -- If the column was successfully created&lt;br /&gt;
                for id, playeritem in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do &lt;br /&gt;
                --Loop through all the players, adding them to the table&lt;br /&gt;
                        local row = guiGridListAddRow ( playerList )&lt;br /&gt;
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, getRootElement(), clientsideResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListAddRow&amp;diff=36379</id>
		<title>GuiGridListAddRow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListAddRow&amp;diff=36379"/>
		<updated>2013-06-09T14:02:36Z</updated>

		<summary type="html">&lt;p&gt;Et-win: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Adds a row to a grid list.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int guiGridListAddRow ( element gridList )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to add a row to&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the row id if it has been created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a player list on the right side of the screen and fills it with the names of the connected players.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function clientsideResourceStart ()&lt;br /&gt;
        local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create the grid list&lt;br /&gt;
        local column = guiGridListAddColumn( playerList, &amp;quot;Player&amp;quot;, 0.85 ) -- Create a 'players' column in the list&lt;br /&gt;
        if ( column ) then -- If the column was successfully created&lt;br /&gt;
                for id, playeritem in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do &lt;br /&gt;
                --Loop through all the players, adding them to the table&lt;br /&gt;
                        local row = guiGridListAddRow ( playerList )&lt;br /&gt;
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, getRootElement(), clientsideResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>Et-win</name></author>
	</entry>
</feed>