<?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=Motar2k</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=Motar2k"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Motar2k"/>
	<updated>2026-05-10T16:04:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCurrentFPS&amp;diff=65943</id>
		<title>GetCurrentFPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCurrentFPS&amp;diff=65943"/>
		<updated>2020-04-21T19:28:12Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This clientside useful function returns the current ''FPS'' (frames per second) at which GTA: SA is running.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float/boolean getCurrentFPS( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
This function returns a ''number'' telling the current ''FPS'' if they could be calculated. Returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&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;local fps = 0&lt;br /&gt;
function getCurrentFPS() -- Setup the useful function&lt;br /&gt;
    return fps&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function updateFPS(msSinceLastFrame)&lt;br /&gt;
    -- FPS are the frames per second, so count the frames rendered per milisecond using frame delta time and then convert that to frames per second.&lt;br /&gt;
    fps = (1 / msSinceLastFrame) * 1000&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, updateFPS)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Original author: ''StiviK''.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The next example draws the current ''FPS'' rounded to an integer in the up-right corner of the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local sx = guiGetScreenSize()&lt;br /&gt;
local function drawFPS()&lt;br /&gt;
    if not getCurrentFPS() then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    local roundedFPS = math.floor(getCurrentFPS())&lt;br /&gt;
    dxDrawText(roundedFPS, sx - dxGetTextWidth(roundedFPS), 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientHUDRender&amp;quot;, root, drawFPS)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next script mitigates ''FPS'' variations by setting the ''FPS'' limit to the average ''FPS'' of the last 5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local function getAverageFPSOfFPSArray(table)&lt;br /&gt;
    -- Average FPS = (FPS1 + FPS2 + ... + FPSX) / X&lt;br /&gt;
    local totalFPS = 0&lt;br /&gt;
    for _, fps in pairs(table) do&lt;br /&gt;
        totalFPS = totalFPS + fps&lt;br /&gt;
    end&lt;br /&gt;
    return totalFPS / #table&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local currentSecondFPS = {}&lt;br /&gt;
local lastSecondTicks = getTickCount()&lt;br /&gt;
local lastFiveSecondsFPS = {}&lt;br /&gt;
local function smoothFPS()&lt;br /&gt;
    -- Do we have a FPS rate already?&lt;br /&gt;
    if not getCurrentFPS() then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    -- Insert current FPS into a table for reference&lt;br /&gt;
    table.insert(currentSecondFPS, getCurrentFPS())&lt;br /&gt;
    -- If a second passed, get the average FPS using the table&lt;br /&gt;
    -- (We always have at least one frame rendered, so dividing by 0 it's not a problem)&lt;br /&gt;
    if getTickCount() - lastSecondTicks &amp;gt;= 1000 then&lt;br /&gt;
        local averageFPSPerSecond = getAverageFPSOfFPSArray(currentSecondFPS)&lt;br /&gt;
        -- Reset variables&lt;br /&gt;
        currentSecondFPS = {}&lt;br /&gt;
        lastSecondTicks = getTickCount()&lt;br /&gt;
        -- Update the table containing last five seconds FPS&lt;br /&gt;
        -- Also update the FPS limit accordingly&lt;br /&gt;
        table.insert(lastFiveSecondsFPS, averageFPSPerSecond)&lt;br /&gt;
        -- Silently discard too old average FPS&lt;br /&gt;
        if #lastFiveSecondsFPS == 6 then&lt;br /&gt;
            table.remove(lastFiveSecondsFPS, 1)&lt;br /&gt;
        end&lt;br /&gt;
        -- Get the average FPS of the average FPS of each of the last five seconds, and use the result as the frame limit&lt;br /&gt;
        setFPSLimit(math.ceil(getAverageFPSOfFPSArray(lastFiveSecondsFPS)))&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientHUDRender&amp;quot;, root, smoothFPS)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedStep&amp;diff=65699</id>
		<title>OnClientPedStep</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedStep&amp;diff=65699"/>
		<updated>2020-04-05T21:03:39Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14735|&lt;br /&gt;
