<?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=Toliak</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=Toliak"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Toliak"/>
	<updated>2026-05-13T00:16:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleTurnVelocity&amp;diff=72014</id>
		<title>GetVehicleTurnVelocity</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleTurnVelocity&amp;diff=72014"/>
		<updated>2021-09-04T18:15:47Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Spacing fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
{{Deprecated|getElementAngularVelocity|This function will be deprecated in '''1.5.6'''}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used to retrieve a vehicle's turning velocity for each axis.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float float float getVehicleTurnVelocity ( vehicle theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[vehicle]]:getTurnVelocity|turnVelocity|setVehicleTurnVelocity}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get the turning velocities of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns 3 ''floats'' that represent the vehicle's turning velocity on the x, y and z axis or ''false'' if wrong arguments were passed.&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 shows the current turn velocity of the vehicle that you're in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;geturnvelocity&amp;quot;, function(player)&lt;br /&gt;
    if not isPedInVehicle(player) then return end&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
    local vx, vy, vz = getVehicleTurnVelocity(veh)&lt;br /&gt;
    outputChatBox(&amp;quot;Vehicle's turn velocity is: X: &amp;quot;..vx..&amp;quot; Y: &amp;quot;..vy..&amp;quot; Z: &amp;quot;..vz, player, 0, 255, 0, 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;
==See Also==&lt;br /&gt;
&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleTurnVelocity&amp;diff=72013</id>
		<title>GetVehicleTurnVelocity</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleTurnVelocity&amp;diff=72013"/>
		<updated>2021-09-04T18:15:06Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Used new deprecation notice template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Deprecated|getElementAngularVelocity|This function will be deprecated in '''1.5.6'''}}&lt;br /&gt;
This function is used to retrieve a vehicle's turning velocity for each axis.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float float float getVehicleTurnVelocity ( vehicle theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[vehicle]]:getTurnVelocity|turnVelocity|setVehicleTurnVelocity}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get the turning velocities of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns 3 ''floats'' that represent the vehicle's turning velocity on the x, y and z axis or ''false'' if wrong arguments were passed.&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 shows the current turn velocity of the vehicle that you're in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;geturnvelocity&amp;quot;, function(player)&lt;br /&gt;
    if not isPedInVehicle(player) then return end&lt;br /&gt;
    local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
    local vx, vy, vz = getVehicleTurnVelocity(veh)&lt;br /&gt;
    outputChatBox(&amp;quot;Vehicle's turn velocity is: X: &amp;quot;..vx..&amp;quot; Y: &amp;quot;..vy..&amp;quot; Z: &amp;quot;..vz, player, 0, 255, 0, 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;
==See Also==&lt;br /&gt;
&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsObjectInACLGroup&amp;diff=72009</id>
		<title>IsObjectInACLGroup</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsObjectInACLGroup&amp;diff=72009"/>
		<updated>2021-09-03T07:31:16Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Yes, my fault. What about to rename the argument to &amp;quot;theObjectName&amp;quot;. It is more readable, isn't it?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}} &lt;br /&gt;
{{Important Note|You must '''NOT''' to use this function to limit features to users that belong to specific groups. Instead you '''MUST''' use [[hasObjectPermissionTo]]. Using this function forces the server owner to name their group a certain way, whereas using hasObjectPermissionTo allows the owner to give permission for whatever features you restrict to whatever groups they have set up in their ACL.}}&lt;br /&gt;
This function is used to determine if an object is in a group.&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 isObjectInACLGroup ( string theObjectName, aclgroup theGroup )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6994|{{OOP||[[aclgroup]]:doesContainObject||}}}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theObjectName:''' the name of the object to check. Examples: &amp;quot;resource.ctf&amp;quot;, &amp;quot;user.Jim&amp;quot;.&lt;br /&gt;
*'''theGroup:''' the [[ACL group]] pointer of the group from which the object should be found.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the object is in the specified group, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
''' Example 1:''' This example adds a ''jetpack'' command that is only available to admins.  When entering the command, it will toggle the player's jetpack.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;jetpack&amp;quot;,&lt;br /&gt;
    function ( thePlayer )&lt;br /&gt;
        if doesPedHaveJetPack ( thePlayer ) then -- If the player have a jetpack already, remove it&lt;br /&gt;
            removePedJetPack ( thePlayer ) -- Remove the jetpack&lt;br /&gt;
            return -- And stop the function here&lt;br /&gt;
        end&lt;br /&gt;
		&lt;br /&gt;
     -- Otherwise, give him one if he has access&lt;br /&gt;
&lt;br /&gt;
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name&lt;br /&gt;
     if isObjectInACLGroup (&amp;quot;user.&amp;quot;..accName, aclGetGroup ( &amp;quot;Admin&amp;quot; ) ) then -- Does he have access to Admin functions?&lt;br /&gt;
          if not doesPedHaveJetPack ( thePlayer ) then -- If the player doesn't have a jetpack give it.&lt;br /&gt;
               givePedJetPack ( thePlayer )  -- Give the jetpack&lt;br /&gt;
          end&lt;br /&gt;
     end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example displays a list of all the online admins in the chat box (assuming your administrator's group in your ACL is called 'admin'):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
players = getElementsByType ( &amp;quot;player&amp;quot; )&lt;br /&gt;
admins = &amp;quot;&amp;quot;&lt;br /&gt;
for k,v in ipairs(players) do&lt;br /&gt;
   local accountname = &amp;quot;&amp;quot;&lt;br /&gt;
   if (isGuestAccount(getPlayerAccount(v)) == false) then&lt;br /&gt;
      accountname = getAccountName (getPlayerAccount(v))&lt;br /&gt;
      if isObjectInACLGroup ( &amp;quot;user.&amp;quot; .. accountname, aclGetGroup ( &amp;quot;admin&amp;quot; ) ) then&lt;br /&gt;
         if (admins == &amp;quot;&amp;quot;) then&lt;br /&gt;
            admins = getPlayerName(v)&lt;br /&gt;
         else&lt;br /&gt;
            admins = admins .. &amp;quot;, &amp;quot; .. getPlayerName(v)&lt;br /&gt;
         end&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
outputChatBox( &amp;quot;Online Admins:&amp;quot;, getRootElement(), 255, 255, 0)&lt;br /&gt;
outputChatBox( &amp;quot; &amp;quot; .. tostring ( admins ), getRootElement(), 255, 255, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{ACL_functions}}&lt;br /&gt;
[[zh-cn:IsObjectInACLGroup]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsObjectInACLGroup&amp;diff=72005</id>
		<title>IsObjectInACLGroup</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsObjectInACLGroup&amp;diff=72005"/>
		<updated>2021-09-01T19:46:37Z</updated>

		<summary type="html">&lt;p&gt;Toliak: I believe that argument `theObject` has the `object` type instead of `string`&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}} &lt;br /&gt;
{{Important Note|You must '''NOT''' to use this function to limit features to users that belong to specific groups. Instead you '''MUST''' use [[hasObjectPermissionTo]]. Using this function forces the server owner to name their group a certain way, whereas using hasObjectPermissionTo allows the owner to give permission for whatever features you restrict to whatever groups they have set up in their ACL.}}&lt;br /&gt;
This function is used to determine if an object is in a group.&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 isObjectInACLGroup ( object theObject, aclgroup theGroup )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{New feature/item|3.0141|1.4.0|6994|{{OOP||[[aclgroup]]:doesContainObject||}}}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theObject:''' the name of the object to check. Examples: &amp;quot;resource.ctf&amp;quot;, &amp;quot;user.Jim&amp;quot;.&lt;br /&gt;
*'''theGroup:''' the [[ACL group]] pointer of the group from which the object should be found.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the object is in the specified group, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
''' Example 1:''' This example adds a ''jetpack'' command that is only available to admins.  When entering the command, it will toggle the player's jetpack.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;jetpack&amp;quot;,&lt;br /&gt;
    function ( thePlayer )&lt;br /&gt;
        if doesPedHaveJetPack ( thePlayer ) then -- If the player have a jetpack already, remove it&lt;br /&gt;
            removePedJetPack ( thePlayer ) -- Remove the jetpack&lt;br /&gt;
            return -- And stop the function here&lt;br /&gt;
        end&lt;br /&gt;
		&lt;br /&gt;
     -- Otherwise, give him one if he has access&lt;br /&gt;
