<?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=J.Chaikos</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=J.Chaikos"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/J.Chaikos"/>
	<updated>2026-05-11T06:54:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientTrailerDetach&amp;diff=82154</id>
		<title>OnClientTrailerDetach</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientTrailerDetach&amp;diff=82154"/>
		<updated>2025-06-11T19:41:40Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: No player attribute clienside&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered when a trailer gets detached from its towing vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle towedBy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''towedBy:''' the vehicle that was towing the trailer.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the trailer that is now detached.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs to the player that's towing the trailer that &amp;quot;The vehicle is now detached&amp;quot;. (TESTED!)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;addEventHandler(&amp;quot;onClientTrailerDetach&amp;quot;,root,function(towedBy)&lt;br /&gt;
	player = getVehicleOccupant(towedBy,0)&lt;br /&gt;
	outputChatBox(&amp;quot;The vehicle is now detached.&amp;quot;)&lt;br /&gt;
end)&amp;lt;/syntaxhighlight&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;br /&gt;
[[es:onClientTrailerDetach]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineStreamingGetMemorySize&amp;diff=81604</id>
		<title>EngineStreamingGetMemorySize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineStreamingGetMemorySize&amp;diff=81604"/>
		<updated>2025-01-01T10:28:14Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: incorrect function name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.6.0|21874|Gets the maximum amount of RAM [in bytes] that can be used for streaming}}&lt;br /&gt;
{{Tip|The `showmemstat` command can be used to see this value in real-time [You might have to scroll down using PgDown on your keyboard]}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int engineStreamingGetMemorySize()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[EngineStreaming]]:getMemorySize|memorySize|engineStreamingSetMemorySize}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
The maximum amount of RAM [in bytes] that can be used for streaming. It is always a non-zero positive number.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a command that can be used to change the streaming memory size, and display the previous value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;ssms&amp;quot;, function(_, sizeMB)&lt;br /&gt;
    if tonumber(sizeMB) then&lt;br /&gt;
        outputChatBox(&amp;quot;The maximum streaming memory available has been changed from &amp;quot; .. math.floor(engineStreamingGetMemorySize() / 1024 / 1024) .. &amp;quot; MB to &amp;quot; .. sizeMB .. &amp;quot; MB&amp;quot;)      &lt;br /&gt;
        engineStreamingSetMemorySize(tonumber(sizeMB) * 1024 * 1024) -- Convert MB to Bytes&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Please enter a numeric value!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end, false, false)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineStreamingGetMemorySize&amp;diff=81603</id>
		<title>EngineStreamingGetMemorySize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineStreamingGetMemorySize&amp;diff=81603"/>
		<updated>2025-01-01T10:26:55Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: the compiler gives a nil value error for the outputChatbox function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.6.0|21874|Gets the maximum amount of RAM [in bytes] that can be used for streaming}}&lt;br /&gt;
{{Tip|The `showmemstat` command can be used to see this value in real-time [You might have to scroll down using PgDown on your keyboard]}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int engineStreamingGetMemorySize()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[EngineStreaming]]:getMemorySize|memorySize|engineStreamingSetMemorySize}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
The maximum amount of RAM [in bytes] that can be used for streaming. It is always a non-zero positive number.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a command that can be used to change the streaming memory size, and display the previous value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;ssms&amp;quot;, function(_, sizeMB)&lt;br /&gt;
    if tonumber(sizeMB) then&lt;br /&gt;
        outputChatBox(&amp;quot;The maximum streaming memory available has been changed from &amp;quot; .. math.floor(engineGetStreamingMemorySize() / 1024 / 1024) .. &amp;quot; MB to &amp;quot; .. sizeMB .. &amp;quot; MB&amp;quot;)      &lt;br /&gt;
        engineStreamingSetMemorySize(tonumber(sizeMB) * 1024 * 1024) -- Convert MB to Bytes&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Please enter a numeric value!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end, false, false)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=63478</id>
		<title>SetElementSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=63478"/>
		<updated>2019-07-27T05:25:52Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: When I'm use 'kph', I have only errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to set '''moving''' element speed in kph or mph units.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementSpeed (element theElement, [ int/string unit=&amp;quot;kph&amp;quot;, int speed=0 ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theElement''': Element you want to set speed of&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''unit''': Units in which speed should be set. This can be 1 or &amp;quot;mph&amp;quot; for mph, any other value for kph.&lt;br /&gt;
* '''speed''': Speed in selected unit&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
{{RequiredFunctions|getElementSpeed}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function setElementSpeed(element, unit, speed)&lt;br /&gt;
    local unit    = unit or 0&lt;br /&gt;
    local speed   = tonumber(speed) or 0&lt;br /&gt;
	local acSpeed = getElementSpeed(element, unit)&lt;br /&gt;
	if (acSpeed) then -- if true - element is valid, no need to check again&lt;br /&gt;
		local diff = speed/acSpeed&lt;br /&gt;
		if diff ~= diff then return false end -- if the number is a 'NaN' return false.&lt;br /&gt;
        local x, y, z = getElementVelocity(element)&lt;br /&gt;
		return setElementVelocity(element, x*diff, y*diff, z*diff)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return false&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server-side example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds command that set player vehicle speed to provided one (in predefined unit kph). Note: It doesn't care if player is driver or passenger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setmyspeed&amp;quot;,&lt;br /&gt;
function (player, cmd, arg1)&lt;br /&gt;
  local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
  if (veh) then&lt;br /&gt;
    setElementSpeed(veh, &amp;quot;km/h&amp;quot;, tonumber(arg1))&lt;br /&gt;
  else&lt;br /&gt;
    outputChatBox(&amp;quot;You have to sit in vehicle&amp;quot;, player)&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;
By '''varez'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=60259</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=60259"/>
		<updated>2018-11-04T10:13:53Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