This event is called when a peds foot has come on to the ground after jumping or taking a full step.&lt;br /&gt;
}}&lt;br /&gt;
{{Note|This event is only triggered for peds that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 bool leftFoot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
*'''leftFoot''':  a [[bool]] representing if it was the left foot that moved.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] who stepped.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.5.6.14735|}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedStep&amp;quot;, localPlayer,&lt;br /&gt;
     function(leftFoot)&lt;br /&gt;
          if (leftFoot) then&lt;br /&gt;
               outputChatBox(&amp;quot;Your left foot hit the ground.&amp;quot;, 0, 255, 0)&lt;br /&gt;
          else&lt;br /&gt;
               outputChatBox(&amp;quot;Your right foot hit the ground.&amp;quot;, 0, 255, 0)&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;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientWorldSound&amp;diff=65698</id>
		<title>OnClientWorldSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientWorldSound&amp;diff=65698"/>
		<updated>2020-04-05T21:03:25Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14652|This event triggers whenever a GTA sound starts playing.}}&lt;br /&gt;
{{Note|Use [[setWorldSoundEnabled]] if you want to disable certain sounds conditionless.&lt;br /&gt;
For example, you should only cancel player emitted sounds in this event, because when you cancel certain vehicle sounds, the game will try to play the same sound on the next frame.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int group, int index, float x, float y, float z&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''group:''' An [[int|integer]] representing the [[World sound groups|world sound group]]&lt;br /&gt;
*'''index:''' An [[int|integer]] representing an individual sound within the group&lt;br /&gt;
*'''x:''' a [[float]]ing point number representing the X coordinate on the map.&lt;br /&gt;
*'''y:''' a [[float]]ing point number representing the Y coordinate on the map.&lt;br /&gt;
*'''z:''' a [[float]]ing point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the element, which emitted the sound.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the sound won't play at all.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example will cancel every vehicle sound.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientWorldSound&amp;quot;, root, function()&lt;br /&gt;
    if getElementType(source) == &amp;quot;vehicle&amp;quot; then&lt;br /&gt;
        cancelEvent()&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example lets you see how many times each sound that gets played has been played using '/seesoundlist'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sounds = {}&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientWorldSound&amp;quot;, root, function(group, index)&lt;br /&gt;
	sounds[group..&amp;quot; | &amp;quot;..index] = (sounds[group..&amp;quot; | &amp;quot;..index] or 0) + 1&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function cmdSeeSoundList()&lt;br /&gt;
	-- Put the non iterated table into an interated table so we can sort them&lt;br /&gt;
	local tbl = {}&lt;br /&gt;
	for sound, count in pairs(sounds) do&lt;br /&gt;
		tbl[#tbl + 1] = {sound, count}&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(tbl, function(a, b) return a[2] &amp;gt; b[2] end)&lt;br /&gt;
	-- Output the table to clipboard&lt;br /&gt;
	local str = &amp;quot;Group | Index: Times played\n&amp;quot;&lt;br /&gt;
	for i, dat in ipairs(tbl) do&lt;br /&gt;
		str = str..dat[1]..&amp;quot;: &amp;quot;..dat[2]..&amp;quot;\n&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	setClipboard(str)&lt;br /&gt;
	outputChatBox(&amp;quot;Use CTRL + V in notepad to view the table.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;seesoundlist&amp;quot;, cmdSeeSoundList)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===World sound functions===&lt;br /&gt;
* [[setWorldSoundEnabled]]&lt;br /&gt;
* [[isWorldSoundEnabled]]&lt;br /&gt;
* [[resetWorldSounds]]&lt;br /&gt;
===Client other events===&lt;br /&gt;
{{Client_other_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65697</id>
		<title>DxDrawPrimitive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65697"/>
		<updated>2020-04-05T21:02:47Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14370|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be used in conjunction with [[onClientRender]] in order to display continuously.}}&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 dxDrawPrimitive ( string pType, bool postGUI, table vertice1 [, table vertice2, ...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''pType:''' Type of primitive to be drawn.&lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
* '''vertices:''' Tables representing each primitive vertice, required amount of them is determined by primitive type.&lt;br /&gt;
&lt;br /&gt;
==Allowed types==&lt;br /&gt;
[[Image:MTAsa_primitives.png|thumb|240px|Available primitive types.]]&lt;br /&gt;
More info on primitives may be found on [https://msdn.microsoft.com/en-us/library/windows/desktop/bb147291(v=vs.85).aspx this MSDN site] &lt;br /&gt;
* '''pointlist:''' Renders the vertices as a collection of isolated points.&lt;br /&gt;
* '''linelist:''' Renders the vertices as a list of isolated straight line segments.&lt;br /&gt;
* '''linestrip:''' Renders the vertices as a single polyline.&lt;br /&gt;
* '''trianglelist:''' Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.&lt;br /&gt;
* '''trianglestrip:''' Renders the vertices as a triangle strip.&lt;br /&gt;
* '''trianglefan:''' Renders the vertices as a triangle fan.&lt;br /&gt;
&lt;br /&gt;
==Vertices format==&lt;br /&gt;
* '''posX:''' An float representing the absolute X position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''posY:''' An float representing the absolute Y position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''color (optional):''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue). If it's not specified, white color is used.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This is a small example that creates trianglefan primitive with vertices in places that user clicks. It assigns every vertice random color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vertices = {}&lt;br /&gt;
function onClick(btn, state, x, y)&lt;br /&gt;
	if btn ~= &amp;quot;left&amp;quot; then return end&lt;br /&gt;
	if state ~= &amp;quot;up&amp;quot; then return end&lt;br /&gt;
	local vertice = {x, y, tocolor(math.random(255), math.random(255), math.random(255))}&lt;br /&gt;
	table.insert(vertices, vertice)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientClick&amp;quot;, root, onClick)&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	dxDrawPrimitive(&amp;quot;trianglefan&amp;quot;, true, unpack(vertices))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, draw)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawPrimitive]]&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=65696</id>
		<title>DxGetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=65696"/>
		<updated>2020-04-05T21:02:19Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the current blend mode for the dxDraw functions. The blend mode is set using [[dxSetBlendMode]]&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string dxGetBlendMode ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the current blend mode, which can be one of:&lt;br /&gt;
*'''blend'''&lt;br /&gt;
*'''add'''&lt;br /&gt;
*'''modulate_add'''&lt;br /&gt;
*'''overwrite'''&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;myBlendMode&amp;quot;, function()&lt;br /&gt;
    outputChatBox( dxGetBlendMode() )&lt;br /&gt;
end)&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;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxGetBlendMode]]&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedStep&amp;diff=65695</id>
		<title>OnClientPedStep</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedStep&amp;diff=65695"/>
		<updated>2020-04-05T20:50:36Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14735|&lt;br /&gt;
This event is called when a peds foot has come on to the ground after jumping or taking a full step.&lt;br /&gt;
}}&lt;br /&gt;
{{Note|This event is only triggered for peds that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 bool leftFoot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
*'''leftFoot''':  a [[bool]] representing if it was the left foot that moved.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] who stepped.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.5.6.14735|}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedStep&amp;quot;, localPlayer,&lt;br /&gt;
     function(leftFoot)&lt;br /&gt;
          if (leftFoot) then&lt;br /&gt;
               outputChatBox(&amp;quot;Your left foot hit the ground.&amp;quot;, 0, 255, 0)&lt;br /&gt;
          else&lt;br /&gt;
               outputChatBox(&amp;quot;Your right foot hit the ground.&amp;quot;, 0, 255, 0)&lt;br /&gt;
          end&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;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientWorldSound&amp;diff=65694</id>
		<title>OnClientWorldSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientWorldSound&amp;diff=65694"/>
		<updated>2020-04-05T20:49:56Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14652|This event triggers whenever a GTA sound starts playing.}}&lt;br /&gt;
{{Note|Use [[setWorldSoundEnabled]] if you want to disable certain sounds conditionless.&lt;br /&gt;
For example, you should only cancel player emitted sounds in this event, because when you cancel certain vehicle sounds, the game will try to play the same sound on the next frame.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int group, int index, float x, float y, float z&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''group:''' An [[int|integer]] representing the [[World sound groups|world sound group]]&lt;br /&gt;
*'''index:''' An [[int|integer]] representing an individual sound within the group&lt;br /&gt;
*'''x:''' a [[float]]ing point number representing the X coordinate on the map.&lt;br /&gt;
*'''y:''' a [[float]]ing point number representing the Y coordinate on the map.&lt;br /&gt;
*'''z:''' a [[float]]ing point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the element, which emitted the sound.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the sound won't play at all.&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;
'''Example 2:''' This example will cancel every vehicle sound.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientWorldSound&amp;quot;, root, function()&lt;br /&gt;
    if getElementType(source) == &amp;quot;vehicle&amp;quot; then&lt;br /&gt;
        cancelEvent()&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 1:''' This example lets you see how many times each sound that gets played has been played using '/seesoundlist'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sounds = {}&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientWorldSound&amp;quot;, root, function(group, index)&lt;br /&gt;
	sounds[group..&amp;quot; | &amp;quot;..index] = (sounds[group..&amp;quot; | &amp;quot;..index] or 0) + 1&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function cmdSeeSoundList()&lt;br /&gt;
	-- Put the non iterated table into an interated table so we can sort them&lt;br /&gt;
	local tbl = {}&lt;br /&gt;
	for sound, count in pairs(sounds) do&lt;br /&gt;
		tbl[#tbl + 1] = {sound, count}&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(tbl, function(a, b) return a[2] &amp;gt; b[2] end)&lt;br /&gt;
	-- Output the table to clipboard&lt;br /&gt;
	local str = &amp;quot;Group | Index: Times played\n&amp;quot;&lt;br /&gt;
	for i, dat in ipairs(tbl) do&lt;br /&gt;
		str = str..dat[1]..&amp;quot;: &amp;quot;..dat[2]..&amp;quot;\n&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	setClipboard(str)&lt;br /&gt;
	outputChatBox(&amp;quot;Use CTRL + V in notepad to view the table.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;seesoundlist&amp;quot;, cmdSeeSoundList)&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;
===World sound functions===&lt;br /&gt;
* [[setWorldSoundEnabled]]&lt;br /&gt;
* [[isWorldSoundEnabled]]&lt;br /&gt;
* [[resetWorldSounds]]&lt;br /&gt;
===Client other events===&lt;br /&gt;
{{Client_other_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65693</id>
		<title>DxDrawPrimitive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65693"/>
		<updated>2020-04-05T20:45:15Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14370|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be used in conjunction with [[onClientRender]] in order to display continuously.}}&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 dxDrawPrimitive ( string pType, bool postGUI, table vertice1 [, table vertice2, ...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''pType:''' Type of primitive to be drawn.&lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
* '''vertices:''' Tables representing each primitive vertice, required amount of them is determined by primitive type.&lt;br /&gt;
&lt;br /&gt;
==Allowed types==&lt;br /&gt;
[[Image:MTAsa_primitives.png|thumb|240px|Available primitive types.]]&lt;br /&gt;
More info on primitives may be found on [https://msdn.microsoft.com/en-us/library/windows/desktop/bb147291(v=vs.85).aspx this MSDN site] &lt;br /&gt;
* '''pointlist:''' Renders the vertices as a collection of isolated points.&lt;br /&gt;
* '''linelist:''' Renders the vertices as a list of isolated straight line segments.&lt;br /&gt;
* '''linestrip:''' Renders the vertices as a single polyline.&lt;br /&gt;
* '''trianglelist:''' Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.&lt;br /&gt;
* '''trianglestrip:''' Renders the vertices as a triangle strip.&lt;br /&gt;
* '''trianglefan:''' Renders the vertices as a triangle fan.&lt;br /&gt;
&lt;br /&gt;
==Vertices format==&lt;br /&gt;
* '''posX:''' An float representing the absolute X position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''posY:''' An float representing the absolute Y position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''color (optional):''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue). If it's not specified, white color is used.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&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 is a small example that creates trianglefan primitive with vertices in places that user clicks. It assigns every vertice random color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vertices = {}&lt;br /&gt;
function onClick(btn, state, x, y)&lt;br /&gt;
	if btn ~= &amp;quot;left&amp;quot; then return end&lt;br /&gt;
	if state ~= &amp;quot;up&amp;quot; then return end&lt;br /&gt;
	local vertice = {x, y, tocolor(math.random(255), math.random(255), math.random(255))}&lt;br /&gt;
	table.insert(vertices, vertice)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientClick&amp;quot;, root, onClick)&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	dxDrawPrimitive(&amp;quot;trianglefan&amp;quot;, true, unpack(vertices))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, draw)&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;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawPrimitive]]&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65692</id>
		<title>DxDrawPrimitive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawPrimitive&amp;diff=65692"/>
		<updated>2020-04-05T20:44:49Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14370|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be used in conjunction with [[onClientRender]] in order to display continuously.}}&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 dxDrawPrimitive ( string pType, bool postGUI, table vertice1 [, table vertice2, ...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''pType:''' Type of primitive to be drawn.&lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
* '''vertices:''' Tables representing each primitive vertice, required amount of them is determined by primitive type.&lt;br /&gt;
&lt;br /&gt;
==Allowed types==&lt;br /&gt;
[[Image:MTAsa_primitives.png|thumb|240px|Available primitive types.]]&lt;br /&gt;
More info on primitives may be found on [https://msdn.microsoft.com/en-us/library/windows/desktop/bb147291(v=vs.85).aspx this MSDN site] &lt;br /&gt;
* '''pointlist:''' Renders the vertices as a collection of isolated points.&lt;br /&gt;
* '''linelist:''' Renders the vertices as a list of isolated straight line segments.&lt;br /&gt;
* '''linestrip:''' Renders the vertices as a single polyline.&lt;br /&gt;
* '''trianglelist:''' Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.&lt;br /&gt;
* '''trianglestrip:''' Renders the vertices as a triangle strip.&lt;br /&gt;
* '''trianglefan:''' Renders the vertices as a triangle fan.&lt;br /&gt;
&lt;br /&gt;
==Vertices format==&lt;br /&gt;
* '''posX:''' An float representing the absolute X position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''posY:''' An float representing the absolute Y position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''color (optional):''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue). If it's not specified, white color is used.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&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 is a small example that creates trianglefan primitive with vertices in places that user clicks. It assigns every vertice random color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vertices = {}&lt;br /&gt;
function onClick(btn, state, x, y)&lt;br /&gt;
	if btn ~= &amp;quot;left&amp;quot; then return end&lt;br /&gt;
	if state ~= &amp;quot;up&amp;quot; then return end&lt;br /&gt;
	local vertice = {x, y, tocolor(math.random(255), math.random(255), math.random(255))}&lt;br /&gt;
	table.insert(vertices, vertice)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientClick&amp;quot;, root, onClick)&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	dxDrawPrimitive(&amp;quot;trianglefan&amp;quot;, true, unpack(vertices))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, draw)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawPrimitive]]&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientVehicleWeaponHit&amp;diff=65691</id>
		<title>OnClientVehicleWeaponHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientVehicleWeaponHit&amp;diff=65691"/>
		<updated>2020-04-05T20:42:21Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|16074|&lt;br /&gt;
This event is called when a vehicle weapon hits an element or the world.&lt;br /&gt;
}}&lt;br /&gt;
{{Note|This event is only triggered for elements that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 int weaponType, element hitElement, float hitX, float hitY, float hitZ, int model, int materialID&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
*'''weaponType''': The type of vehicle weapon. (See the list below)&lt;br /&gt;
*'''hitElement''': The [[vehicle]], [[ped]] or [[player]] that was hit by the weapon sometimes ''false''.&lt;br /&gt;
*'''hitX''': The X world co-ordinate of where the hit occured.&lt;br /&gt;
*'''hitY''': The Y world co-ordinate of where the hit occured.&lt;br /&gt;
*'''hitZ''': The Z world co-ordinate of where the hit occured.&lt;br /&gt;
*'''model''': The model ID of the element that was hit.&lt;br /&gt;
*'''materialID''': The material ID of the element that was hit.&lt;br /&gt;
&lt;br /&gt;
==Weapon types==&lt;br /&gt;
*'''0''': Invalid&lt;br /&gt;
*'''1''': Water Canon&lt;br /&gt;
*'''2''': Tank Gun - Not yet implemented.&lt;br /&gt;
*'''3''': Rocket - Not yet implemented.&lt;br /&gt;
*'''4''': Heat Seeking Rocket - Not yet implemented.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[vehicle]] that fired the weapon.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.5.6.16074|}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleWeaponHit&amp;quot;, root,&lt;br /&gt;
     function(weaponType, hitElement, hitX, hitY, hitZ, model, materialID)&lt;br /&gt;
          outputChatBox(tostring(weaponType)..&amp;quot; &amp;quot;..tostring(hitElement)..&amp;quot; &amp;quot;..tostring(hitX)..&amp;quot; &amp;quot;..tostring(hitY)..&amp;quot; &amp;quot;..tostring(hitZ)..&amp;quot; &amp;quot;..tostring(model)..&amp;quot; &amp;quot;..tostring(materialID))&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;
===Client vehicle events===&lt;br /&gt;
{{Client_vehicle_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetKeyboardLayout&amp;diff=65690</id>
		<title>GetKeyboardLayout</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetKeyboardLayout&amp;diff=65690"/>
		<updated>2020-04-05T20:37:36Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|18866|This function gets the player's keyboard layout settings, which they are currently (keyboard layout can be changed at any moment) using at the time of invocation.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getKeyboardLayout ()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' with keyboard layout properties:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;cellpadding: 10px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Property || Values and description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;readingLayout&amp;lt;/code&amp;gt; ||&lt;br /&gt;
    {| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ltr&amp;quot;&amp;lt;/code&amp;gt; || Left to right (English)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;rtl&amp;quot;&amp;lt;/code&amp;gt; || Right to left (Arabic, Hebrew)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ttb-rtl-ltr&amp;quot;&amp;lt;/code&amp;gt; || Vertical top to bottom with columns to the left and also left to right (Japanese)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ttb-ltr&amp;quot;&amp;lt;/code&amp;gt; || Vertical top to bottom with columns proceeding to the right (Mongolian)&lt;br /&gt;
    |}&lt;br /&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;layout&amp;quot;, function()&lt;br /&gt;
    outputConsole( inspect( getKeyboardLayout() ) )--output keyboard layout in console (F8)&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_utility_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetKeyboardLayout&amp;diff=65689</id>
		<title>GetKeyboardLayout</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetKeyboardLayout&amp;diff=65689"/>
		<updated>2020-04-05T20:34:01Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|18866|This function gets the player's keyboard layout settings, which they are currently (keyboard layout can be changed at any moment) using at the time of invocation.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getKeyboardLayout ()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' with keyboard layout properties:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;cellpadding: 10px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Property || Values and description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;readingLayout&amp;lt;/code&amp;gt; ||&lt;br /&gt;
    {| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ltr&amp;quot;&amp;lt;/code&amp;gt; || Left to right (English)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;rtl&amp;quot;&amp;lt;/code&amp;gt; || Right to left (Arabic, Hebrew)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ttb-rtl-ltr&amp;quot;&amp;lt;/code&amp;gt; || Vertical top to bottom with columns to the left and also left to right (Japanese)&lt;br /&gt;
    |-&lt;br /&gt;
    | &amp;lt;code&amp;gt;&amp;quot;ttb-ltr&amp;quot;&amp;lt;/code&amp;gt; || Vertical top to bottom with columns proceeding to the right (Mongolian)&lt;br /&gt;
    |}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Example}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;layout&amp;quot;, function()&lt;br /&gt;
    outputConsole( inspect( getKeyboardLayout() ) )--output keyboard layout in console (F8)&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_utility_functions}}&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=65688</id>
		<title>DxGetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=65688"/>
		<updated>2020-04-05T20:30:40Z</updated>

		<summary type="html">&lt;p&gt;Motar2k: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the current blend mode for the dxDraw functions. The blend mode is set using [[dxSetBlendMode]]&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string dxGetBlendMode ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the current blend mode, which can be one of:&lt;br /&gt;
*'''blend'''&lt;br /&gt;
*'''add'''&lt;br /&gt;
*'''modulate_add'''&lt;br /&gt;
*'''overwrite'''&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;myBlendMode&amp;quot;, function()&lt;br /&gt;
    outputChatBox( dxGetBlendMode() )&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03782|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxGetBlendMode]]&lt;/div&gt;</summary>
		<author><name>Motar2k</name></author>
	</entry>
</feed>