&lt;br /&gt;
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name&lt;br /&gt;
     if isObjectInACLGroup (&amp;quot;user.&amp;quot;..accName, aclGetGroup ( &amp;quot;Admin&amp;quot; ) ) then -- Does he have access to Admin functions?&lt;br /&gt;
          if not doesPedHaveJetPack ( thePlayer ) then -- If the player doesn't have a jetpack give it.&lt;br /&gt;
               givePedJetPack ( thePlayer )  -- Give the jetpack&lt;br /&gt;
          end&lt;br /&gt;
     end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example displays a list of all the online admins in the chat box (assuming your administrator's group in your ACL is called 'admin'):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
players = getElementsByType ( &amp;quot;player&amp;quot; )&lt;br /&gt;
admins = &amp;quot;&amp;quot;&lt;br /&gt;
for k,v in ipairs(players) do&lt;br /&gt;
   local accountname = &amp;quot;&amp;quot;&lt;br /&gt;
   if (isGuestAccount(getPlayerAccount(v)) == false) then&lt;br /&gt;
      accountname = getAccountName (getPlayerAccount(v))&lt;br /&gt;
      if isObjectInACLGroup ( &amp;quot;user.&amp;quot; .. accountname, aclGetGroup ( &amp;quot;admin&amp;quot; ) ) then&lt;br /&gt;
         if (admins == &amp;quot;&amp;quot;) then&lt;br /&gt;
            admins = getPlayerName(v)&lt;br /&gt;
         else&lt;br /&gt;
            admins = admins .. &amp;quot;, &amp;quot; .. getPlayerName(v)&lt;br /&gt;
         end&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
outputChatBox( &amp;quot;Online Admins:&amp;quot;, getRootElement(), 255, 255, 0)&lt;br /&gt;
outputChatBox( &amp;quot; &amp;quot; .. tostring ( admins ), getRootElement(), 255, 255, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{ACL_functions}}&lt;br /&gt;
[[zh-cn:IsObjectInACLGroup]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehiclesOfType&amp;diff=72004</id>
		<title>GetVehiclesOfType</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehiclesOfType&amp;diff=72004"/>
		<updated>2021-09-01T19:44:01Z</updated>

		<summary type="html">&lt;p&gt;Toliak: OOP function getAllOfType is static&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function scans through all the current vehicles and returns the ones matching the given model.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getVehiclesOfType ( int model )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP|This function is a static function underneath the Vehicle class.|[[Vehicle]].getAllOfType||}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''model''': The model of vehicles you want.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of existing vehicles matching the specified model.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example finds all landstalkers on the map and moves them 5 units to the left.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find all the vehicles with the model 400 (landstalker)&lt;br /&gt;
vehicles = getVehiclesOfType ( 400 )&lt;br /&gt;
-- Loop through the vehicle list&lt;br /&gt;
for vehicleKey, vehicleValue in ipairs ( vehicles ) do&lt;br /&gt;
	-- Get the vehicle's position&lt;br /&gt;
        x, y, z = getElementPosition ( vehicleValue )&lt;br /&gt;
        -- Move the vehicle to the left&lt;br /&gt;
        setElementPosition ( vehicleValue, x - 5, y, z )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
&lt;br /&gt;
[[de:GetVehiclesOfType]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientObjectMoveStop&amp;diff=71480</id>
		<title>OnClientObjectMoveStop</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientObjectMoveStop&amp;diff=71480"/>
		<updated>2021-07-20T18:56:46Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add parameters section (without parameters)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
{{New feature/item|3.0159|1.5.8|20811|This event is triggered when an object's movement stop.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
No parameters.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the object which was moved.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local obj = createObject(5239, -2417.22339, -606.70374, 132.56250)&lt;br /&gt;
moveObject(obj, 3000, -2417.22339, -606.70374, 137.56250)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientObjectMoveStop&amp;quot;, obj,&lt;br /&gt;
    function()&lt;br /&gt;
        outputChatBox(&amp;quot;stopping moving object&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.5.8-rc20811|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client object events===&lt;br /&gt;
{{Client_object_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientObjectMoveStart&amp;diff=71479</id>
		<title>OnClientObjectMoveStart</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientObjectMoveStart&amp;diff=71479"/>
		<updated>2021-07-20T18:56:25Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add parameters section (without parameters)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
{{New feature/item|3.0159|1.5.8|20811|This event is triggered when an object starts moving.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
No parameters.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the object which was moved.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local obj = createObject(5239, -2417.22339, -606.70374, 132.56250)&lt;br /&gt;
moveObject(obj, 3000, -2417.22339, -606.70374, 137.56250)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientObjectMoveStart&amp;quot;, obj,&lt;br /&gt;
    function()&lt;br /&gt;
        outputChatBox(&amp;quot;started moving object&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.5.8-rc20811|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client object events===&lt;br /&gt;
{{Client_object_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientElementStreamOut&amp;diff=71478</id>
		<title>OnClientElementStreamOut</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientElementStreamOut&amp;diff=71478"/>
		<updated>2021-07-20T18:30:55Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add parameters section (without parameters)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is triggered whenever a physical element is streamed out. This is triggered for all elements that are streamable, such as players, peds, vehicles, objects and markers when the local player is leaving the element. When this event is triggered, that element is no longer physical and is now virtualized by MTA.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
No parameters.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that streamed out.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows you how to tell player that a marker was streamed out and the distance between player and the marker.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientElementStreamOut&amp;quot;, root,&lt;br /&gt;
    function ( )&lt;br /&gt;
        if getElementType( source ) == &amp;quot;marker&amp;quot; then&lt;br /&gt;
            local myPosTab = { getElementPosition( localPlayer ) };&lt;br /&gt;
            local markerPosTab = { getElementPosition( source ) };&lt;br /&gt;
            local distance = getDistanceBetweenPoints3D( unpack( myPosTab ), unpack( markerPosTab ) );&lt;br /&gt;
            outputChatBox( &amp;quot;A marker has just streamed out. Distance to the marker: &amp;quot; .. tostring( distance ) ..&amp;quot;.&amp;quot; );&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client element events===&lt;br /&gt;
{{Client_element_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientElementStreamIn&amp;diff=71477</id>
		<title>OnClientElementStreamIn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientElementStreamIn&amp;diff=71477"/>
		<updated>2021-07-20T18:29:31Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add parameters section (without parameters)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is triggered whenever a physical element is streamed in. This is triggered for all elements that are streamable, such as players, peds, vehicles, objects and markers. When this event is triggered, that element is guaranteed to be physically created as a GTA object.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
No parameters.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that streamed in.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows you how to tell player that a marker was streamed in and the distance between player and the marker.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientElementStreamIn&amp;quot;, root,&lt;br /&gt;
    function ( )&lt;br /&gt;
        if getElementType( source ) == &amp;quot;marker&amp;quot; then&lt;br /&gt;
            local myPosTab = { getElementPosition( localPlayer ) };&lt;br /&gt;
            local markerPosTab = { getElementPosition( source ) };&lt;br /&gt;
            local distance = getDistanceBetweenPoints3D( unpack( myPosTab ), unpack( markerPosTab ) );&lt;br /&gt;
            outputChatBox( &amp;quot;A marker has just streamed in. Distance to the marker: &amp;quot; .. tostring( distance ) ..&amp;quot;.&amp;quot; );&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client element events===&lt;br /&gt;
{{Client_element_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxUpdateScreenSource&amp;diff=71071</id>
		<title>DxUpdateScreenSource</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxUpdateScreenSource&amp;diff=71071"/>
		<updated>2021-05-14T16:52:08Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Fix class name in OOP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function updates the contents of a screen source [[texture]] with the screen output from GTA&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 dxUpdateScreenSource ( element screenSource [, bool resampleNow = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DxScreenSource]]:update}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''screenSource:''' The screen source element whose pixels we want to fill with the screen capture&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''resampleNow:''' A bool to indicate if the screen should be captured immediately. The default is ''false'' which means the screen from the end of the previous frame is used (better for performance and consistency). Use ''true'' for layering fullscreen effects.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the screen was successfully captured, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will update the screen capture when F7 is pressed&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
    function()&lt;br /&gt;
        myScreenSource = dxCreateScreenSource( 500, 500)    -- Create a screen source texture which is 500 x 500 pixels&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
bindKey( &amp;quot;F7&amp;quot;, &amp;quot;down&amp;quot;, &lt;br /&gt;
    function()&lt;br /&gt;
        if myScreenSource then&lt;br /&gt;
            dxUpdateScreenSource( myScreenSource )          -- Capture the screen&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        if myScreenSource then&lt;br /&gt;
            dxDrawImage ( 0, 0, 300, 300, myScreenSource )  -- Draw the result in top left corner&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.03795|Added resample argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiEditIsMasked&amp;diff=71070</id>
		<title>GuiEditIsMasked</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiEditIsMasked&amp;diff=71070"/>
		<updated>2021-05-14T16:44:54Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Undo revision 71069 by Toliak (talk). Due to https://github.com/multitheftauto/mtasa-blue/blob/c58c3678f263d810f61eb5aecba48e6c4b4dce0c/Client/mods/deathmatch/logic/luadefs/CLuaGUIDefs.cpp#L326 I cannot provide the method name, and therefore, the class name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|13814|This function checks if an edit box is masked.}}&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 guiEditIsMasked ( gui-edit guiEdit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP|||masked|guiEditSetMasked}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''guiEdit:''' the edit box to check masked flag of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the edit box is masked, ''false'' if not, ''nil'' if an invalid edit box was provided.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createPasswordEdit( )&lt;br /&gt;
    local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, &amp;quot;password&amp;quot;, true ) -- create edit box for a password&lt;br /&gt;
    if password then -- if it was successfully created&lt;br /&gt;
        guiEditSetMasked( password, true ) -- make it masked&lt;br /&gt;
    end&lt;br /&gt;
    addCommandHandler( &amp;quot;isMasked&amp;quot;,&lt;br /&gt;
        function( )&lt;br /&gt;
            local masked = guiEditIsMasked( password ) -- check the edit box masked flag&lt;br /&gt;
            outputChatBox( &amp;quot;Edit field is &amp;quot; .. ( masked and &amp;quot;masked&amp;quot; or &amp;quot;not masked&amp;quot; ) ) -- show info about edit box&lt;br /&gt;
        end&lt;br /&gt;
    )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, createPasswordEdit )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
{{GUI_events}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiEditIsMasked&amp;diff=71069</id>
		<title>GuiEditIsMasked</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiEditIsMasked&amp;diff=71069"/>
		<updated>2021-05-14T16:41:11Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add OOP Class&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|13814|This function checks if an edit box is masked.}}&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 guiEditIsMasked ( gui-edit guiEdit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||GuiEdit|masked|guiEditSetMasked}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''guiEdit:''' the edit box to check masked flag of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the edit box is masked, ''false'' if not, ''nil'' if an invalid edit box was provided.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createPasswordEdit( )&lt;br /&gt;
    local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, &amp;quot;password&amp;quot;, true ) -- create edit box for a password&lt;br /&gt;
    if password then -- if it was successfully created&lt;br /&gt;
        guiEditSetMasked( password, true ) -- make it masked&lt;br /&gt;
    end&lt;br /&gt;
    addCommandHandler( &amp;quot;isMasked&amp;quot;,&lt;br /&gt;
        function( )&lt;br /&gt;
            local masked = guiEditIsMasked( password ) -- check the edit box masked flag&lt;br /&gt;
            outputChatBox( &amp;quot;Edit field is &amp;quot; .. ( masked and &amp;quot;masked&amp;quot; or &amp;quot;not masked&amp;quot; ) ) -- show info about edit box&lt;br /&gt;
        end&lt;br /&gt;
    )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, createPasswordEdit )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
{{GUI_events}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsMainMenuActive&amp;diff=71068</id>
		<title>IsMainMenuActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsMainMenuActive&amp;diff=71068"/>
		<updated>2021-05-14T16:25:33Z</updated>

		<summary type="html">&lt;p&gt;Toliak: OOP Syntax fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the user is in the mainmenu or not.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isMainMenuActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[GUI widgets|GuiElement]].isMainMenuActive|mainMenuActive|}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the mainmenu is visible, ''false'' if not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example check if the player is afk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function isLocalPlayerActive ()&lt;br /&gt;
   if isMainMenuActive() then&lt;br /&gt;
      setElementData(getLocalPlayer(),&amp;quot;status&amp;quot;,&amp;quot;afk&amp;quot;)&lt;br /&gt;
   else&lt;br /&gt;
      setElementData(getLocalPlayer(),&amp;quot;status&amp;quot;,&amp;quot;playing&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
{{GUI_events}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=71067</id>
		<title>AddAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=71067"/>
		<updated>2021-05-14T12:22:06Z</updated>

		<summary type="html">&lt;p&gt;Toliak: OOP Definition fix (static method)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function adds an account to the list of registered accounts of the current server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account addAccount ( string name, string pass [, bool allowCaseVariations = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP|This function is a static function underneath the Account class.|[[Account]].add ||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' The name of the account you wish to make, this normally is the player's name.&lt;br /&gt;
*'''pass:''' The password to set for this account for future logins.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''allowCaseVariations:''' Whether the username is case sensitive (if this is set to true, usernames &amp;quot;Bob&amp;quot; and &amp;quot;bob&amp;quot; will refer to different accounts)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[account]] or ''false'' if the account already exists or an error occured.&lt;br /&gt;
&lt;br /&gt;
===Limits===&lt;br /&gt;
*'''name:'''&lt;br /&gt;
** Minimal account name length is 1 character.&lt;br /&gt;
** Account names are case-sensitive if allowCaseVariations is ''true''.&lt;br /&gt;
** Account name can not be equal to &amp;quot;*****&amp;quot;&lt;br /&gt;
*'''pass:'''&lt;br /&gt;
** Minimal account password length is 1 character.&lt;br /&gt;
** Maximum account password length '''was''' 30 characters until version 1.5.4-11138. Currently there is no upper limit.&lt;br /&gt;
** Account password can not be equal to &amp;quot;*****&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This enables players to register on your server by using /register &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, password )&lt;br /&gt;
	-- Check if the password field is blank or not (only blank if they didnt enter one)&lt;br /&gt;
	if ( password ~= &amp;quot;&amp;quot; and password ~= nil ) then&lt;br /&gt;
		--Attempt to add the account, and save its value in a var&lt;br /&gt;
		local accountAdded = addAccount( getPlayerName(source), password )&lt;br /&gt;
		if ( accountAdded ) then&lt;br /&gt;
			--  Tell the user all is done&lt;br /&gt;
			outputChatBox ( &amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;, source )&lt;br /&gt;
		else&lt;br /&gt;
			-- There was an error making the account, tell the user&lt;br /&gt;
			outputChatBox ( &amp;quot;Error creating account, contact the server admin&amp;quot;, source )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- There was an error in the syntax, tell the user the correct syntax.&lt;br /&gt;
		outputChatBox ( &amp;quot;Error creating account, correct syntax: /register &amp;lt;password&amp;gt;&amp;quot;, source )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''This code differs by allowing the user to change their username that they wish to use.'''&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This enables players to register on your server by using /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This code differs again so the user can only register once /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bRegisteredOnce = {}&lt;br /&gt;
&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil and not bRegisteredOnce[source]) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                        bRegisteredOnce[source] = true&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                if bRegisteredOnce[source] == true then&lt;br /&gt;
                    outputChatBox(&amp;quot;You already registered on this server!&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                    outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:addAccount]]&lt;br /&gt;
[[ru:addAccount]]&lt;br /&gt;
[[es:addAcount]]&lt;br /&gt;
[[pl:addAccount]]&lt;br /&gt;
[[ZH-CN:addAccount]]&lt;br /&gt;
[[tr:addAccount]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Toliak&amp;diff=70962</id>
		<title>User:Toliak</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Toliak&amp;diff=70962"/>
		<updated>2021-05-01T10:40:00Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add page template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#7666f5&amp;quot; subcaption=&amp;quot;ToliakPurple&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Welcome 😀. I am an MTASA resources developer with Lua, C++, JavaScript (+TypeScript), Python and Java knowledge.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Projects =&lt;br /&gt;
&lt;br /&gt;
== ✅ MTASA TypeScript Transpiling ==&lt;br /&gt;
&lt;br /&gt;
{{MessageBox|&lt;br /&gt;
   bordercolorhex = bdd7ff|&lt;br /&gt;
   bgcolorhex = e0edff|&lt;br /&gt;
   message = '''Active project''' }}&lt;br /&gt;
&lt;br /&gt;
The project allows anyone to develop a resource on TypeScript and to convert (transpile) it into the MTASA Lua.&lt;br /&gt;
&lt;br /&gt;
TypeScript has an awesome features over the Lua:&lt;br /&gt;
* Static types linting support ''(no more &amp;quot;oops this function accepts Player instead of number&amp;quot;)''.&lt;br /&gt;
* Hints ''(no more &amp;quot;how many arguments does the function have&amp;quot;)''.&lt;br /&gt;
* Classes syntax ''(no more tables + metatables)''.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* Demo&lt;br /&gt;
&lt;br /&gt;
[https://mtasa-typescript.github.io/ WebSite]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript MTASA TypeScript Group]&lt;br /&gt;
&lt;br /&gt;
* Resources&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/resource-example TypeScript Resource Example]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/resource-boilerplate TypeScript Resource Template]&lt;br /&gt;
&lt;br /&gt;
* Utility&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-lua-types MTASA Lua Types definitions (NPM)]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-lua-utils Utilities for the development (NPM)]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-wiki-parser MTASA Wiki parser &amp;amp; Types definitions generator]&lt;br /&gt;
&lt;br /&gt;
== ⭐ NPC Ped Traffic Resource ==&lt;br /&gt;
&lt;br /&gt;
NPC Pedestrian traffic resource -- adds synchronized walking peds into MTASA.&lt;br /&gt;
Currently working on LV routes and miscellaneous NPC behavior in the '''feature/las-venturas''' branch.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=vWItG5lr2bU Demo/Trailer]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/mtasa-resource-traffic/tree/master GitHub repository]&lt;br /&gt;
&lt;br /&gt;
== ⭐ GTASA Vector Map ==&lt;br /&gt;
&lt;br /&gt;
GTA San Andreas (MTA San Andreas) vector map.&lt;br /&gt;
Currently working on fully map redesign in the '''develop''' branch.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/San-Andreas-vector-map GitHub repository]&lt;br /&gt;
&lt;br /&gt;
== 🚫 Python Module ==&lt;br /&gt;
&lt;br /&gt;
{{MessageBox|&lt;br /&gt;
   bordercolorhex = ffbfbf |&lt;br /&gt;
   bgcolorhex = ffe0e0 |&lt;br /&gt;
   message = '''Frozen project. Extremely low chances for the further development''' }}&lt;br /&gt;
&lt;br /&gt;
The module is a .dll/.so that adds server-side python language support for writing resources.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/mtasa-module-python GitHub Repository]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak GitHub Profile]&lt;br /&gt;
&lt;br /&gt;
[https://toliak.ru/ Website]&lt;br /&gt;
&lt;br /&gt;
Email: a@toliak.ru&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Toliak&amp;diff=70961</id>
		<title>User:Toliak</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Toliak&amp;diff=70961"/>
		<updated>2021-05-01T10:36:23Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Initial commit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome 😀. I am an MTASA resources developer with Lua, C++, JavaScript (+TypeScript), Python and Java knowledge.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Projects =&lt;br /&gt;
&lt;br /&gt;
== ✅ MTASA TypeScript Transpiling ==&lt;br /&gt;
&lt;br /&gt;
{{MessageBox|&lt;br /&gt;
   bordercolorhex = bdd7ff|&lt;br /&gt;
   bgcolorhex = e0edff|&lt;br /&gt;
   message = '''Active project''' }}&lt;br /&gt;
&lt;br /&gt;
The project allows anyone to develop a resource on TypeScript and to convert (transpile) it into the MTASA Lua.&lt;br /&gt;
&lt;br /&gt;
TypeScript has an awesome features over the Lua:&lt;br /&gt;
* Static types linting support ''(no more &amp;quot;oops this function accepts Player instead of number&amp;quot;)''.&lt;br /&gt;
* Hints ''(no more &amp;quot;how many arguments does the function have&amp;quot;)''.&lt;br /&gt;
* Classes syntax ''(no more tables + metatables)''.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* Demo&lt;br /&gt;
&lt;br /&gt;
[https://mtasa-typescript.github.io/ WebSite]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript MTASA TypeScript Group]&lt;br /&gt;
&lt;br /&gt;
* Resources&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/resource-example TypeScript Resource Example]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/resource-boilerplate TypeScript Resource Template]&lt;br /&gt;
&lt;br /&gt;
* Utility&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-lua-types MTASA Lua Types definitions (NPM)]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-lua-utils Utilities for the development (NPM)]  &lt;br /&gt;
&lt;br /&gt;
[https://github.com/mtasa-typescript/mtasa-wiki-parser MTASA Wiki parser &amp;amp; Types definitions generator]&lt;br /&gt;
&lt;br /&gt;
== ⭐ NPC Ped Traffic Resource ==&lt;br /&gt;
&lt;br /&gt;
NPC Pedestrian traffic resource -- adds synchronized walking peds into MTASA.&lt;br /&gt;
Currently working on LV routes and miscellaneous NPC behavior in the '''feature/las-venturas''' branch.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=vWItG5lr2bU Demo/Trailer]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/mtasa-resource-traffic/tree/master GitHub repository]&lt;br /&gt;
&lt;br /&gt;
== ⭐ GTASA Vector Map ==&lt;br /&gt;
&lt;br /&gt;
GTA San Andreas (MTA San Andreas) vector map.&lt;br /&gt;
Currently working on fully map redesign in the '''develop''' branch.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/San-Andreas-vector-map GitHub repository]&lt;br /&gt;
&lt;br /&gt;
== 🚫 Python Module ==&lt;br /&gt;
&lt;br /&gt;
{{MessageBox|&lt;br /&gt;
   bordercolorhex = ffbfbf |&lt;br /&gt;
   bgcolorhex = ffe0e0 |&lt;br /&gt;
   message = '''Frozen project. Extremely low chances for the further development''' }}&lt;br /&gt;
&lt;br /&gt;
The module is a .dll/.so that adds server-side python language support for writing resources.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak/mtasa-module-python GitHub Repository]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Toliak GitHub Profile]&lt;br /&gt;
&lt;br /&gt;
[https://toliak.ru/ Website]&lt;br /&gt;
&lt;br /&gt;
Email: a@toliak.ru&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Utf8.fold&amp;diff=70960</id>
		<title>Utf8.fold</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Utf8.fold&amp;diff=70960"/>
		<updated>2021-04-30T13:12:40Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Split syntax into different boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
{{Note|You may want to read up on [https://www.w3.org/International/wiki/Case_folding case folding] for more information about the use of this function.}}&lt;br /&gt;
Converts a UTF-8 string to folded case (lowercase), which can be used to compare two strings. If ''input'' is an integer, it's treat as a codepoint and a convert codepoint (integer) is returned.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string|int utf8.fold ( string|int input )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string|int utf8.lower ( string|int input )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''input:''' A string character sequence OR an integer value&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' in lowercase OR returns an ''integer'' (see description).&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 shows how to convert a string to lowercase, which can be used to compare with other folded strings.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local output = utf8.lower( &amp;quot;WHAT ARE YOU UP TO? Do you like uppercase?&amp;quot; )&lt;br /&gt;
print( output ) -- what are you up to? do you like uppercase?&lt;br /&gt;
&lt;br /&gt;
local value = utf8.fold( 1088 )&lt;br /&gt;
print( type( value ) ) -- number&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;
{{UTF8 functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Utf8.title&amp;diff=70959</id>
		<title>Utf8.title</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Utf8.title&amp;diff=70959"/>
		<updated>2021-04-30T13:12:03Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Split syntax into different boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
{{Note|You may want to read up on [https://www.w3.org/International/wiki/Case_folding case folding] for more information about the use of this function.}}&lt;br /&gt;
Converts a UTF-8 string to title case (uppercase). If ''input'' is an integer, it is treated as a codepoint and a converted codepoint (integer) is returned.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string utf8.title ( string|int input )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string utf8.upper ( string|int input )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''input:''' A string character sequence OR an integer value&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' in uppercase OR returns an ''integer'' (see description).&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows how to convert a string to uppercase.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local output = utf8.upper( &amp;quot;WHAT ARE YOU UP TO? Do you like uppercase?&amp;quot; )&lt;br /&gt;
outputConsole( output ) -- WHAT ARE YOU UP TO? DO YOU LIKE UPPERCASE?&lt;br /&gt;
&lt;br /&gt;
local value = utf8.title( 1088 )&lt;br /&gt;
outputConsole( value, type( value ) ) -- 1056, number&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;
{{UTF8 functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddVehicleSirens&amp;diff=70958</id>
		<title>AddVehicleSirens</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddVehicleSirens&amp;diff=70958"/>
		<updated>2021-04-30T12:59:21Z</updated>

		<summary type="html">&lt;p&gt;Toliak: /* Syntax */  syntax error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|3968|&lt;br /&gt;
This function adds sirens to a vehicle.&lt;br /&gt;
}}&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 addVehicleSirens ( vehicle theVehicle, int sirenCount, int sirenType [, bool flag360 = false, bool checkLosFlag = true, bool useRandomiser = true, bool silentFlag = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[vehicle]]:addSirens}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle to add sirens&lt;br /&gt;
*'''sirenCount:''' The amount of siren points on the vehicle (8 maximum)&lt;br /&gt;
*'''sirenType:''' An integer between 1 and 6 (1: invisible, 2: single, 3+: dual)&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''flag360:''' Visible from all directions (applies to single type only)&lt;br /&gt;
*'''checkLosFlag:''' Check line of sight between camera and light so it won't draw if blocked&lt;br /&gt;
*'''useRandomiser:''' Randomise the light order, false for sequential&lt;br /&gt;
*'''silentFlag:''' If you want the siren to be silent set this to true&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if sirens were successfully added to the vehicle, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a vehicle siren on entering a vehicle and removes a vehicle siren on exiting. (TESTED!)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;addEventHandler(&amp;quot;onVehicleEnter&amp;quot;, root, function(player, seat)&lt;br /&gt;
   if (player) and (seat == 0) then&lt;br /&gt;
      addVehicleSirens(source, 1, 2)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onVehicleExit&amp;quot;, root, function(player, seat)&lt;br /&gt;
   if (player) and (seat == 0) then&lt;br /&gt;
      removeVehicleSirens(source)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.3.0-9.03968|n/a|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsVehicleWheelOnGround&amp;diff=70956</id>
		<title>IsVehicleWheelOnGround</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsVehicleWheelOnGround&amp;diff=70956"/>
		<updated>2021-04-30T11:37:17Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Type unions are '/', not '|'. See triggerLatentClientEvent, hasObjectPermissionTo, banPlayer, etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|11854|&lt;br /&gt;
This function returns a [[boolean]] whether the [[vehicle]]'s wheel is on ground (true) or in air (false).&lt;br /&gt;
}}&lt;br /&gt;
{{Note|In vehicles with 3 wheels, the wheels are combined 2 in 1, in motorbikes only the left - &amp;lt;code&amp;gt;&amp;quot;front_left&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;rear_left&amp;quot;&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isVehicleWheelOnGround ( vehicle theVehicle, string/int wheel )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[vehicle]]:isWheelOnGround}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle''' The [[vehicle]], which you want to check.&lt;br /&gt;
*'''wheel''' The wheel name or number, see list below:&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;quot;front_left&amp;quot;&amp;lt;/code&amp;gt; or 0&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;quot;rear_left&amp;quot;&amp;lt;/code&amp;gt; or 1&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;quot;front_right&amp;quot;&amp;lt;/code&amp;gt; or 2&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;quot;rear_right&amp;quot;&amp;lt;/code&amp;gt; or 3&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the vehicle wheel is on ground/collided, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example displays four colored rectangles on the screen. If the wheel is colliding, the rectangle will be green, otherwise it will be red.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local Green = tocolor(0, 255, 0, 255)&lt;br /&gt;
local Red = tocolor(255, 0, 0, 255)&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function( )&lt;br /&gt;
        local theVehicle = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
&lt;br /&gt;
        if isElement( theVehicle ) then&lt;br /&gt;
            dxDrawRectangle( 100, 100, 20, 20, isVehicleWheelOnGround ( theVehicle, 0 ) and Green or Red )&lt;br /&gt;
            dxDrawRectangle( 100, 140, 20, 20, isVehicleWheelOnGround ( theVehicle, 1 ) and Green or Red )&lt;br /&gt;
            dxDrawRectangle( 140, 100, 20, 20, isVehicleWheelOnGround ( theVehicle, 2 ) and Green or Red )&lt;br /&gt;
            dxDrawRectangle( 140, 140, 20, 20, isVehicleWheelOnGround ( theVehicle, 3 ) and Green or Red )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProjectileCounter&amp;diff=70949</id>
		<title>GetProjectileCounter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProjectileCounter&amp;diff=70949"/>
		<updated>2021-04-29T14:09:50Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Style fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
Get the time left before a projectile detonates.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getProjectileCounter ( projectile projectile )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[projectile]]:getCounter|counter|setProjectileCounter}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''projectile''': the projectile to get the timer of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the the time in milliseconds to detonation which depending on the projectile type will do different things:&lt;br /&gt;
* Grenades will explode when it hits 0&lt;br /&gt;
* Teargas may be a duration timer&lt;br /&gt;
* Both types of rockets will explode when it hits 0&lt;br /&gt;
* Satchels restarts so I do not think it does anything&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;
With this example you can find out how long does it take for a projectile to explode/end&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getProjectileBoomTime()&lt;br /&gt;
outputChatBox(&amp;quot;Time for &amp;quot;..getProjectileType(source)..&amp;quot; to explode/end is &amp;quot;..getProjectileCounter(source)..&amp;quot; miliseconds.&amp;quot;,255,0,0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;,root,getProjectileBoomTime)&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.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client projectile functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=70948</id>
		<title>GetElementBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=70948"/>
		<updated>2021-04-29T14:08:41Z</updated>

		<summary type="html">&lt;p&gt;Toliak: List of args&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the minimum and maximum coordinates of an element's bounding box.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the values returned are relative to the position of the element, and as such if you wish to get world coordinates for drawing, etc., you should retrieve the position of the element and add the returned values onto that.&lt;br /&gt;
{{Note|The element must be streamed in for this function to work.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float, float, float, float getElementBoundingBox ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[element]]:getBoundingBox}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theElement:''' the element whose bounding box we want to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''min x, min y, min z, max x, max y, max z'' if the passed element is valid and streamed in, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs to chatbox the minimum and the maximum coordinates of an element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function minMaxOutput( theElement )&lt;br /&gt;
    local x0, y0, z0, x1, y1, z1 = getElementBoundingBox( theElement )&lt;br /&gt;
&lt;br /&gt;
    if ( x0 ) then&lt;br /&gt;
        outputChatBox( &amp;quot;The coords are: &amp;quot; .. x0 .. &amp;quot;, &amp;quot; .. y0 .. &amp;quot;, &amp;quot; .. z0 .. &amp;quot;, &amp;quot; .. x1 .. &amp;quot;, &amp;quot; .. y1 .. &amp;quot;, &amp;quot; .. z1 )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox( &amp;quot;Failed to retrieve bounding box&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Utility_functions&amp;diff=69720</id>
		<title>Template:Utility functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Utility_functions&amp;diff=69720"/>
		<updated>2021-03-31T18:39:02Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Useful function should not be in ServerFunctions category. Undo revision 69565 by GalAnonim (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[addDebugHook]]&lt;br /&gt;
*[[base64Decode]]&lt;br /&gt;
*[[base64Encode]]&lt;br /&gt;
{{Bit_functions}}&lt;br /&gt;
*[[debugSleep]]&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
*[[decodeString]]&lt;br /&gt;
|11849}}&lt;br /&gt;
*[[deref]]&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
*[[encodeString]]&lt;br /&gt;
|11849}}&lt;br /&gt;
*[[fromJSON]]&lt;br /&gt;
*[[getColorFromString]]&lt;br /&gt;
*[[getDevelopmentMode]]&lt;br /&gt;
*[[getDistanceBetweenPoints2D]]&lt;br /&gt;
*[[getDistanceBetweenPoints3D]]&lt;br /&gt;
*[[getEasingValue]]&lt;br /&gt;
*[[getFPSLimit]]&lt;br /&gt;
*[[getNetworkStats]]&lt;br /&gt;
*[[getNetworkUsageData]]&lt;br /&gt;
*[[getPerformanceStats]]&lt;br /&gt;
*[[getRealTime]]&lt;br /&gt;
*[[getServerConfigSetting]]&lt;br /&gt;
*[[getTickCount]]&lt;br /&gt;
*[[getTimerDetails]]&lt;br /&gt;
*[[getTimers]]&lt;br /&gt;
*[[gettok]]&lt;br /&gt;
*[[getUserdataType]]&lt;br /&gt;
*[[getVersion]]&lt;br /&gt;
*[[hash]]&lt;br /&gt;
*[[inspect]]&lt;br /&gt;
*[[interpolateBetween]]&lt;br /&gt;
*[[iprint]]&lt;br /&gt;
*[[isOOPEnabled]]&lt;br /&gt;
*[[isTimer]]&lt;br /&gt;
*[[killTimer]]&lt;br /&gt;
*[[md5]]&lt;br /&gt;
*[[passwordHash]]&lt;br /&gt;
*[[passwordVerify]]&lt;br /&gt;
*[[pregFind]]&lt;br /&gt;
*[[pregMatch]]&lt;br /&gt;
*[[pregReplace]]&lt;br /&gt;
*[[removeDebugHook]]&lt;br /&gt;
*[[ref]]&lt;br /&gt;
*[[resetTimer]]&lt;br /&gt;
*[[setDevelopmentMode]]&lt;br /&gt;
*[[setFPSLimit]]&lt;br /&gt;
*[[setServerConfigSetting]]&lt;br /&gt;
*[[setTimer]]&lt;br /&gt;
*[[sha256]]&lt;br /&gt;
*[[split]]&lt;br /&gt;
*[[teaDecode]]&lt;br /&gt;
*[[teaEncode]]&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
*[[tocolor]]&lt;br /&gt;
|13977}}&lt;br /&gt;
*[[toJSON]]&lt;br /&gt;
*[[utfChar]]&lt;br /&gt;
*[[utfCode]]&lt;br /&gt;
*[[utfLen]]&lt;br /&gt;
*[[utfSeek]]&lt;br /&gt;
*[[utfSub]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FromColor&amp;diff=69719</id>
		<title>FromColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FromColor&amp;diff=69719"/>
		<updated>2021-03-31T18:34:38Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Attempt to remove this function from Server Scripting Functions category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function converts the hexadecimal numbers of the specified colors&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int fromColor ( color )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''color:''' Values representing colors.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an array containing colors (red, green, blue)&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;
The following code inverts the tocolor function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function fromColor(color)&lt;br /&gt;
	if color then&lt;br /&gt;
		local blue = bitExtract(color, 0, 8)&lt;br /&gt;
		local green = bitExtract(color, 8, 8)&lt;br /&gt;
		local red = bitExtract(color, 16, 8)&lt;br /&gt;
		local alpha = bitExtract(color, 24, 8)&lt;br /&gt;
		&lt;br /&gt;
		return { red, green, blue, alpha }&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local color = tocolor(255, 0, 0, 255)&lt;br /&gt;
print(fromColor(color))&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>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemovePedClothes&amp;diff=69078</id>
		<title>RemovePedClothes</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemovePedClothes&amp;diff=69078"/>
		<updated>2021-02-20T20:56:22Z</updated>

		<summary type="html">&lt;p&gt;Toliak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function is used to remove the current clothes of a certain type on a [[ped]]. It will remove them if the clothesTexture and clothesModel aren't specified, or if they match the current clothes on that slot.&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 removePedClothes ( ped thePed, int clothesType [, string clothesTexture, string clothesModel ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:removeClothes}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed''': The [[ped]] you want to remove clothes from.&lt;br /&gt;
*'''clothesType''': the clothes slot/type to remove. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''clothesTexture''': (Server only) A string determining the clothes texture that will be removed. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
*'''clothesModel''': (Server only) A string determining the clothes model that will be removed. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
This function returns ''true'' if the clothes were successfully removed from the ped, ''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 adds a 'moto' helmet to a player when he gets on a nrg bike, and removes it when he gets off.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addHelmetOnEnter ( vehicleEntered, seat, jacked )&lt;br /&gt;
    if getElementModel ( vehicleEntered ) == 522 then      -- if it's a nrg&lt;br /&gt;
        addPedClothes ( source, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot;, 16 )       -- add the helmet&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, root, addHelmetOnEnter )&lt;br /&gt;
&lt;br /&gt;
function removeHelmetOnExit ( vehicleExited, seat, jacked )&lt;br /&gt;
    if getElementModel ( vehicleExited ) == 522 then       -- if it's a nrg&lt;br /&gt;
        removePedClothes ( source, 16, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot; )    -- remove that helmet&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleExit&amp;quot;, root, removeHelmetOnExit )&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;
{{Ped functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:removePedClothes]]&lt;br /&gt;
[[pl:RemovePedClothes]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMarkerTarget&amp;diff=69077</id>
		<title>SetMarkerTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMarkerTarget&amp;diff=69077"/>
		<updated>2021-02-20T20:43:40Z</updated>

		<summary type="html">&lt;p&gt;Toliak: /* Syntax */ OOP fixed definitions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function sets the 'target' for a marker. Only the ''checkpoint'' and ''ring'' marker types can have a target.&lt;br /&gt;
&lt;br /&gt;
For ''checkpoint'' markers, the target is shown as an arrow aiming at the point specified.&lt;br /&gt;
&lt;br /&gt;
For ''ring'' markers, the target is shown by rotating the whole ring so that it faces the point specified.&lt;br /&gt;
&lt;br /&gt;
This function is most useful for setting up markers for races, where each marker points to the next one's position.&lt;br /&gt;
(This is mostly used in races!)&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 setMarkerTarget ( marker theMarker, float x, float y, float z )    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[Marker]]:setTarget|target|getMarkerTarget}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theMarker:''' The marker to set the target of&lt;br /&gt;
*'''x:''' The x axis of the coordinate to target the marker at&lt;br /&gt;
*'''y:''' The y axis of the coordinate to target the marker at&lt;br /&gt;
*'''z:''' The z axis of the coordinate to target the marker at&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if target was set, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Creates a marker in the center of the map and points it north.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local marker = createMarker(0,0,0,&amp;quot;ring&amp;quot;,7,255,0,0,255) --Creates a marker&lt;br /&gt;
setMarkerTarget(marker,3000,0,0) --Face the marker north&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Marker functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Utf8.widthindex&amp;diff=69055</id>
		<title>Utf8.widthindex</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Utf8.widthindex&amp;diff=69055"/>
		<updated>2021-02-17T14:27:17Z</updated>

		<summary type="html">&lt;p&gt;Toliak: /* Syntax */ function is withindex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
&lt;br /&gt;
Returns the location, offset and width of the character at the given location in the UTF-8 string.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int, int, int utf8.widthindex ( string input, int location [, bool ambi_is_double = false, int default_width = 0 ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''input:''' A string character sequence&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''ambi_is_double:''' A boolean, if set to ''true'', ambiguous character's width is 2 (see example).&lt;br /&gt;
*'''default_width:''' An integer, if given, is used as width for unprintable characters.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the given location, the offset in UTF-8 encoding (if cursor is in the middle of the wide char - offset will be 2) and the width of the character, otherwise only the location as ''integer'' will be returned.&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 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local input = &amp;quot;днём&amp;quot;&lt;br /&gt;
local raw_width = utf8.width( input, true )&lt;br /&gt;
&lt;br /&gt;
for location = 1, raw_width do&lt;br /&gt;
    print( utf8.widthindex( input, location, true ) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Output ''(enhanced, not raw)'':&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot; style=&amp;quot;width:20%;text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Character || Location || Offset || Width&lt;br /&gt;
|-&lt;br /&gt;
| д || 1 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| д || 1 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| н || 2 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| н || 2 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| ё || 3 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| ё || 3 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| м || 4 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| м || 4 || 2 || 2&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{UTF8 functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetLightRadius&amp;diff=69000</id>
		<title>SetLightRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetLightRadius&amp;diff=69000"/>
		<updated>2021-02-15T20:28:51Z</updated>

		<summary type="html">&lt;p&gt;Toliak: anywhere else &amp;quot;light&amp;quot; start from lowercase letter&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.0150|1.5.0|7048|&lt;br /&gt;
This function sets the radius for a [[Element/Light|light]] element.&lt;br /&gt;
}}&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 setLightRadius ( light theLight, float radius )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[light]]:setRadius|radius|getLightRadius}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theLight:''' The [[Element/Light|light]] that you wish to set the radius of.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns ''true'' if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local light = createLight(0, 2, 3, 4)&lt;br /&gt;
addCommandHandler(&amp;quot;setradiusoflight&amp;quot;,&lt;br /&gt;
	function(cmd, radius)&lt;br /&gt;
		if radius then&lt;br /&gt;
			if tonumber(radius) &amp;gt; 0 then&lt;br /&gt;
				setLightRadius(light, tonumber(radius))&lt;br /&gt;
			else&lt;br /&gt;
				outputChatBox(&amp;quot;Radius must be greater than 0.&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;You must specify a radius.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_light_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedEnterVehicle&amp;diff=68999</id>
		<title>SetPedEnterVehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedEnterVehicle&amp;diff=68999"/>
		<updated>2021-02-15T19:59:19Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Syntax with types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This function makes a [[ped]] enter a [[vehicle]], similar to the enter_exit control state.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|For this function to work on peds, the server and all clients are required to be on version '''1.5.8 r20740''' or newer.}}&lt;br /&gt;
{{Note|This function only works on synced peds and vehicles (ie. created serverside).}}&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 setPedEnterVehicle ( ped thePed [, vehicle theVehicle = nil, bool passenger = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[player]] or [[ped]] to enter the vehicle.&lt;br /&gt;
**''Note: The player must be the local player.''&lt;br /&gt;
**''Note: The ped must be synced by the client. Use [[isElementSyncer]] clientside to check if the client is syncing. Use [[setElementSyncer]] serverside to change the syncer manually.''&lt;br /&gt;
*'''vehicle:''' The [[vehicle]] to enter. If no vehicle is set, the ped will enter the nearest vehicle within 20 m.&lt;br /&gt;
*'''passenger:''' If set to ''true'', the ped will enter as passenger in the nearest available seat, otherwise he will enter as driver.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
When this function returns ''true'', the client will ask server for permission to enter a vehicle. Actually entering can still fail in the following cases&lt;br /&gt;
*The function is used on a ped, but another client is not on version '''1.5.8 r20740''' or newer.&lt;br /&gt;
*Another player or ped is already entering, exiting or jacking the same vehicle and seat.&lt;br /&gt;
*Movement input or damage can interrupt the task. Use [[getPedTask]] to monitor what the ped is doing.&lt;br /&gt;
&lt;br /&gt;
This function returns ''false'' in the following cases&lt;br /&gt;
*Invalid arguments were parsed.&lt;br /&gt;
*The function is used on a ped, but the server is not on version '''1.5.8 r20740''' or newer.&lt;br /&gt;
*Time passed since last enter/exit for this ped is less than 1500 ms.&lt;br /&gt;
*[[onClientVehicleStartEnter]] was cancelled by a script.&lt;br /&gt;
*The ped has an active TASK_PRIMARY [[task]]. Use [[getPedTask]] to monitor what the ped is doing.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Make ped Sweet enter his car&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;
local sweet = createPed(270, 0, 0, 3)&lt;br /&gt;
setElementID(sweet , 'sweet')&lt;br /&gt;
&lt;br /&gt;
local sweets_car = createVehicle(492, 3, 0, 3)&lt;br /&gt;
setElementID(sweets_car, 'sweets_car')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;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;
-- Code works only if client is syncing ped Sweet&lt;br /&gt;
addCommandHandler('sweet_enter_car',&lt;br /&gt;
function()&lt;br /&gt;
    local sweet = getElementByID('sweet')&lt;br /&gt;
&lt;br /&gt;
    if isElementSyncer(sweet) then&lt;br /&gt;
        setPedEnterVehicle(sweet, getElementByID('sweets_car'), true)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client ped functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetChatboxLayout&amp;diff=68976</id>
		<title>GetChatboxLayout</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetChatboxLayout&amp;diff=68976"/>
		<updated>2021-02-15T08:20:49Z</updated>

		<summary type="html">&lt;p&gt;Toliak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
Returns information about how the chatbox looks.&lt;br /&gt;
&lt;br /&gt;
These values come from the file called: [[Chatboxpresets.xml]] but it depends on what type of preset you currently have, which is chosen from your settings in the 'Interface' tab.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool|int|table getChatboxLayout ( [ string CVar ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''CVar:''' the name of the property you want returned. Can be the following values:&lt;br /&gt;
**'''chat_font''' - Returns the chatbox font&lt;br /&gt;
**'''chat_lines''' - Returns how many lines the chatbox has&lt;br /&gt;
**'''chat_color''' - Returns the background color of the chatbox&lt;br /&gt;
**'''chat_text_color''' - Returns the chatbox text color&lt;br /&gt;
**'''chat_input_color''' - Returns the background color of the chatbox input&lt;br /&gt;
**'''chat_input_prefix_color''' - Returns the color of the input prefix text&lt;br /&gt;
**'''chat_input_text_color''' - Returns the color of the text in the chatbox input&lt;br /&gt;
**'''chat_scale''' - Returns the scale of the text in the chatbox&lt;br /&gt;
**'''chat_position_offset_x''' - Returns the x position offset setting&lt;br /&gt;
**'''chat_position_offset_y''' - Returns the y position offset setting&lt;br /&gt;
**'''chat_position_horizontal''' - Returns the horizontal alignment setting&lt;br /&gt;
**'''chat_position_vertical''' - Returns the vertical alignment setting&lt;br /&gt;
**'''chat_text_alignment''' - Returns the text alignment setting&lt;br /&gt;
**'''chat_width''' - Returns the scale of the background width&lt;br /&gt;
**'''chat_css_style_text''' - Returns whether text fades out over time&lt;br /&gt;
**'''chat_css_style_background''' - Returns whether the background fades out over time&lt;br /&gt;
**'''chat_line_life''' - Returns how long it takes for text to start fading out&lt;br /&gt;
**'''chat_line_fade_out''' - Returns how long takes for text to fade out&lt;br /&gt;
**'''chat_use_cegui''' - Returns whether CEGUI is used to render the chatbox&lt;br /&gt;
**'''text_scale''' - Returns text scale&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*4 numbers if the CVar contains &amp;quot;color&amp;quot;&lt;br /&gt;
*2 numbers if '''chat_scale''' was entered&lt;br /&gt;
*1 number if any other CVar was specified&lt;br /&gt;
*a table of all CVar values, if CVar was not specified&lt;br /&gt;
*''false'' if an invalid CVar was specified&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This code makes the chatbox empty when you type /clear &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; category=&amp;quot;client&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;clear&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        local lines = getChatboxLayout()[&amp;quot;chat_lines&amp;quot;]&lt;br /&gt;
        for i = 1, lines do&lt;br /&gt;
            outputChatBox(&amp;quot;&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code makes the chatbox empty when you type /clear, but with a cleaner code &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;  category=&amp;quot;client&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;clear&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        outputChatbox(('\n'):rep(getChatboxLayout(&amp;quot;chat_lines&amp;quot;)));&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
{{GUI_events}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddVehicleSirens&amp;diff=68972</id>
		<title>AddVehicleSirens</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddVehicleSirens&amp;diff=68972"/>
		<updated>2021-02-14T19:35:55Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Number in the start of variable name looks not cool&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|3968|&lt;br /&gt;
This function adds sirens to a vehicle.&lt;br /&gt;
}}&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 addVehicleSirens ( vehicle theVehicle, int sirenCount, int sirenType [, bool flag360 = false, bool checkLosFlag = true, bool useRandomiser flag = true, bool silentFlag = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[vehicle]]:addSirens}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle to add sirens&lt;br /&gt;
*'''sirenCount:''' The amount of siren points on the vehicle (8 maximum)&lt;br /&gt;
*'''sirenType:''' An integer between 1 and 6 (1: invisible, 2: single, 3+: dual)&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''flag360:''' Visible from all directions (applies to single type only)&lt;br /&gt;
*'''checkLosFlag:''' Check line of sight between camera and light so it won't draw if blocked&lt;br /&gt;
*'''useRandomiser:''' Randomise the light order, false for sequential&lt;br /&gt;
*'''silentFlag:''' If you want the siren to be silent set this to true&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if sirens were successfully added to the vehicle, ''false'' otherwise. &lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a vehicle siren on entering a vehicle and removes a vehicle siren on exiting. (TESTED!)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;addEventHandler(&amp;quot;onVehicleEnter&amp;quot;, root, function(player, seat)&lt;br /&gt;
   if (player) and (seat == 0) then&lt;br /&gt;
      addVehicleSirens(source, 1, 2)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onVehicleExit&amp;quot;, root, function(player, seat)&lt;br /&gt;
   if (player) and (seat == 0) then&lt;br /&gt;
      removeVehicleSirens(source)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.3.0-9.03968|n/a|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=68971</id>
		<title>GetVehicleRespawnRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnRotation&amp;diff=68971"/>
		<updated>2021-02-14T18:37:48Z</updated>

		<summary type="html">&lt;p&gt;Toliak: There are no commas in return types in other function syntax section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn rotation of a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float float float getVehicleRespawnRotation ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnRotation|respawnRotation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn rotation of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn rotation of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Example}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=68970</id>
		<title>GetVehicleRespawnPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=68970"/>
		<updated>2021-02-14T18:36:52Z</updated>

		<summary type="html">&lt;p&gt;Toliak: There are no commas in return types in other function syntax section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn coordinates of a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float float float getVehicleRespawnPosition ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnPosition|respawnPosition|setVehicleRespawnPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn coordinates of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn coordinates of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getRespawnPosition(plr)&lt;br /&gt;
    if (not plr) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local veh = getPedOccupiedVehicle(plr)&lt;br /&gt;
    if (not veh) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local x, y, z = getVehicleRespawnPosition(veh)&lt;br /&gt;
    return x, y, z&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetName&amp;diff=68882</id>
		<title>XmlNodeGetName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetName&amp;diff=68882"/>
		<updated>2021-02-12T19:40:46Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Moved Example header to upper layer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Gets the tag name of the specified XML node.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string xmlNodeGetName ( xmlnode node )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[xmlnode]]:getName|name|xmlNodeSetName}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''node:''' the node to get the tag name of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the tag name of the node if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&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 xml = xmlCreateFile(&amp;quot;test.xml&amp;quot;,&amp;quot;test&amp;quot;)&lt;br /&gt;
local xmlNode = xmlCreateChild(xml,&amp;quot;nextTest&amp;quot;)&lt;br /&gt;
local xmlNodeName = xmlNodeGetName(xmlNode)&lt;br /&gt;
xmlUnloadFile(xml)&lt;br /&gt;
outputConsole(xmlNodeName) --This should output &amp;quot;nextTest&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;
{{XML functions}}&lt;br /&gt;
[[ru:xmlNodeGetName]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedCameraRotation&amp;diff=68881</id>
		<title>SetPedCameraRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedCameraRotation&amp;diff=68881"/>
		<updated>2021-02-12T18:42:28Z</updated>

		<summary type="html">&lt;p&gt;Toliak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note|[[getPedCameraRotation]] may not return the value set by this function. Please refer to [[getPedCameraRotation]] for details.}} &lt;br /&gt;
This function sets the camera rotation of a ped, e.g. where its camera will look at. Don't confuse this with [[getCameraMatrix]], because that function is designed for fixed (scripted) camera moves.&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 setPedCameraRotation ( ped thePed, float cameraRotation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:setCameraRotation|cameraRotation|getPedCameraRotation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] whose camera rotation is to be changed.&lt;br /&gt;
*'''cameraRotation:''' The new direction that the ped will walk if you set their forwards control state. If the ped is the local player, it will also change where his camera is looking at if it isn't fixed (i.e. camera target is the local player).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the camera rotation was changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
The next code snippet adds a command called /rotatecam, which rotates the camera of the player who uses it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function rotateLocalPlayerCamera()&lt;br /&gt;
    --setPedCameraRotation(localPlayer, getPedCameraRotation(localPlayer) + 45) -- This would work if getPedCameraRotation returned non-transformed angles&lt;br /&gt;
    setPedCameraRotation(localPlayer, -(getPedCameraRotation(localPlayer) + 45)) -- Tranform the angle returned and then add 45º to it&lt;br /&gt;
    outputChatBox(&amp;quot;Your camera was rotated 45 degrees counter clockwise.&amp;quot;, 0, 255, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;rotatecam&amp;quot;, rotateLocalPlayerCamera)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client ped functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementLowLOD&amp;diff=68880</id>
		<title>IsElementLowLOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementLowLOD&amp;diff=68880"/>
		<updated>2021-02-12T18:27:11Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add Example header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function reveals if an element is low LOD.&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 isElementLowLOD ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[element]]:isLowLOD||}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] whose low LOD status we want to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the element is low LOD, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example will show how many low lods objects is around you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;lowlod&amp;quot;,function ()&lt;br /&gt;
    local lowlods = 0&lt;br /&gt;
    for i, obj in ipairs(getElementsByType(&amp;quot;object&amp;quot;,root,true)) do&lt;br /&gt;
        if isElementLowLOD(obj) then&lt;br /&gt;
            lowlods = lowlods + 1    &lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(&amp;quot;Was found &amp;quot;..lowlods..&amp;quot; lowlod objects around you.&amp;quot;,255,255,0)&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;