author '''nL~J.Chaikos'''&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = &amp;quot;nil&amp;quot;,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMoved)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example rotate camera around vehicle by mouse.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isSpectating = false&lt;br /&gt;
local facing = 0&lt;br /&gt;
local vehicle = createVehicle(400, 0, 0, 6)&lt;br /&gt;
&lt;br /&gt;
function resetViewMode ()&lt;br /&gt;
    isSpectating = not isSpectating&lt;br /&gt;
    if isSpectating == false then&lt;br /&gt;
        setCameraTarget(localPlayer)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
addCommandHandler( &amp;quot;resetViewMode&amp;quot;, resetViewMode )&lt;br /&gt;
&lt;br /&gt;
function spectateVehicle ()&lt;br /&gt;
    if isSpectating == false then return end&lt;br /&gt;
	&lt;br /&gt;
    local x, y, z = getElementPosition(vehicle)&lt;br /&gt;
    local camX = x + math.cos( facing / math.pi * 180 ) * 5&lt;br /&gt;
    local camY = y + math.sin( facing / math.pi * 180 ) * 5&lt;br /&gt;
    setCameraMatrix( camX, camY, z+1, x, y, z )&lt;br /&gt;
    local turn = getCursorMoveOn()&lt;br /&gt;
	&lt;br /&gt;
    if turn == &amp;quot;right&amp;quot; then&lt;br /&gt;
        facing = facing + 0.00025&lt;br /&gt;
    elseif turn == &amp;quot;left&amp;quot; then&lt;br /&gt;
        facing = facing - 0.00025&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), spectateVehicle)&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=54116</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=54116"/>
		<updated>2018-03-16T15:11:13Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
author '''nL~J.Chaikos'''&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = &amp;quot;nil&amp;quot;,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMoved)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example rotate camera around vehicle by mouse.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isSpectating = false&lt;br /&gt;
local facing = 0&lt;br /&gt;
local vehicle = createVehicle(400, 0, 0, 6)&lt;br /&gt;
&lt;br /&gt;
function resetViewMode ()&lt;br /&gt;
    isSpectating = not isSpectating&lt;br /&gt;
    if isSpectating == false then&lt;br /&gt;
        setCameraTarget(localPlayer)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
function spectateVehicle ()&lt;br /&gt;
    if isSpectating == false then return end&lt;br /&gt;
	&lt;br /&gt;
    local x, y, z = getElementPosition(vehicle)&lt;br /&gt;
    local camX = x + math.cos( facing / math.pi * 180 ) * 5&lt;br /&gt;
    local camY = y + math.sin( facing / math.pi * 180 ) * 5&lt;br /&gt;
    setCameraMatrix( camX, camY, z+1, x, y, z )&lt;br /&gt;
    local turn = getCursorMoveOn()&lt;br /&gt;
	&lt;br /&gt;
    if turn == &amp;quot;right&amp;quot; then&lt;br /&gt;
        facing = facing + 0.00025&lt;br /&gt;
    elseif turn == &amp;quot;left&amp;quot; then&lt;br /&gt;
        facing = facing - 0.00025&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), spectateVehicle)&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getAccounts&amp;diff=53199</id>
		<title>RU/getAccounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getAccounts&amp;diff=53199"/>
		<updated>2017-12-22T17:27:04Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Пример использования */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{RU/Server function}}&lt;br /&gt;