&amp;lt;section name=&amp;quot;Serverside&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
This example will show how many low lods objects is around all the world.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;lowlod&amp;quot;,function ()&lt;br /&gt;
    local lowlods = 0&lt;br /&gt;
    for i, obj in ipairs(getElementsByType(&amp;quot;object&amp;quot;)) do&lt;br /&gt;
        if isElementLowLOD(obj) then&lt;br /&gt;
            lowlods = lowlods + 1    &lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(&amp;quot;Was found &amp;quot;..lowlods..&amp;quot; lowlod objects around you.&amp;quot;,root,255,255,0)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.2|1.2}}&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraInterior&amp;diff=68879</id>
		<title>GetCameraInterior</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraInterior&amp;diff=68879"/>
		<updated>2021-02-12T17:54:04Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Format fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Returns the interior of the local camera (independent of the interior of the local player).&lt;br /&gt;
&lt;br /&gt;
==Procedural==&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;
int getCameraInterior ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:getCameraInterior|cameraInterior|setCameraInterior}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer''': The player whose camera interior you want to get.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; 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;
int getCameraInterior ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||Camera.getInterior|interior|setCameraInterior}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''integer'' indicating the camera's interior, ''false'' if the argument is invalid.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputCameraInterior ( player, command )&lt;br /&gt;
	local interior = getCameraInterior ( player )&lt;br /&gt;
	outputChatBox ( &amp;quot;The camera is in the interior &amp;quot; .. interior, player, 255, 255, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;camera&amp;quot;, outputCameraInterior )&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;
{{New items|3.0140|1.4|&lt;br /&gt;
==Object-oriented==&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;
int player:getCameraInterior ( )&lt;br /&gt;
-- or&lt;br /&gt;
int player.cameraInterior -- to get the camera interior value&lt;br /&gt;
player.cameraInterior = int someValue -- to set the camera interior value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;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;
int Camera.getInterior ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns an ''integer'' indicating the camera's interior, ''false'' if the argument is invalid.&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 outputCameraInterior ( command )&lt;br /&gt;
	local interior = Camera.getInterior ( )&lt;br /&gt;
	outputChatBox ( &amp;quot;The camera is in the interior &amp;quot; .. interior, localPlayer, 255, 255, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;camera&amp;quot;, outputCameraInterior )&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;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:getCameraInterior]]&lt;br /&gt;
[[RO:getCameraInterior]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsSoundLooped&amp;diff=68878</id>
		<title>IsSoundLooped</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsSoundLooped&amp;diff=68878"/>
		<updated>2021-02-12T17:49:33Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Add Example header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20785|This function is used to return the current loop option of the [[sound]] [[element]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isSoundLooped(element theSound)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:isLooped||setSoundLooped}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] [[element]] which you want to get the loop state.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the [[sound]] [[element]] is seted to loop, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mySound&lt;br /&gt;
addEventHandler('onClientResourceStart', resourceRoot, function()&lt;br /&gt;
    mySound = playSound('sound.mp3')&lt;br /&gt;
    setSoundLooped(mySound, true)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler('loop', function()&lt;br /&gt;
    if isElement(mySound) then&lt;br /&gt;
        local newState = not isSoundLooped(mySound)&lt;br /&gt;
        setSoundLooped(mySound, newState)&lt;br /&gt;
        if newState then&lt;br /&gt;
            outputChatBox('The sound will loop...')&lt;br /&gt;
        else&lt;br /&gt;
            outputChatBox('The sound will not loop anymore...')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRadioChannel&amp;diff=68877</id>
		<title>GetRadioChannel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRadioChannel&amp;diff=68877"/>
		<updated>2021-02-12T17:38:31Z</updated>

		<summary type="html">&lt;p&gt;Toliak: Fixed description language&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function is used to retrieve the ID of the current radio channel.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getRadioChannel ( )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the ID of the radio channel.&lt;br /&gt;
{{SoundID}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out the name of your current radio station to the chat box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;getradio&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        outputChatBox ( &amp;quot;You're currently listening to &amp;quot; .. getRadioChannelName ( getRadioChannel() ) .. &amp;quot;!&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[HU:GetRadioChannel]]&lt;br /&gt;
[[AR:getRadioChannel]]&lt;br /&gt;
[[RU:GetRadioChannel]]&lt;br /&gt;
[[PL:GetRadioChannel]]&lt;br /&gt;
[[RO:GetRadioChannel]]&lt;/div&gt;</summary>
		<author><name>Toliak</name></author>
	</entry>
</feed>