Эта функция получает таблицу cо всеми [[RU/Account|аккаунтами]], находящимися в ''internal.db'' (''accounts.xml'' не используется после версии 1.0.4)&lt;br /&gt;
==Синтаксис==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAccounts()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{RU/OOP|Эта функция является статической функцией класса account.|[[RU/Account|Account]].getAll||}}&lt;br /&gt;
===Возвращаемые значения===&lt;br /&gt;
[[RU/Table|Таблицу]] со всеми аккаунтами, находящимися в ''internal.db''. Эта таблица может быть пустой.&lt;br /&gt;
&lt;br /&gt;
==Пример использования==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Сервер&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;
function printAmountOfAccounts(thePlayer)&lt;br /&gt;
    local accountTable = getAccounts() --возвращает таблицу со всеми аккаунтами сервера&lt;br /&gt;
    if(#accountTable) == 0 then --если массив пуст&lt;br /&gt;
        outputChatBox(&amp;quot;В базе данных нет аккаунтов&amp;quot;, thePlayer)&lt;br /&gt;
    else --если массив не пуст&lt;br /&gt;
        outputChatBox(&amp;quot;Всего &amp;quot; .. #accountTable .. &amp;quot; аккаунтов зарегистрировано в базе данных&amp;quot;, thePlayer)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;accountcount&amp;quot;, printAmountOfAccounts)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/Account functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:getAccounts]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getAccounts&amp;diff=53198</id>
		<title>RU/getAccounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getAccounts&amp;diff=53198"/>
		<updated>2017-12-22T17:25:40Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{RU/Server function}}&lt;br /&gt;
Эта функция получает таблицу cо всеми [[RU/Account|аккаунтами]], находящимися в ''internal.db'' (''accounts.xml'' не используется после версии 1.0.4)&lt;br /&gt;
==Синтаксис==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAccounts()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{RU/OOP|Эта функция является статической функцией класса account.|[[RU/Account|Account]].getAll||}}&lt;br /&gt;
===Возвращаемые значения===&lt;br /&gt;
[[RU/Table|Таблицу]] со всеми аккаунтами, находящимися в ''internal.db''. Эта таблица может быть пустой.&lt;br /&gt;
&lt;br /&gt;
==Пример использования==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Сервер&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function printAmountOfAccounts(thePlayer)&lt;br /&gt;
    local accountTable = getAccounts() --возвращает таблицу со всеми аккаунтами сервера&lt;br /&gt;
    if(#accountTable) == 0 then --если массив пуст&lt;br /&gt;
        outputChatBox(&amp;quot;В базе данных нет аккаунтов&amp;quot;, thePlayer)&lt;br /&gt;
    else --если массив не пуст&lt;br /&gt;
        outputChatBox(&amp;quot;Всего &amp;quot; .. #accountTable .. &amp;quot; аккаунтов зарегистрировано в базе данных&amp;quot;, thePlayer)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;accountcount&amp;quot;, printAmountOfAccounts)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/Account functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:getAccounts]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerHitByWaterCannon&amp;diff=52917</id>
		<title>OnClientPlayerHitByWaterCannon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerHitByWaterCannon&amp;diff=52917"/>
		<updated>2017-11-25T17:37:16Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is fired when a player is hit by a water cannon.&lt;br /&gt;
{{Note|This event is only triggered for players 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;
player playerHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''playerHit:''' the player which got shot by the water cannon&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the vehicle who shot the water cannon.&lt;br /&gt;
&lt;br /&gt;
==Type==&lt;br /&gt;
This event is a pre reaction event meaning it occurs before any game level reaction to the collision which include:&lt;br /&gt;
* Players flying off&lt;br /&gt;
* Players being knocked down&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the Player will not be knocked down&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example outputs a message when you are hit by a water cannon&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerHitByWaterCannon&amp;quot;,getRootElement(),&lt;br /&gt;
    function(player)&lt;br /&gt;
        local driver = getVehicleOccupant(source)&lt;br /&gt;
        if isElement(driver) then&lt;br /&gt;
            outputChatBox(getPlayerName(player)..&amp;quot; is hit by the cannon of &amp;quot;..getPlayerName(driver)..&amp;quot;'s vehicle.&amp;quot;)&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52916</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52916"/>
		<updated>2017-11-24T09:37:27Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
author '''nL~J.Chaikos'''&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = &amp;quot;nil&amp;quot;,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example rotate camera around vehicle by mouse.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isSpectating = false&lt;br /&gt;
local facing = 0&lt;br /&gt;
local vehicle = createVehicle(400, 0, 0, 6)&lt;br /&gt;
&lt;br /&gt;
function resetViewMode ()&lt;br /&gt;
    isSpectating = not isSpectating&lt;br /&gt;
    if isSpectating == false then&lt;br /&gt;
        setCameraTarget(localPlayer)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
function spectateVehicle ()&lt;br /&gt;
    if isSpectating == false then return end&lt;br /&gt;
	&lt;br /&gt;
    local x, y, z = getElementPosition(vehicle)&lt;br /&gt;
    local camX = x + math.cos( facing / math.pi * 180 ) * 5&lt;br /&gt;
    local camY = y + math.sin( facing / math.pi * 180 ) * 5&lt;br /&gt;
    setCameraMatrix( camX, camY, z+1, x, y, z )&lt;br /&gt;
    local turn = getCursorMoveOn()&lt;br /&gt;
	&lt;br /&gt;
    if turn == &amp;quot;right&amp;quot; then&lt;br /&gt;
        facing = facing + 0.00025&lt;br /&gt;
    elseif turn == &amp;quot;left&amp;quot; then&lt;br /&gt;
        facing = facing - 0.00025&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), spectateVehicle)&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52915</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52915"/>
		<updated>2017-11-24T09:36:48Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
author '''nL~J.Chaikos'''&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = &amp;quot;nil&amp;quot;,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isSpectating = false&lt;br /&gt;
local facing = 0&lt;br /&gt;
local vehicle = createVehicle(400, 0, 0, 6)&lt;br /&gt;
&lt;br /&gt;
function resetViewMode ()&lt;br /&gt;
    isSpectating = not isSpectating&lt;br /&gt;
    if isSpectating == false then&lt;br /&gt;
        setCameraTarget(localPlayer)&lt;br /&gt;
    end&lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
function spectateVehicle ()&lt;br /&gt;
    if isSpectating == false then return end&lt;br /&gt;
	&lt;br /&gt;
    local x, y, z = getElementPosition(vehicle)&lt;br /&gt;
    local camX = x + math.cos( facing / math.pi * 180 ) * 5&lt;br /&gt;
    local camY = y + math.sin( facing / math.pi * 180 ) * 5&lt;br /&gt;
    setCameraMatrix( camX, camY, z+1, x, y, z )&lt;br /&gt;
    local turn = getCursorMoveOn()&lt;br /&gt;
	&lt;br /&gt;
    if turn == &amp;quot;right&amp;quot; then&lt;br /&gt;
        facing = facing + 0.00025&lt;br /&gt;
    elseif turn == &amp;quot;left&amp;quot; then&lt;br /&gt;
        facing = facing - 0.00025&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), spectateVehicle)&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52914</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52914"/>
		<updated>2017-11-24T09:30:17Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = &amp;quot;nil&amp;quot;,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMovedOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&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;
&lt;br /&gt;
By '''nL~J.Chaikos'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=52913</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=52913"/>
		<updated>2017-11-24T09:27:57Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Cursor functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[setAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to change an existing account's name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeAccountData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove data from account .&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a number of 2D lines in order to achieve a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elements functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[Byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts and formats large numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthM]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives you the real months name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthH]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function convert english months to arabic months&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hexadecimal numbers (colors, for example) from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all Players In Group .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDimensionEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns id Dimension Empty .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» These functions are able to sort your tables by a key.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle funcions === &lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the respawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the nearest vehicle to the specified player in a specified distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCursorOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the cursor is in a particular area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[thisCommandHandlersExist]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks a string if this exist as command Handlers&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52911</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52911"/>
		<updated>2017-11-20T17:11:36Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = nil,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMovedOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMovedOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&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;
&lt;br /&gt;
By '''nL~J.Chaikos'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52910</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52910"/>
		<updated>2017-11-20T17:10:51Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMovedOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = nil,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMoveOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMovedOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&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;
&lt;br /&gt;
By '''nL~J.Chaikos'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52909</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52909"/>
		<updated>2017-11-20T17:09:52Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving, it's updated version of https://wiki.multitheftauto.com/wiki/GetCursorMoveOn.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = nil,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMoveOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMoved(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52908</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52908"/>
		<updated>2017-11-20T17:08:48Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
    y = 0,&lt;br /&gt;
    move = nil,&lt;br /&gt;
    timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMoveOn()&lt;br /&gt;
    return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMove(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
            cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
	    end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52907</id>
		<title>GetCursorMovedOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMovedOn&amp;diff=52907"/>
		<updated>2017-11-20T17:08:00Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: Created page with &amp;quot;{{Useful Function}} __NOTOC__ This function checks in which way the cursor is currently moving. ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlig...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks in which way the cursor is currently moving.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns &amp;quot;left&amp;quot;, &amp;quot;right&amp;quot;, &amp;quot;up&amp;quot; or &amp;quot;down&amp;quot;, &amp;quot;nil&amp;quot; if cursor didn't move.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
local cP = {&lt;br /&gt;
    x = 0,&lt;br /&gt;
	y = 0,&lt;br /&gt;
	move = nil,&lt;br /&gt;
	timer = false,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCursorMoveOn()&lt;br /&gt;
	return cP.move&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onClientCursorMove(cursorX, cursorY)&lt;br /&gt;
    if not isCursorShowing() then return end&lt;br /&gt;
&lt;br /&gt;
	if cursorX &amp;gt; cP.x then&lt;br /&gt;
        cP.move = &amp;quot;right&amp;quot;&lt;br /&gt;
	elseif cursorX &amp;lt; cP.x then&lt;br /&gt;
	    cP.move = &amp;quot;left&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;gt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;up&amp;quot;&lt;br /&gt;
	elseif cursorY &amp;lt; cP.y then&lt;br /&gt;
	    cP.move = &amp;quot;down&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
	cP.x = cursorX&lt;br /&gt;
	cP.y = cursorY&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	if isTimer(cP.timer) then&lt;br /&gt;
	    killTimer(cP.timer)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	cP.timer = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		    cP.move = &amp;quot;nil&amp;quot;&lt;br /&gt;
		end, 50, 1&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,onClientCursorMove)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnDgsComboBoxSelect&amp;diff=52809</id>
		<title>OnDgsComboBoxSelect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsComboBoxSelect&amp;diff=52809"/>
		<updated>2017-11-11T10:13:06Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is fired when the item of a DGS combo box is selected.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
integer previous, integer current&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''previous''':  The item id that last selected.&lt;br /&gt;
* '''current''': The item id that got selected.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the combo box element that got its item selected.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs a message with the selected item when an item is selected.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
comboBox = DGS:dgsDxCreateComboBox(500,400,200,30,false)&lt;br /&gt;
for i=1,20 do&lt;br /&gt;
	DGS:dgsDxComboBoxAddItem(comboBox ,i)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onSelected(previous,current)&lt;br /&gt;
	outputChatBox(&amp;quot;Last Selection:&amp;quot;..(previous or &amp;quot;None&amp;quot;)..&amp;quot;;Current Selection:&amp;quot;..(current or &amp;quot;None&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientDgsDxComboBoxSelect&amp;quot;,getRootElement(),onSelected)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===DGS events===&lt;br /&gt;
{{DGSEVENTS}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Category:%D0%9E%D0%B1%D1%8A%D0%B5%D0%BA%D1%82&amp;diff=50894</id>
		<title>Category:Объект</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Category:%D0%9E%D0%B1%D1%8A%D0%B5%D0%BA%D1%82&amp;diff=50894"/>
		<updated>2017-05-08T11:13:24Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Класс &amp;quot;объект&amp;quot; является статической 3D моделью в мире GTA. Ими являются только созданные на сервере модели. Модели, входящие в GTA по умолчанию, объектами не являются. 	&lt;br /&gt;
Примеры объектов включают создание моделей, дорог и местностей.&lt;br /&gt;
&lt;br /&gt;
Тип элемента этого класса '''&amp;quot;object&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
==XML-синтаксис==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;object model=&amp;quot;&amp;quot; posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; rotX=&amp;quot;&amp;quot; rotY=&amp;quot;&amp;quot; rotZ=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Обязательные аргументы===&lt;br /&gt;
* '''model''': ID обьекта - используется для упрощения поиска объектов используя getElementByID() функцию или object browser в редакторе карт.&lt;br /&gt;
* '''posX''': Переменная типа float координата X обьекта.&lt;br /&gt;
* '''posY''': Переменная типа float координата Y обьекта.&lt;br /&gt;
* '''posZ''': Переменная типа float координата Z обьекта.&lt;br /&gt;
&lt;br /&gt;
===Дополнительные аргументы===&lt;br /&gt;
* '''rotX''': Переменная типа float угол поворота X в градусах.&lt;br /&gt;
* '''rotY''': Переменная типа float угол поворота Y в градусах.&lt;br /&gt;
* '''rotZ''': Переменная типа float угол поворота Z в градусах.&lt;br /&gt;
&lt;br /&gt;
==Связанные функции==&lt;br /&gt;
{{Object functions}}&lt;br /&gt;
[[Category:Element Types]]&lt;br /&gt;
[[Category:Incomplete]]&lt;br /&gt;
[[en:Element/Object]]&lt;br /&gt;
[[it:Elemento/Oggetto]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedTarget&amp;diff=50893</id>
		<title>GetPedTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedTarget&amp;diff=50893"/>
		<updated>2017-05-08T07:08:41Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function is used to get the element a [[ped]] is currently targeting.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element getPedTarget ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{OOP||[[ped]]:getTarget}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' The [[ped]] whose target you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the [[element]] that's being targeted, or ''false'' if there isn't one.&lt;br /&gt;
&lt;br /&gt;
This is only effective on physical GTA elements, namely:&lt;br /&gt;
* Players&lt;br /&gt;
* Peds&lt;br /&gt;
* Vehicles&lt;br /&gt;
* Objects&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;
This example blows up any vehicle a player targets (aims at).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerTargetCheck ( )&lt;br /&gt;
    local target&lt;br /&gt;
    for i, thePlayer in ipairs ( getElementsByType(&amp;quot;player&amp;quot;) ) do  -- iterate over all players&lt;br /&gt;
        target = getPedTarget ( thePlayer )                        -- get the target of the current player&lt;br /&gt;
        if ( target ) then                                         -- if there was a target&lt;br /&gt;
            if ( getElementType ( target ) == &amp;quot;vehicle&amp;quot; ) then     -- and the target is a vehicle&lt;br /&gt;
                blowVehicle ( target )                             -- blow it up&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
setTimer ( playerTargetCheck, 1000, 0 )                            -- call the check function every second&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: A more efficient way to do this would be to use the [[onPlayerTarget]] event.''&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetRadarAreaColor&amp;diff=49899</id>
		<title>SetRadarAreaColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetRadarAreaColor&amp;diff=49899"/>
		<updated>2016-12-04T16:11:10Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Sets the color of an existing radar area.&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 setRadarAreaColor ( areaName area, int r, int g, int b, int a )               &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[radararea]]:setColor}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''area''' name of area, that you want to change color&lt;br /&gt;
*'''r:''' an integer representing the amount of red in the color (0 for no red, 255 for solid red)&lt;br /&gt;
*'''g:''' an integer representing the amount of green in the color (0 for no green, 255 for solid green)&lt;br /&gt;
*'''b:''' an integer representing the amount of blue in the color (0 for no blue, 255 for solid blue)&lt;br /&gt;
*'''a:''' an integer representing the color's alpha (0 for transparent, 255 for opaque)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the color was set successfully, ''false'' if the radar area doesn't exist or the color arguments are improper.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a radar area and changes its color right away:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
someArea = createRadarArea ( 1024, 1024, 75, 100, 0, 0, 0, 255 ) -- create a black radar area&lt;br /&gt;
local flag = setRadarAreaColor ( someArea, 255, 85, 85, 170 )    -- change its color&lt;br /&gt;
if ( flag ) then                                                 -- if the function returned true...&lt;br /&gt;
   outputChatBox ( &amp;quot;Color set successfully!&amp;quot; )&lt;br /&gt;
else                                                             -- if the function returned false...&lt;br /&gt;
   outputChatBox ( &amp;quot;Failed to set color.&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetRadarAreaColor&amp;diff=49898</id>
		<title>SetRadarAreaColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetRadarAreaColor&amp;diff=49898"/>
		<updated>2016-12-04T16:05:45Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Sets the color of an existing radar area.&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 setRadarAreaColor ( float x, float y, float x size, float y size, int r, int g, int b, int a )               &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[radararea]]:setColor}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' x position of your area&lt;br /&gt;
*'''y:''' y position of your area&lt;br /&gt;
*'''x size:''' width of your area&lt;br /&gt;
*'''y size:''' height of your area&lt;br /&gt;
*'''r:''' an integer representing the amount of red in the color (0 for no red, 255 for solid red)&lt;br /&gt;
*'''g:''' an integer representing the amount of green in the color (0 for no green, 255 for solid green)&lt;br /&gt;
*'''b:''' an integer representing the amount of blue in the color (0 for no blue, 255 for solid blue)&lt;br /&gt;
*'''a:''' an integer representing the color's alpha (0 for transparent, 255 for opaque)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the color was set successfully, ''false'' if the radar area doesn't exist or the color arguments are improper.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a radar area and changes its color right away:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
someArea = createRadarArea ( 1024, 1024, 75, 100, 0, 0, 0, 255 ) -- create a black radar area&lt;br /&gt;
local flag = setRadarAreaColor ( someArea, 255, 85, 85, 170 )    -- change its color&lt;br /&gt;
if ( flag ) then                                                 -- if the function returned true...&lt;br /&gt;
   outputChatBox ( &amp;quot;Color set successfully!&amp;quot; )&lt;br /&gt;
else                                                             -- if the function returned false...&lt;br /&gt;
   outputChatBox ( &amp;quot;Failed to set color.&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49891</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49891"/>
		<updated>2016-12-01T18:37:00Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function stops the [[sound]] [[element]] slowly.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': The sound element that needs to be stopped.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully stopped, ''false'' if the sound is not found.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    if not isElement(sElement) then return false end&lt;br /&gt;
    local sound_timer_quant = getSoundVolume(sElement)&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
      function ()&lt;br /&gt;
        local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
        setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	if soundVolume &amp;gt;= 0 then &lt;br /&gt;
          stopSound(sElement) end&lt;br /&gt;
	end,400,sound_timer_quant*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49890</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49890"/>
		<updated>2016-12-01T18:35:26Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function stops the [[sound]] [[element]] slowly.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': The sound element that needs to be stopped.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully stopped, ''false'' if the sound is not found.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    if not isElement(sElement) then return false end&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
      function ()&lt;br /&gt;
        local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
        setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	if soundVolume &amp;gt;= 0 then &lt;br /&gt;
          stopSound(sElement) end&lt;br /&gt;
	end,400,soundVolume*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49889</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49889"/>
		<updated>2016-12-01T18:33:48Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function stops the [[sound]] [[element]] slowly.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': The sound element that needs to be stopped.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully stopped, ''false'' if the sound is not found.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    if not isElement(sElement) then return false end&lt;br /&gt;
	local slowlyStop = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
                    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
		    setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
			if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
		end,400,soundVolume*2&lt;br /&gt;
	)&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySoundFrontEnd&amp;diff=49867</id>
		<title>PlaySoundFrontEnd</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySoundFrontEnd&amp;diff=49867"/>
		<updated>2016-11-21T17:16:30Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function plays a frontend sound for the specified player.&lt;br /&gt;
{{Note|These sounds can be disabled with [[setWorldSoundEnabled]] so if these sounds stop working you should check if you're disabling the sounds.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool playSoundFrontEnd ( player thePlayer, int sound )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[player]]:playSoundFrontEnd}}}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' the [[player]] you want the sound to play for.&lt;br /&gt;
*'''sound:''' a whole [[int]] specifying the sound id to play. Valid values are:&lt;br /&gt;
{{Sounds}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool playSoundFrontEnd ( int sound )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[Sound]].playFrontEnd}}}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' a whole [[int]] specifying the sound id to play. Valid values are:&lt;br /&gt;
{{Sounds}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully played, ''false'' otherwise.&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;
This example plays a sound when a player spawns.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerSpawn ( theSpawnpoint, theTeam )&lt;br /&gt;
    playSoundFrontEnd ( source, 16 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerSpawn&amp;quot;, root, onPlayerSpawn )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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 plays a sound when the player types the command '/sound'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onSoundEvent ( )&lt;br /&gt;
    playSoundFrontEnd ( 16 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sound&amp;quot;, onSoundEvent)&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_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[de:playSoundFrontEnd]]&lt;br /&gt;
[[ar:playSoundFrontEnd]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySoundFrontEnd&amp;diff=49866</id>
		<title>PlaySoundFrontEnd</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySoundFrontEnd&amp;diff=49866"/>
		<updated>2016-11-21T17:16:19Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function plays a frontend sound for the specified player.&lt;br /&gt;
{{Note|These sounds can be disabled with [[setWorldSoundEnabled]] so if these sounds stop working you should check if you're disabling the sounds.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool playSoundFrontEnd ( player thePlayer, int sound )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[player]]:playSoundFrontEnd}}}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' the [[player]] you want the sound to play for.&lt;br /&gt;
*'''sound:''' a whole [[int]] specifying the sound id to play. Valid values are:&lt;br /&gt;
{{Sounds}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool playSoundFrontEnd ( int sound )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[Sound]].playFrontEnd}}}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' a whole [[int]] specifying the sound id to play. Valid values are:&lt;br /&gt;
{{Sounds}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully played, ''false'' otherwise.&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;
This example plays a sound when a player spawns.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerSpawn ( theSpawnpoint, theTeam )&lt;br /&gt;
    playSoundFrontEnd ( source, 16 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerSpawn&amp;quot;, root, onPlayerSpawn )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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 plays a sound when the player types the command '/sound'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onSoundEvent ( )&lt;br /&gt;
    playSoundFrontEnd ( 16 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sound&amp;quot;, привет)&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_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[de:playSoundFrontEnd]]&lt;br /&gt;
[[ar:playSoundFrontEnd]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=49840</id>
		<title>GetSoundSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=49840"/>
		<updated>2016-11-11T16:22:39Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the playback speed of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getSoundSpeed ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:getSpeed|speed|setSoundSpeed}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] which playback speed you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[float]] value indicating the playback speed of the [[sound]] [[element]]. Default sound playback speed is '''1.0'''.&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;
function outputSpeed(soundname) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/&amp;quot;..tostring(soundname)..&amp;quot;.mp3&amp;quot;) --Play the sound from the sounds folder&lt;br /&gt;
	setSoundVolume(sound, 0.5) -- set the sound volume to 50%&lt;br /&gt;
	outputChatBox(&amp;quot;The sound speed : &amp;quot;..getSoundSpeed(sound)) -- output the sound speed&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;soundspeed&amp;quot;,outputSpeed)&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_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:getSoundSpeed]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=49839</id>
		<title>GetSoundSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=49839"/>
		<updated>2016-11-11T16:22:29Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This хуй is used to return the playback speed of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getSoundSpeed ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:getSpeed|speed|setSoundSpeed}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] which playback speed you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[float]] value indicating the playback speed of the [[sound]] [[element]]. Default sound playback speed is '''1.0'''.&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;
function outputSpeed(soundname) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/&amp;quot;..tostring(soundname)..&amp;quot;.mp3&amp;quot;) --Play the sound from the sounds folder&lt;br /&gt;
	setSoundVolume(sound, 0.5) -- set the sound volume to 50%&lt;br /&gt;
	outputChatBox(&amp;quot;The sound speed : &amp;quot;..getSoundSpeed(sound)) -- output the sound speed&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;soundspeed&amp;quot;,outputSpeed)&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_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:getSoundSpeed]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getRealTime&amp;diff=49734</id>
		<title>RU/getRealTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getRealTime&amp;diff=49734"/>
		<updated>2016-11-01T11:21:24Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{RU/Server client function}}&lt;br /&gt;
This function gets the server or client (if used client sided it returns time as set on client's computer) real time and returns it in a table. If you want to get the in-game time (shown on GTA's clock) use [[getTime]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getRealTime( [int seconds = current] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''seconds:''' A count in seconds from the year 1970.  Useful for storing points in time, or for retrieving time information for [[getBanTime]]. The valid range of this argument is 0 to 32,000,000,000&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' of substrings with different time format or ''false'' if the '''seconds''' argument is out of range.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;2&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 95%;&amp;quot;&lt;br /&gt;
|'''Member'''&lt;br /&gt;
|'''Meaning'''&lt;br /&gt;
|'''Range'''&lt;br /&gt;
|-&lt;br /&gt;
|Секунды&lt;br /&gt;
|seconds after the minute&lt;br /&gt;
|0-61*&lt;br /&gt;
|-&lt;br /&gt;
|Минуты&lt;br /&gt;
|minutes after the hour&lt;br /&gt;
|0-59&lt;br /&gt;
|-&lt;br /&gt;
|Часы&lt;br /&gt;
|hours since midnight&lt;br /&gt;
|0-23&lt;br /&gt;
|-&lt;br /&gt;
|Месяца&lt;br /&gt;
|День месяца&lt;br /&gt;
|1-31&lt;br /&gt;
|-&lt;br /&gt;
|month&lt;br /&gt;
|months since January&lt;br /&gt;
|0-11&lt;br /&gt;
|-&lt;br /&gt;
|Год&lt;br /&gt;
|years since 1900&lt;br /&gt;
|-&lt;br /&gt;
|День Недели&lt;br /&gt;
|days since Sunday&lt;br /&gt;
|0-6&lt;br /&gt;
|-&lt;br /&gt;
|yearday&lt;br /&gt;
|days since January 1&lt;br /&gt;
|0-365&lt;br /&gt;
|-&lt;br /&gt;
|isdst&lt;br /&gt;
|Daylight Saving Time flag&lt;br /&gt;
|-&lt;br /&gt;
|timestamp&lt;br /&gt;
|seconds since 1970 (MTA 1.1 +)&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* tm_sec is generally 0-59. Extra range to accommodate for leap seconds in certain systems.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs local time (server or client, where ever it was triggered) as hours and minutes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function showtime ()&lt;br /&gt;
	local time = getRealTime()&lt;br /&gt;
	local hours = time.hour&lt;br /&gt;
	local minutes = time.minute&lt;br /&gt;
	outputChatBox ( &amp;quot;Время сервера: &amp;quot;..hours..&amp;quot;:&amp;quot;..minutes )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[en:GetRealTime]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getRealTime&amp;diff=49733</id>
		<title>RU/getRealTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getRealTime&amp;diff=49733"/>
		<updated>2016-11-01T11:20:50Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{RU/Server client function}}&lt;br /&gt;
This function gets the server or client (if used client sided it returns time as set on client's computer) real time and returns it in a table. If you want to get the in-game time (shown on GTA's clock) use [[getTime]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getRealTime( [int seconds = current] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''seconds:''' A count in seconds from the year 1970.  Useful for storing points in time, or for retrieving time information for [[getBanTime]]. The valid range of this argument is 0 to 32,000,000,000&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' of substrings with different time format or ''false'' if the '''seconds''' argument is out of range.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;2&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 95%;&amp;quot;&lt;br /&gt;
|'''Member'''&lt;br /&gt;
|'''Meaning'''&lt;br /&gt;
|'''Range'''&lt;br /&gt;
|-&lt;br /&gt;
|Секунды&lt;br /&gt;
|seconds after the minute&lt;br /&gt;
|0-61*&lt;br /&gt;
|-&lt;br /&gt;
|Минуты&lt;br /&gt;
|minutes after the hour&lt;br /&gt;
|0-59&lt;br /&gt;
|-&lt;br /&gt;
|Часы&lt;br /&gt;
|hours since midnight&lt;br /&gt;
|0-23&lt;br /&gt;
|-&lt;br /&gt;
|Месяца&lt;br /&gt;
|day of the month&lt;br /&gt;
|1-31&lt;br /&gt;
|-&lt;br /&gt;
|month&lt;br /&gt;
|months since January&lt;br /&gt;
|0-11&lt;br /&gt;
|-&lt;br /&gt;
|Год&lt;br /&gt;
|years since 1900&lt;br /&gt;
|-&lt;br /&gt;
|День Недели&lt;br /&gt;
|days since Sunday&lt;br /&gt;
|0-6&lt;br /&gt;
|-&lt;br /&gt;
|yearday&lt;br /&gt;
|days since January 1&lt;br /&gt;
|0-365&lt;br /&gt;
|-&lt;br /&gt;
|isdst&lt;br /&gt;
|Daylight Saving Time flag&lt;br /&gt;
|-&lt;br /&gt;
|timestamp&lt;br /&gt;
|seconds since 1970 (MTA 1.1 +)&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
* tm_sec is generally 0-59. Extra range to accommodate for leap seconds in certain systems.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs local time (server or client, where ever it was triggered) as hours and minutes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function showtime ()&lt;br /&gt;
	local time = getRealTime()&lt;br /&gt;
	local hours = time.hour&lt;br /&gt;
	local minutes = time.minute&lt;br /&gt;
	outputChatBox ( &amp;quot;Время сервера: &amp;quot;..hours..&amp;quot;:&amp;quot;..minutes )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[en:GetRealTime]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49721</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49721"/>
		<updated>2016-10-29T15:22:46Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Вернет ''false'' в том случаи,если звуковой элемент не найден.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    if not isElement(sElement) then return false end&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
	local slowlyStop = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		    setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
			if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
		end,400,soundVolume*2&lt;br /&gt;
	)&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=49720</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=49720"/>
		<updated>2016-10-29T15:22:19Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Sound functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== ACL functions ===&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[setAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to change an existing account's name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a number of 2D lines in order to achieve a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elements functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts and formats large numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hex color codes from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all Players In Group .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[SlowlyMusicStop]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle funcions === &lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the respawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[createAnimation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCursorOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the cursor is in a particular area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=49719</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=49719"/>
		<updated>2016-10-29T15:21:19Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Sound functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== ACL functions ===&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[setAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to change an existing account's name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a number of 2D lines in order to achieve a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elements functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts and formats large numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hex color codes from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all Players In Group .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle funcions === &lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the respawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[createAnimation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCursorOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the cursor is in a particular area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49718</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49718"/>
		<updated>2016-10-29T15:19:57Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Вернет ''false'' в том случаи,если звуковой элемент не найден.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    if not isElement(sElement) then return false end&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
	local slowlyStop = setTimer(&lt;br /&gt;
	    function ()&lt;br /&gt;
		    setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
			if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
		end,400,soundVolume*2&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49717</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49717"/>
		<updated>2016-10-29T15:16:15Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''sound''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
        function ()&lt;br /&gt;
            setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	    if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
        end,400,soundVolume*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49716</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49716"/>
		<updated>2016-10-29T15:15:44Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''element''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
        function ()&lt;br /&gt;
            setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	    if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
        end,400,soundVolume*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
        stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49715</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49715"/>
		<updated>2016-10-29T15:15:11Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''element''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
        function ()&lt;br /&gt;
            setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	    if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
        end,400,soundVolume*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
	    stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49714</id>
		<title>StopSoundSlowly</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSoundSlowly&amp;diff=49714"/>
		<updated>2016-10-29T15:14:29Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: Music Stop Slowly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция останавливает звуковой элемент постепенно. Создается эффект затухания звукового элемента.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int stopSoundSlowly( element sound )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''element''': звуковой элемент, который нужно остановить.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside Script&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;
function stopSoundSlowly (sElement)&lt;br /&gt;
    local soundVolume = getSoundVolume(sElement)&lt;br /&gt;
    local slowlyStop = setTimer(&lt;br /&gt;
        function ()&lt;br /&gt;
            setSoundVolume(sElement,soundVolume - 0.5)&lt;br /&gt;
	    if soundVolume &amp;gt;= 0 then stopSound(sElement) end&lt;br /&gt;
        end,400,soundVolume*2&lt;br /&gt;
    )&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&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;stopS&amp;quot;,&lt;br /&gt;
    function (command,sound)&lt;br /&gt;
	    stopSoundSlowly (sound)&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;
Author: J.Chaikos&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49713</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49713"/>
		<updated>2016-10-29T14:48:14Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Это функция используется для отображения статуса выбранного [[звукового элемента]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
Если элемент это [[игрок]], функция использует звук с микрофона игрока.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( звуковой элемент )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' Звуковой элемент, статус которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Этот пример проверит стоит ли звуковой элемент на паузе или нет, и отобразит ответ игроку.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент на паузе!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент не на паузе!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Добавлено использование звука с микрофона игрока}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49712</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49712"/>
		<updated>2016-10-29T14:47:36Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Это функция используется для отображения статуса выбранного [[звукового]] [[элемента]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
Если элемент это [[игрок]], функция использует звук с микрофона игрока.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( звуковой элемент )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' Звуковой элемент, статус которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Этот пример проверит стоит ли звуковой элемент на паузе или нет, и отобразит ответ игроку.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент на паузе!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент не на паузе!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Добавлено использование звука с микрофона игрока}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49711</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49711"/>
		<updated>2016-10-29T14:44:45Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current pause state of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
If the element is a [[player]], this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' Звуковой элемент, статус которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Этот пример проверит стоит ли звуковой элемент на паузе или нет, и отобразит ответ игроку.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент на паузе!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент не на паузе!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49710</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49710"/>
		<updated>2016-10-29T14:44:20Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current pause state of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
If the element is a [[player]], this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' '''Звуковой элемент''',статус которого вы хотите вернуть. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Этот пример проверит стоит ли звуковой элемент на паузе или нет, и отобразит ответ игроку.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент на паузе!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент не на паузе!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49709</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49709"/>
		<updated>2016-10-29T14:42:53Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current pause state of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
If the element is a [[player]], this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Этот пример проверит стоит ли звуковой элемент на паузе или нет, и отобразит ответ игроку.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент на паузе!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Звуковой элемент не на паузе!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49708</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49708"/>
		<updated>2016-10-29T14:39:23Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current pause state of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
If the element is a [[player]], this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Ответ будет ''true'' если указанный звуковой элемент на паузе, ''false'' если звуковой элемент снят с паузы,или не найден.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will check and see if the sound is paused or not, and tell the player.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;The sound is paused!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;The sound is not paused!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49707</id>
		<title>IsSoundPaused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundPaused&amp;diff=49707"/>
		<updated>2016-10-29T14:38:02Z</updated>

		<summary type="html">&lt;p&gt;J.Chaikos: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current pause state of the specified [[sound]] [[element]].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.2||&lt;br /&gt;
If the element is a [[player]], this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundPaused ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] которого вы хотите вернуть.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the [[sound]] [[element]] is paused, ''false'' if unpaused or invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will check and see if the sound is paused or not, and tell the player.&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;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function checkSongPause()&lt;br /&gt;
    local pause = isSoundPaused(theSound)&lt;br /&gt;
    if(pause == true) then&lt;br /&gt;
        outputChatBox(&amp;quot;The sound is paused!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;The sound is not paused!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkpause&amp;quot;, checkSongPause)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isSoundPaused]]&lt;/div&gt;</summary>
		<author><name>J.Chaikos</name></author>
	</entry>
</feed>