<?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=GalAnonim</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=GalAnonim"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/GalAnonim"/>
	<updated>2026-05-17T13:07:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74526</id>
		<title>GetPedHitBone</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74526"/>
		<updated>2022-05-07T23:30:56Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the approximate number of the bone where the ped is hit&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedHitBone( ped thePed, float hitX, float hitY, float hitZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''thePed:''' the [[ped]] whose bone you want to get.&lt;br /&gt;
*'''hitX''', '''hitY''', '''hitZ''': [[float]] world coordinates representing a hit point.&lt;br /&gt;
===Returns===&lt;br /&gt;
An '''int''' with the approximate bone where the [[ped]] take damage, does not work properly serverside&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance, hitBone&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance, hitBone&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientPlayerWeaponFire&amp;quot;, root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement, startX, startY, startZ)&lt;br /&gt;
   if isElement(hitElement) then&lt;br /&gt;
      outputChatBox(&amp;quot;You hit bone &amp;quot;..getPedHitBone(hitElement, hitX, hitY, hitZ) )&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;
'''Author:''' Rick&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=74525</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=74525"/>
		<updated>2022-05-07T23:27:29Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Utility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[addTableChangeHandler]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function monitors the changes of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functionality is used to obtain saved tables using the function ([https://wiki.multitheftauto.com/wiki/SetTableToSql SetTableToSql ]).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns true if the value exists in the table, false if the value does not exist in the table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» These functions are able to sort your tables by a key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.deepmerge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function deep merges two tables. Every nested table will be correspondingly merged.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a new table with only userdata content.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.fromString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts string to a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.toString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts table to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.toStringArray]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts '''array''' to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAccountsRanks]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to detect the account name groups and put them in the chat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[getPlayerFromAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to obtain a player by the name of his account.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangleOnPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle above the player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenStartPositionFromBox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function helps with getting the correct position for your dx-effects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function breaks a long string into a table of separate lines limited to a specific length in pixels, for drawing separately.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[autoAttach]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function attaches one element into another at the same position and rotation they are.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the element is a player or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementUsingData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns table elements that contains the elements data with the given key and value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the nearest element (of a specific type) to a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInAir]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in air or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts date to another look.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two sets of XYZ coordinates. It returns the 3D direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[formatDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistance]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion sirve para obtener la distancia entre dos elementos.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the current month name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[gradientString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function transforms a string in a new coloured gradient string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hex2rgb]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex to rgb.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hexColorToRGB]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex string/number to RGBA values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hexadecimal numbers (colors, for example) from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHSV]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to HSV color space.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function inserts a string within another string at a given position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[tocolor2rgba]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert tocolor to rgba.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGuiElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether or not your mouse is over a specific gui element, this is especially useful if the gui element has a parent. &amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a gridlist's column ID from the column title.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist column become non-sortable.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListSetColumnsFixedWidth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist have all its columns fixed width.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Labels=====&lt;br /&gt;
*[[guiLabelAddEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add an effects to the gui-label like (shadow, outline).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Marker functions ===&lt;br /&gt;
*[[createMarkerAttachedTo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a marker that is attached to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[math.clamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number between range of numbers or it's minimum or maximum.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.getBezierPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get N-th order bezier point.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.lerp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get val between two integer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Compute area of any polygon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.randomDiff]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Generates a pseudo-random integer that's always different from the last random number generated.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.rotVecToEulerAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rotation Vector To Euler Angle&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Math.percentProgress|math.percentProgress]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns a percentage progress from two specific values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.average]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the simple arithmetic mean of multiple numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function lets you conveniently generate and apply a LOD model to a mapping object.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getWorldPositionFromMapPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an F11 map position to world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedGender]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds their gender.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedHitBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the approximate number of the bone where the ped is hit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDiving]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This feature checks that pedestrian is diving in the water.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedAttack]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped attack a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedFollow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped follow a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will get the player name from the ID element data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number of players that are within a certain range of the specified coordinates.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the player previous and next weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make a table of players within certain range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerHitByVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function cancels event when a element is hit by a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[warpToPlayer]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make player warp to another player.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a list of files that are inside a folder of a resource.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the size of a specified resource in kB(kilobyte)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isSoundPlaying]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element is playing or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function plays a video on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds you the first empty seat in a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the nearest vehicle to the specified player in a specified distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleDoubleExhaust]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is exhaust vehicle double.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is moving backwards.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is vehicle upgraded by upgrade ID.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object functions ===&lt;br /&gt;
*[[getDynamicDoorObjectOpenRatio]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you how open a dynamic door is in a range from 0 to 1.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementObject]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you if an element is an object or no.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Engine functions ===&lt;br /&gt;
*[[engineGetCOLsFromLibrary]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the collision data from the col library.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[engineLoadIMGContainer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function loads the IMG container.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use passive timers in your conditions. For example you want to prevent players r&lt;br /&gt;
epeatedly using a command.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[compact]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function create table containing variables and their values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the name of the skin from the given id.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This shared function allows you to check if a char specified is in a string value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[svgCreateRoundedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a rectangle with rounded edges.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Compact&amp;diff=74524</id>
		<title>Compact</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Compact&amp;diff=74524"/>
		<updated>2022-05-07T23:21:52Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function create table containing variables and their values.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table compact(table Array, table/string Variable)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''Array:''' the [[table]] handles it recursively.&lt;br /&gt;
*'''Variable''': [[table]] or [[string]] takes a variable number of parameters. Each parameter can be either a string containing the name of the variable, or an array of variable names. The array can contain other arrays of variable names inside it.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the output [[table]] with all the variables added to it.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function compact(g, ...)&lt;br /&gt;
    local args = {...}&lt;br /&gt;
    local tbl = {}&lt;br /&gt;
    g = g or _G&lt;br /&gt;
    for i, v in ipairs(args) do&lt;br /&gt;
        for w in string.gmatch(v, &amp;quot;[%w_]+&amp;quot;) do&lt;br /&gt;
            tbl[v] = g[w]&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return tbl&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared Function&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;
&lt;br /&gt;
-- AND FORMAT FUNCTION --- With EXEMPLE&lt;br /&gt;
function format(s, tab)&lt;br /&gt;
    return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function compact(g, ...)&lt;br /&gt;
    local args = {...}&lt;br /&gt;
    local tbl = {}&lt;br /&gt;
    g = g or _G&lt;br /&gt;
    for i, v in ipairs(args) do&lt;br /&gt;
        for w in string.gmatch(v, &amp;quot;[%w_]+&amp;quot;) do&lt;br /&gt;
            tbl[v] = g[w]&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return tbl&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function testCompact()&lt;br /&gt;
   local tbl = {&lt;br /&gt;
       firstname = &amp;quot;Peter&amp;quot;,&lt;br /&gt;
       lastname = &amp;quot;Griffin&amp;quot;,&lt;br /&gt;
       age = 41&lt;br /&gt;
   }&lt;br /&gt;
   return format(&amp;quot;My lastname is ${lastname} and age its ${age}&amp;quot;, compact(tbl, &amp;quot;lastname&amp;quot;,'age'))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
outputChatBox( testCompact() )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' @FroPop&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=74523</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=74523"/>
		<updated>2022-05-07T23:19:25Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Ped functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[addTableChangeHandler]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function monitors the changes of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functionality is used to obtain saved tables using the function ([https://wiki.multitheftauto.com/wiki/SetTableToSql SetTableToSql ]).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns true if the value exists in the table, false if the value does not exist in the table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» These functions are able to sort your tables by a key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.deepmerge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function deep merges two tables. Every nested table will be correspondingly merged.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a new table with only userdata content.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.fromString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts string to a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.toString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts table to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.toStringArray]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts '''array''' to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAccountsRanks]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to detect the account name groups and put them in the chat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[getPlayerFromAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to obtain a player by the name of his account.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangleOnPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle above the player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenStartPositionFromBox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function helps with getting the correct position for your dx-effects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function breaks a long string into a table of separate lines limited to a specific length in pixels, for drawing separately.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[autoAttach]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function attaches one element into another at the same position and rotation they are.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the element is a player or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementUsingData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns table elements that contains the elements data with the given key and value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the nearest element (of a specific type) to a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInAir]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in air or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts date to another look.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two sets of XYZ coordinates. It returns the 3D direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[formatDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistance]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion sirve para obtener la distancia entre dos elementos.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the current month name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[gradientString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function transforms a string in a new coloured gradient string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hex2rgb]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex to rgb.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hexColorToRGB]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex string/number to RGBA values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hexadecimal numbers (colors, for example) from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHSV]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to HSV color space.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function inserts a string within another string at a given position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[tocolor2rgba]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert tocolor to rgba.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGuiElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether or not your mouse is over a specific gui element, this is especially useful if the gui element has a parent. &amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a gridlist's column ID from the column title.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist column become non-sortable.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListSetColumnsFixedWidth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist have all its columns fixed width.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Labels=====&lt;br /&gt;
*[[guiLabelAddEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add an effects to the gui-label like (shadow, outline).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Marker functions ===&lt;br /&gt;
*[[createMarkerAttachedTo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a marker that is attached to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[math.clamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number between range of numbers or it's minimum or maximum.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.getBezierPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get N-th order bezier point.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.lerp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get val between two integer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Compute area of any polygon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.randomDiff]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Generates a pseudo-random integer that's always different from the last random number generated.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.rotVecToEulerAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rotation Vector To Euler Angle&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Math.percentProgress|math.percentProgress]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns a percentage progress from two specific values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.average]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the simple arithmetic mean of multiple numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function lets you conveniently generate and apply a LOD model to a mapping object.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getWorldPositionFromMapPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an F11 map position to world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedGender]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds their gender.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedHitBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the approximate number of the bone where the ped is hit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDiving]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This feature checks that pedestrian is diving in the water.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedAttack]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped attack a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedFollow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped follow a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will get the player name from the ID element data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number of players that are within a certain range of the specified coordinates.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the player previous and next weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make a table of players within certain range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerHitByVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function cancels event when a element is hit by a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[warpToPlayer]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make player warp to another player.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a list of files that are inside a folder of a resource.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the size of a specified resource in kB(kilobyte)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isSoundPlaying]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element is playing or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function plays a video on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds you the first empty seat in a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the nearest vehicle to the specified player in a specified distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleDoubleExhaust]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is exhaust vehicle double.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is moving backwards.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is vehicle upgraded by upgrade ID.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object functions ===&lt;br /&gt;
*[[getDynamicDoorObjectOpenRatio]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you how open a dynamic door is in a range from 0 to 1.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementObject]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you if an element is an object or no.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Engine functions ===&lt;br /&gt;
*[[engineGetCOLsFromLibrary]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the collision data from the col library.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[engineLoadIMGContainer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function loads the IMG container.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use passive timers in your conditions. For example you want to prevent players repeatedly using a command.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the name of the skin from the given id.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This shared function allows you to check if a char specified is in a string value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[svgCreateRoundedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a rectangle with rounded edges.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Compact&amp;diff=74522</id>
		<title>Compact</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Compact&amp;diff=74522"/>
		<updated>2022-05-07T23:17:02Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Useful Function}} &amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt; __NOTOC__ '''Author:''' @FroPop  This function create table containing variables and their values. ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; table compact(table Array, table/string Variable) &amp;lt;/syntaxhighlight&amp;gt; ===Required Arguments===  * '''Array:''' the table handles it recursively. *'''Variable''': table or string takes a variable number of parameters. Each parameter can be either a string containing the n...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
'''Author:''' @FroPop&lt;br /&gt;
&lt;br /&gt;
This function create table containing variables and their values.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table compact(table Array, table/string Variable)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''Array:''' the [[table]] handles it recursively.&lt;br /&gt;
*'''Variable''': [[table]] or [[string]] takes a variable number of parameters. Each parameter can be either a string containing the name of the variable, or an array of variable names. The array can contain other arrays of variable names inside it.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the output [[table]] with all the variables added to it.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Author: @FroPop&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function compact(g, ...)&lt;br /&gt;
    local args = {...}&lt;br /&gt;
    local tbl = {}&lt;br /&gt;
    g = g or _G&lt;br /&gt;
    for i, v in ipairs(args) do&lt;br /&gt;
        for w in string.gmatch(v, &amp;quot;[%w_]+&amp;quot;) do&lt;br /&gt;
            tbl[v] = g[w]&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return tbl&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared Function&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;
&lt;br /&gt;
-- AND FORMAT FUNCTION --- With EXEMPLE&lt;br /&gt;
function format(s, tab)&lt;br /&gt;
    return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function compact(g, ...)&lt;br /&gt;
    local args = {...}&lt;br /&gt;
    local tbl = {}&lt;br /&gt;
    g = g or _G&lt;br /&gt;
    for i, v in ipairs(args) do&lt;br /&gt;
        for w in string.gmatch(v, &amp;quot;[%w_]+&amp;quot;) do&lt;br /&gt;
            tbl[v] = g[w]&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return tbl&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function testCompact()&lt;br /&gt;
   local tbl = {&lt;br /&gt;
       firstname = &amp;quot;Peter&amp;quot;,&lt;br /&gt;
       lastname = &amp;quot;Griffin&amp;quot;,&lt;br /&gt;
       age = 41&lt;br /&gt;
   }&lt;br /&gt;
   return format(&amp;quot;My lastname is ${lastname} and age its ${age}&amp;quot;, compact(tbl, &amp;quot;lastname&amp;quot;,'age'))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
outputChatBox( testCompact() )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74521</id>
		<title>GetPedHitBone</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74521"/>
		<updated>2022-05-07T22:58:40Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the approximate number of the bone where the ped is hit&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedHitBone( ped thePed, float hitX, float hitY, float hitZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''thePed:''' the [[ped]] whose bone you want to get.&lt;br /&gt;
*'''hitX''', '''hitY''', '''hitZ''': [[float]] world coordinates representing a hit point.&lt;br /&gt;
===Returns===&lt;br /&gt;
An '''int''' with the approximate bone where the [[ped]] take damage, does not work properly serverside&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance, hitBone&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance, hitBone&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientPlayerWeaponFire&amp;quot;, root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement, startX, startY, startZ)&lt;br /&gt;
   if isElement(hitElement) then&lt;br /&gt;
      outputChatBox(&amp;quot;You hit bone &amp;quot;..getPedHitBone(hitElement, hitX, hitY, hitZ) )&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;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74520</id>
		<title>GetPedHitBone</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedHitBone&amp;diff=74520"/>
		<updated>2022-05-07T22:49:09Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Useful Function}} &amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt; __NOTOC__ This function gets the approximate number of the bone where the ped is hit ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int getPedHitBone( ped thePed, float hitX, float hitY, float hitZ ) &amp;lt;/syntaxhighlight&amp;gt; ===Required Arguments===  * '''thePed:''' the ped whose bone you want to get. *'''hitX''', '''hitY''', '''hitZ''': float world coordinates representing a hit point. ===Returns=== An '''int''' with the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the approximate number of the bone where the ped is hit&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedHitBone( ped thePed, float hitX, float hitY, float hitZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''thePed:''' the [[ped]] whose bone you want to get.&lt;br /&gt;
*'''hitX''', '''hitY''', '''hitZ''': [[float]] world coordinates representing a hit point.&lt;br /&gt;
===Returns===&lt;br /&gt;
An '''int''' with the approximate bone where the [[ped]] take damage, does not work properly serverside&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;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 getPedHitBone(thePed, hitX, hitY, hitZ)&lt;br /&gt;
   assert(isElement(thePed) and (getElementType(thePed) == &amp;quot;ped&amp;quot; or getElementType(thePed) == &amp;quot;player&amp;quot;), &amp;quot;Bad argument @ 'getPedHitBone' [Expected ped/player at argument 1, got &amp;quot; .. tostring(thePed) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitX), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 2, got &amp;quot; .. tostring(hitX) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitY), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 3, got &amp;quot; .. tostring(hitY) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   assert(tonumber(hitZ), &amp;quot;Bad argument @ 'getPedHitBone' [Expected vector3 at argument 4, got &amp;quot; .. tostring(hitZ) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
   local nowDistance&lt;br /&gt;
   local boneIDs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 51, 52, 53, 54}&lt;br /&gt;
   for _,bone in pairs(boneIDs) do&lt;br /&gt;
      local boneX, boneY, boneZ = getPedBonePosition(thePed, bone)&lt;br /&gt;
      local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, boneX, boneY, boneZ)&lt;br /&gt;
      if nowDistance and (distance &amp;lt; nowDistance) then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      elseif not nowDistance then&lt;br /&gt;
         nowDistance, hitBone = distance, bone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   return hitBone&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientPlayerWeaponFire&amp;quot;, root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement, startX, startY, startZ)&lt;br /&gt;
   if isElement(hitElement) then&lt;br /&gt;
      outputChatBox(&amp;quot;You hit bone &amp;quot;..getPedHitBone(hitElement, hitX, hitY, hitZ) )&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;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73077</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73077"/>
		<updated>2021-11-26T14:11:50Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* triggerTransaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the [https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key restrictions key]&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===createTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function creates instructions for the data transfer in the form of a transaction that must be accepted or canceled.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int exports.entityData:createTransaction()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the index of a new transaction created&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===triggerTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function acceptance of the transaction for sending must be created beforehand, unless you send the instruction itself in the form of an array, then no transaction is needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:triggerTransaction(int transaction/table transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed &lt;br /&gt;
*'''table transaction:''' - An table with the instruction to be executed to setEntityData&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===cancelTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This feature will cancel the transaction and will not allow it to be submitted correctly.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:cancelTransaction(int transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73076</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73076"/>
		<updated>2021-11-26T14:10:03Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* createTransaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the [https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key restrictions key]&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===createTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function creates instructions for the data transfer in the form of a transaction that must be accepted or canceled.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int exports.entityData:createTransaction()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the index of a new transaction created&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===triggerTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function acceptance of the transaction for sending must be created beforehand, unless you send the instruction itself in the form of an array, then no transaction is needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:triggerTransaction(int transaction/table transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===cancelTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This feature will cancel the transaction and will not allow it to be submitted correctly.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:cancelTransaction(int transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73075</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73075"/>
		<updated>2021-11-26T14:09:33Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the [https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key restrictions key]&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===createTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function creates instructions for the data transfer in the form of a transaction that must be accepted or canceled.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:createTransaction()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the index of a new transaction created&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===triggerTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function acceptance of the transaction for sending must be created beforehand, unless you send the instruction itself in the form of an array, then no transaction is needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:triggerTransaction(int transaction/table transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===cancelTransaction===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This feature will cancel the transaction and will not allow it to be submitted correctly.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.entityData:cancelTransaction(int transaction)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid transaction other than false&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73074</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73074"/>
		<updated>2021-11-26T14:01:42Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the [https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key restrictions key]&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73068</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73068"/>
		<updated>2021-11-26T01:53:26Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEnintyData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the [https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key restrictions key]&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData/restrictions_key&amp;diff=73067</id>
		<title>Resource:EntityData/restrictions key</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData/restrictions_key&amp;diff=73067"/>
		<updated>2021-11-26T01:46:53Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;== Restrictions key == Set of data validation functions for the key according to the assumed array in the flag.  = Introduction = setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = string type,  value = string value, bettwen = table bettwen, function func = function value operation, int len = length only works for string data operations})  The flag function mainly consists of an array and basic concepts such as: * string type - A specific data type from Lua and the MTA platform. * string...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Restrictions key ==&lt;br /&gt;
Set of data validation functions for the key according to the assumed array in the flag.&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = string type,  value = string value, bettwen = table bettwen, function func = function value operation, int len = length only works for string data operations})&lt;br /&gt;
&lt;br /&gt;
The flag function mainly consists of an array and basic concepts such as:&lt;br /&gt;
* string type - A specific data type from Lua and the MTA platform.&lt;br /&gt;
* string value - The type of data type&lt;br /&gt;
* table bettwen - An array with two numeric values ​​from to, the first must be the smallest and the second largest.&lt;br /&gt;
* function func - A function that checks the correctness of data according to your needs, the function structure consists of the default value parameter already added.&lt;br /&gt;
* int len - The value of the maximum accepted data length works for string&lt;br /&gt;
&lt;br /&gt;
= Explanation =&lt;br /&gt;
We divide the type into: userdata, number, string, table, boolean values ​​are not checked by the flag, if they are used, this fragment can be omitted.&lt;br /&gt;
The accepted types of values ​​for particular things are these: &lt;br /&gt;
* userdata:&lt;br /&gt;
** resource-data&lt;br /&gt;
** xml-node&lt;br /&gt;
** lua-timer&lt;br /&gt;
** vector2&lt;br /&gt;
** vector3&lt;br /&gt;
** vector4&lt;br /&gt;
** matrix&lt;br /&gt;
** account&lt;br /&gt;
** db-query&lt;br /&gt;
** acl&lt;br /&gt;
** acl-group&lt;br /&gt;
** ban&lt;br /&gt;
** text-item&lt;br /&gt;
** text-display&lt;br /&gt;
** vehicle&lt;br /&gt;
** ped&lt;br /&gt;
** player&lt;br /&gt;
** object&lt;br /&gt;
** gui&lt;br /&gt;
** element&lt;br /&gt;
* number&lt;br /&gt;
** int&lt;br /&gt;
** float&lt;br /&gt;
* string&lt;br /&gt;
* table&lt;br /&gt;
&lt;br /&gt;
= Bettwen =&lt;br /&gt;
can use the term bettwen for numeric and string values, &lt;br /&gt;
The structure of the structure is as follows, example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, bettwen = {0, 50} })&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Values ​​that will be adopted will be between 0 and 50, in the case of others they will not be &lt;br /&gt;
assigned to the element.&lt;br /&gt;
&lt;br /&gt;
= func =&lt;br /&gt;
A custom function that you can engage if you lack any data validation capabilities for a key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local funcExample = [[&lt;br /&gt;
function(value)&lt;br /&gt;
    return value%2 == 0&lt;br /&gt;
end]]&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, func = funcExample })&lt;br /&gt;
&lt;br /&gt;
-- OR&lt;br /&gt;
&lt;br /&gt;
funcCheckEven = function(value)&lt;br /&gt;
    return value%2 == 0&lt;br /&gt;
end&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, func = funcCheckEven})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This function will check if the number we give is even if it allows it to be assigned to an element.&lt;br /&gt;
&lt;br /&gt;
= len value =&lt;br /&gt;
Length checking for the string data type&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setKeyFlag(&amp;quot;descrpition&amp;quot;, {type = &amp;quot;string&amp;quot;, len = 25})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the value for the description key is 25 characters, then it will be assigned to the element.&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73066</id>
		<title>Resource:EntityData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData&amp;diff=73066"/>
		<updated>2021-11-26T01:16:24Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Resource page}} &amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;  '''Name''': entityData  '''Developer''': User:GalAnonim (Rick)  '''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;  '''GitHub Source''': https://github.com/httpRick/entityData/tree/main  '''Current Version''': 1.0.0  &amp;lt;/div&amp;gt;  == Overview == The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData  ==Exporte...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': entityData&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/entityData/tree/main&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The system of non-standard data operation for Elements on the MTA SA platform replaces ElementData&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===setEntityData===&lt;br /&gt;
This function passes user information about the element to entity Data, the data can be created by the server but you should avoid passing data from client to server when assigning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setEntityData(element/table theElement, var/table key, var value, [string type=&amp;quot;public&amp;quot;, int transaction])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' The element/elements you wish to attach the data to.&lt;br /&gt;
*'''var key:''' The key/keys you wish to store the data under.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''  type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
*'''int transaction:''' - The transaction number, if this value is provided, the data transfer will not be executed immediately&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was set succesfully, false otherwise.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getEntityData===&lt;br /&gt;
This function retrieves entity data attached to an element under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns a variable/tables containing the requested entity data, or false if the element/elements or the entity data does not exist.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getAllEnintyData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function returns a table of all entity data of an element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:getAllEnintyData(element/table theElement, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:''' type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;''&lt;br /&gt;
** ''&amp;quot;local&amp;quot;''&lt;br /&gt;
** ''&amp;quot;private&amp;quot;''&lt;br /&gt;
** ''&amp;quot;all&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successful, returns a table with as keys the names of the entity data and as values the corresponding entity data values. Returns false in case of failure.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hasEntityData===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function checks if an element has entity data available under a certain key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:hasEntityData(element/table theElement, var/table key, [string type=&amp;quot;public&amp;quot;])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''element theElement:''' This is the element/elements with data you want to retrieve.&lt;br /&gt;
*'''var key:''' The name/names of the entity data entry you want to check for. &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string type:'''type of data synchronization&lt;br /&gt;
** ''&amp;quot;public&amp;quot;'' - Synchronizes between the server and the client, and between the client and the server (required to be enabled in the options)&lt;br /&gt;
** ''&amp;quot;local&amp;quot;'' - It does not synchronize, it remains on the side on which it was given&lt;br /&gt;
** ''&amp;quot;private&amp;quot;'' - Assigns and synchronizes one value for a given key for all items&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns true if the element contains entity data for key, or false if the element doesn't exist or there is no data associated with the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===setKeyFlag===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function imposes restrictions on the key which, if not satisfied, will not perform the entity data assignment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.entityData:setKeyFlag(var key, table flag)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''var key:''' The name of the entity data entry you want to check for. &lt;br /&gt;
*'''table flag:''' A flag containing all the restrictions key.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the flag is set and false if the flag is not set on the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler/PL&amp;diff=72991</id>
		<title>Resource:Compiler/PL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler/PL&amp;diff=72991"/>
		<updated>2021-11-01T15:17:23Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Nazwa''': Compiler&lt;br /&gt;
&lt;br /&gt;
'''Deweloper''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''Stan''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Źródło Github''': https://github.com/httpRick/Compiler/tree/master&lt;br /&gt;
&lt;br /&gt;
'''Serwer Discord''': https://discord.gg/gJszaFjDQA&lt;br /&gt;
&lt;br /&gt;
'''Aktualna wersja''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Omówienie ==&lt;br /&gt;
Prosty w użyciu zasób, którym można eksportować zarówno po stronie klienta jak i po stronie serwera. polegająca na szyfrowaniu/odszyfrowywaniu plików.&lt;br /&gt;
&lt;br /&gt;
==Wyeksportowane funkcje==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Ta funkcja szyfruje dane pliku.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty=== &lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''int maxBytes:''' Maksymalna liczba całkowita bajtów do zakodowania, domyślnie 1024 bajty. (nie zaleca się używania mniej niż 1024 bajtów)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca zaszyfrowane bajty, które zostały odczytane w pliku, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Ta funkcja odszyfrowuje dane pliku.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca odszyfrowane bajty, które zostały odczytane w pliku, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Funkcja szyfruje i nadpisuje plik lub tworzy nowy w określonej nowej ścieżce.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''string newFilePath:''' Docelowa nowa ścieżka utworzenia nowego pliku.&lt;br /&gt;
*'''int maxBytes:''' Maksymalna liczba całkowita bajtów do zakodowania, domyślnie 1024 bajty. (nie zaleca się używania mniej niż 1024 bajtów)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca true przy prawidłowym szyfrowaniu, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Funkcja odszyfrowuje i nadpisuje plik lub tworzy nowy w określonej nowej ścieżce.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''string newFilePath:''' Docelowa nowa ścieżka utworzenia nowego pliku.&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca true przy prawidłowym odszyfrowaniu, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Przykłady==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;twojPlik.txt&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;twojPlik.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowano twojPlik.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować twojPlik.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowany model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;twojPlik.txtc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Pomyślnie odszyfrowano twojPlik.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Nie udało się odszyfrować twojPlik.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i wczytano model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&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 onResourceStart()&lt;br /&gt;
	local isEncrypted = exports.Compiler:replaceCompileFile(&amp;quot;twojPlik.txt&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;, &amp;quot;twojPlik.txtc&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowano i utworzono twojPlik.txtc&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować twojPlik.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isEncryptedTxd = exports.Compiler:replaceCompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local isEncryptedDff = exports.Compiler:replaceCompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if isEncryptedTxd and isEncryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowane i nadpisano pliki modelu banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&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 onResourceStart()&lt;br /&gt;
	local isDecrypted = exports.Compiler:replaceDecompileFile(&amp;quot;twojPlik.txtc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;, &amp;quot;twojPlik.decrypted&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i utworzono twojPlik.decrypted&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować twojPlik.txtc&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isDecryptedTxd = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local isDecryptedDff = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if isDecryptedTxd and isDecryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i nadpisano pliki modelu banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler/PL&amp;diff=72990</id>
		<title>Resource:Compiler/PL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler/PL&amp;diff=72990"/>
		<updated>2021-11-01T15:11:56Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Resource page}} &amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;  '''Nazwa''': Compiler  '''Deweloper''': User:GalAnonim (Rick)  '''Stan''': &amp;lt;span style=&amp;quot;co...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Nazwa''': Compiler&lt;br /&gt;
&lt;br /&gt;
'''Deweloper''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''Stan''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Źródło Github''': https://github.com/httpRick/Compiler/tree/master&lt;br /&gt;
&lt;br /&gt;
'''Serwer Discord''': https://discord.gg/gJszaFjDQA&lt;br /&gt;
&lt;br /&gt;
'''Aktualna wersja''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Omówienie ==&lt;br /&gt;
Prosty w użyciu zasób, który można eksportować zarówno po stronie klienta jak i po stronie serwera. polegająca na szyfrowaniu/odszyfrowywaniu plików.&lt;br /&gt;
&lt;br /&gt;
==Wyeksportowane funkcje==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Ta funkcja szyfruje dane pliku.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty=== &lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''int maxBytes:''' Maksymalna liczba całkowita bajtów do zakodowania, domyślnie 1024 bajty. (nie zaleca się używania mniej niż 1024 bajtów)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca zaszyfrowane bajty, które zostały odczytane w pliku, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Ta funkcja odszyfrowuje dane pliku.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca odszyfrowane bajty, które zostały odczytane w pliku, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Funkcja szyfruje i nadpisuje plik lub tworzy nowy w określonej nowej ścieżce.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''string newFilePath:''' Docelowa nowa ścieżka utworzenia nowego pliku.&lt;br /&gt;
*'''int maxBytes:''' Maksymalna liczba całkowita bajtów do zakodowania, domyślnie 1024 bajty. (nie zaleca się używania mniej niż 1024 bajtów)&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca true przy prawidłowym szyfrowaniu, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Funkcja odszyfrowuje i nadpisuje plik lub tworzy nowy w określonej nowej ścieżce.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Wymagane Argumenty===&lt;br /&gt;
*'''string filePath:''' [[filepath]] ścieżka do pliku w następującym formacie: '''&amp;quot;:nazwazasobu/ścieżka&amp;quot;'''. 'nazwazasobu' to nazwa zasobu, w którym znajduje się plik, oraz 'path' to ścieżka do katalogu głównego zasobu z plikiem.&lt;br /&gt;
:Na przykład, jeśli w zasobie „objectSearch” znajduje się plik o nazwie „coolObjects.txt”, można go w ten sposób otworzyć z innego zasobu: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:Jeżeli plik znajduje się w bieżącym zasobie, wystarczy ścieżka do pliku np. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' Klucz, którego chcesz użyć jako klucza kodowania pliku (używanych jest pierwsze 16 znaków wyniku)&lt;br /&gt;
===Opcjonalne Argumenty===&lt;br /&gt;
*'''string newFilePath:''' Docelowa nowa ścieżka utworzenia nowego pliku.&lt;br /&gt;
===Zwroty===&lt;br /&gt;
Zwraca true przy prawidłowym odszyfrowaniu, jeśli coś się nie powiedzie zwraca false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Przykłady==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;twojPlik.txt&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;twojPlik.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowano twojPlik.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować twojPlik.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowany model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;twojPlik.txtc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Pomyślnie odszyfrowano twojPlik.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Nie udało się odszyfrować twojPlik.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i wczytano model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&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 onResourceStart()&lt;br /&gt;
	local isEncrypted = exports.Compiler:replaceCompileFile(&amp;quot;twojPlik.txt&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;, &amp;quot;twojPlik.txtc&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowano i utworzono twojPlik.txtc&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować twojPlik.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isEncryptedTxd = exports.Compiler:replaceCompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local isEncryptedDff = exports.Compiler:replaceCompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if isEncryptedTxd and isEncryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie zaszyfrowane i nadpisano pliki modelu banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się zaszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&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 onResourceStart()&lt;br /&gt;
	local isDecrypted = exports.Compiler:replaceDecompileFile(&amp;quot;twojPlik.txtc&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;, &amp;quot;twojPlik.decrypted&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i utworzono twojPlik.decrypted&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować twojPlik.txtc&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isDecryptedTxd = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	local isDecryptedDff = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;TwojeHaslo&amp;quot;)&lt;br /&gt;
	if isDecryptedTxd and isDecryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Pomyślnie odszyfrowano i nadpisano pliki modelu banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Nie udało się odszyfrować modelu banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72989</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72989"/>
		<updated>2021-11-01T13:54:01Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': Compiler&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:GalAnonim]] (Rick)&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/Compiler/tree/master&lt;br /&gt;
&lt;br /&gt;
'''Server Discord''': https://discord.gg/gJszaFjDQA&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&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 onResourceStart()&lt;br /&gt;
	local isEncrypted = exports.Compiler:replaceCompileFile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and created yourFile.txtc&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isEncryptedTxd = exports.Compiler:replaceCompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isEncryptedDff = exports.Compiler:replaceCompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isEncryptedTxd and isEncryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&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 onResourceStart()&lt;br /&gt;
	local isDecrypted = exports.Compiler:replaceDecompileFile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.decrypted&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and created yourFile.decrypted&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isDecryptedTxd = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isDecryptedDff = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isDecryptedTxd and isDecryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72988</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72988"/>
		<updated>2021-11-01T13:43:22Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Name''': Compiler&lt;br /&gt;
&lt;br /&gt;
'''Developer''': [[User:Rick]]&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/httpRick/Compiler/tree/master&lt;br /&gt;
&lt;br /&gt;
'''Server Discord''': https://discord.gg/gJszaFjDQA&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 1.0.0 &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&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 onResourceStart()&lt;br /&gt;
	local isEncrypted = exports.Compiler:replaceCompileFile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and created yourFile.txtc&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isEncryptedTxd = exports.Compiler:replaceCompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isEncryptedDff = exports.Compiler:replaceCompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isEncryptedTxd and isEncryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&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 onResourceStart()&lt;br /&gt;
	local isDecrypted = exports.Compiler:replaceDecompileFile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.decrypted&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and created yourFile.decrypted&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isDecryptedTxd = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isDecryptedDff = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isDecryptedTxd and isDecryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72987</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72987"/>
		<updated>2021-11-01T12:59:27Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
This resource allows you to compile and decompile files of various types.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&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 onResourceStart()&lt;br /&gt;
	local isEncrypted = exports.Compiler:replaceCompileFile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and created yourFile.txtc&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isEncryptedTxd = exports.Compiler:replaceCompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isEncryptedDff = exports.Compiler:replaceCompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isEncryptedTxd and isEncryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&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 onResourceStart()&lt;br /&gt;
	local isDecrypted = exports.Compiler:replaceDecompileFile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;, &amp;quot;yourFile.decrypted&amp;quot;)&lt;br /&gt;
	if isEncrypted then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and created yourFile.decrypted&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local isDecryptedTxd = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local isDecryptedDff = exports.Compiler:replaceDecompileFile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if isDecryptedTxd and isDecryptedDff then&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted and overwritten banshee model files&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72986</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72986"/>
		<updated>2021-11-01T12:47:41Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
This resource allows you to compile and decompile files of various types.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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 onResourceStart()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
&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 onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&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 onResourceStart()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, onResourceStart)&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;
function onClientResourceStart()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onClientResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72985</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72985"/>
		<updated>2021-11-01T12:44:03Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
This resource allows you to compile and decompile files of various types.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, function()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, function()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&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;
===fileDecompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, resourceRoot, function()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, function()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&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;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72984</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72984"/>
		<updated>2021-11-01T12:42:41Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
This resource allows you to compile and decompile files of various types.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local encryptedData = exports.Compiler:fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local txd = exports.Compiler:fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&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;
===fileDecompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local decryptedData = exports.Compiler:fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local txd = exports.Compiler:fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = exports.Compiler:fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&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;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72983</id>
		<title>Resource:Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Compiler&amp;diff=72983"/>
		<updated>2021-11-01T12:37:38Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Resource page}} This resource allows you to compile and decompile files of various types.  == Overview == A simple-to-use resource that can be exported both on the client si...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
This resource allows you to compile and decompile files of various types.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A simple-to-use resource that can be exported both on the client side and on the server side. consisting in the encryption/decryption of files&lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function encrypts the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileCompile(string filePath, var key, [int maxBytes = 1024])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file encoding key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the encrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===fileDecompile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function decrypted the data of the file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string exports.Compiler:fileDecompile(string filePath, var key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the decrypted bytes that have been read in the file, if something is unsuccessful, returns false.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceCompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function encrypts and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceCompileFile(string filePath, var key, [string newFilePath, int maxBytes])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
*'''int maxBytes:''' Maximum interger of bytes to be encoded, default is 1024 bytes. (using less than 1024 bytes is not recommended)&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid encryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===replaceDecompileFile===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
The function decrypted and overwrites the file or creates a new one at the specified path&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean exports.Compiler:replaceDecompileFile(string filePath, var key, [string newFilePath])&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if there is a file named 'coolObjects.txt' in the resource 'objectSearch', it can be opened from another resource this way: ''fileOpen(&amp;quot;:objectSearch/coolObjects.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileOpen(&amp;quot;coolObjects.txt&amp;quot;)''.&lt;br /&gt;
*'''var key:''' The key you want to use as the file decrypted key (the first 16 characters of the result are used)&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''string newFilePath:''' Destination filepath for the specified source file in the same format.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true on valid decryption, and returns false if unsuccessful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===fileCompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local encryptedData = fileCompile(&amp;quot;yourFile.txt&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if encryptedData then&lt;br /&gt;
		local fileHandler = fileCreate(&amp;quot;yourFile.txtc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandler, encryptedData)&lt;br /&gt;
		fileClose(fileHandler)&lt;br /&gt;
        outputChatBox(encryptedData)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted yourFile.txt&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted yourFile.txt&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local txd = fileCompile(&amp;quot;banshee.txd&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = fileCompile(&amp;quot;banshee.dff&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local fileHandlerTxd = fileCreate(&amp;quot;banshee.txdc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerTxd, txd)&lt;br /&gt;
		fileClose(fileHandlerTxd)&lt;br /&gt;
&lt;br /&gt;
		local fileHandlerDff = fileCreate(&amp;quot;banshee.dffc&amp;quot;)&lt;br /&gt;
		fileWrite(fileHandlerDff, dff)&lt;br /&gt;
		fileClose(fileHandlerDff)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully encrypted model banshee&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to encrypted model banshee&amp;quot;)&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;
===fileDecompile===&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;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local decryptedData = fileDecompile(&amp;quot;yourFile.txtc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
    if decryptedData then&lt;br /&gt;
    	outputChatBox(decryptedData)&lt;br /&gt;
    	outputChatBox(&amp;quot;Successfully decrypted yourFile.txtc&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
    	outputChatBox(&amp;quot;Failed to decrypted yourFile.txtc&amp;quot;)&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource()), function()&lt;br /&gt;
	local txd = fileDecompile(&amp;quot;banshee.txdc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	local dff = fileDecompile(&amp;quot;banshee.dffc&amp;quot;, &amp;quot;YourPassword&amp;quot;)&lt;br /&gt;
	if txd and dff then&lt;br /&gt;
		local loadTXD = engineLoadTXD(txd)&lt;br /&gt;
		engineImportTXD(loadTXD, 429)&lt;br /&gt;
		local loadDFF = engineLoadDFF(dff)&lt;br /&gt;
		engineReplaceModel(loadDFF, 429)&lt;br /&gt;
		outputChatBox(&amp;quot;Successfully decrypted model banshee and loaded&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to decrypted model banshee&amp;quot;)&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;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementUsingData&amp;diff=70909</id>
		<title>GetElementUsingData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementUsingData&amp;diff=70909"/>
		<updated>2021-04-22T16:29:26Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Post-conversation editing on Multi Theft Auto Discord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function returns an [[element]] that has [[SetElementData|element data]].&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element getElementUsingData ( string key, var value [, string type] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''key''': The key that the wanted element has.&lt;br /&gt;
* '''value''': The value that the wanted element has.&lt;br /&gt;
&lt;br /&gt;
==Additional arguments==&lt;br /&gt;
* '''type''': The [[Element|element type]] that the wanted element has.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns table elements that contains the elements data with the given key and value.&lt;br /&gt;
&lt;br /&gt;
==Code==&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 getElementUsingData(key, value, type)&lt;br /&gt;
    type = type or &amp;quot;player&amp;quot;&lt;br /&gt;
    local returnedArray = {}&lt;br /&gt;
    for indexTable, elementTable in ipairs(getElementsByType(type)) do&lt;br /&gt;
        local elementData = getElementData(elementTable, key)&lt;br /&gt;
        if elementData == value then&lt;br /&gt;
            returnedArray[#returnedArray + 1] = elementTable&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return #returnedArray &amp;gt; 0 and returnedArray or false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Author:''' Pawcio#4564&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;
addCommandHandler(&amp;quot;get&amp;quot;, function(player, command, key, value, type)&lt;br /&gt;
    if key and value then&lt;br /&gt;
        outputChatBox(getElementUsingData(key, value, type))&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Skinid2.png&amp;diff=69691</id>
		<title>File:Skinid2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Skinid2.png&amp;diff=69691"/>
		<updated>2021-03-24T15:48:48Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Skinid1.png&amp;diff=69690</id>
		<title>File:Skinid1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Skinid1.png&amp;diff=69690"/>
		<updated>2021-03-24T15:38:46Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69689</id>
		<title>File:Skinid0.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69689"/>
		<updated>2021-03-24T15:35:03Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: GalAnonim uploaded a new version of File:Skinid0.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69688</id>
		<title>File:Skinid0.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69688"/>
		<updated>2021-03-24T15:24:02Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: GalAnonim uploaded a new version of File:Skinid0.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69687</id>
		<title>File:Skinid0.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Skinid0.png&amp;diff=69687"/>
		<updated>2021-03-24T14:41:41Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Utility_functions&amp;diff=69565</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=69565"/>
		<updated>2021-03-03T23:46:10Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Add usefull function fromColor&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;
*[[fromColor]]&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>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayersInPhotograph&amp;diff=68467</id>
		<title>GetPlayersInPhotograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayersInPhotograph&amp;diff=68467"/>
		<updated>2021-01-29T19:34:25Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Fixed syntax problem in the Line 'for _, v in ipairs( getElementsByType(&amp;quot;player&amp;quot;) ) do'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function can be used with any weapon, but is more accurate when executed when the player shoots the weapon and the weapon is a camera.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getPlayersInPhotograph( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* none&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPlayersInPhotograph()&lt;br /&gt;
	local players = {}&lt;br /&gt;
	local nx, ny, nz = getPedWeaponMuzzlePosition(localPlayer)&lt;br /&gt;
	&lt;br /&gt;
	for _, v in ipairs( getElementsByType(&amp;quot;player&amp;quot;) ) do&lt;br /&gt;
               &lt;br /&gt;
                -- Determine whether the player is even on the screen, or the client is the player.&lt;br /&gt;
		if (v ~= localPlayer) and (isElementOnScreen(v)) then&lt;br /&gt;
			local veh = getPedOccupiedVehicle(v)&lt;br /&gt;
			local px, py, pz = getElementPosition(v)&lt;br /&gt;
			local _, _, _, _, hit = processLineOfSight(nx, ny, nz, px, py, pz) -- Check if there is a collision between the &amp;quot;camera viewpoint&amp;quot; and the player&lt;br /&gt;
			local continue = false&lt;br /&gt;
			&lt;br /&gt;
			if (hit == v) or (hit == veh) or (not veh) then -- If it collides with the player itself, the client or the players vehicle, continue to add player to the list.&lt;br /&gt;
				continue = true&lt;br /&gt;
			else -- This checks if the player's head is visible, but not the entire body&lt;br /&gt;
				local bx, by, bz = getPedBonePosition(v, 8) -- Get the head position of the player&lt;br /&gt;
				local _, _, _, _, hit = processLineOfSight(nx, ny, nz, px, py, pz) -- Check if there is a collision between the &amp;quot;camera viewpoint&amp;quot; and player head.&lt;br /&gt;
				&lt;br /&gt;
				if hit == v then&lt;br /&gt;
					continue = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			if continue then&lt;br /&gt;
				table.insert(players, v)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return players&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example center the window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: qaisjp&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65347</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65347"/>
		<updated>2020-03-08T17:35:08Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Add Example and remove fake author&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on frames.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Octagon is visible on the Blueberry Farm&lt;br /&gt;
function renderOctagon3D()&lt;br /&gt;
   dxDrawOctagon3D(0.0, 5.0, 25.0, 1.0, tocolor(255, 255, 255, 255) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientRender&amp;quot;, root, renderOctagon3D)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65346</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65346"/>
		<updated>2020-03-08T17:28:58Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on frames.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&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;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/MTA-MySQL&amp;diff=65010</id>
		<title>Modules/MTA-MySQL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/MTA-MySQL&amp;diff=65010"/>
		<updated>2020-02-04T14:46:57Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#AA7592&amp;quot; subcaption=&amp;quot;MTA-MySQL Module&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 2em; line-height: 1em;&amp;quot;&amp;gt;{{Warning|This module is too old, please use [[dbConnect]] instead.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
{{Module_Info|&lt;br /&gt;
  name           = MTA MySQL |&lt;br /&gt;
  version        = 0.5 |&lt;br /&gt;
  author         = [[User:ryden|Alberto Alonso (ryden)]] |&lt;br /&gt;
  author2         = [[User:ryden|Alberto Alonso (ryden)]] |&lt;br /&gt;
  module_website = [http://code.google.com/p/multitheftauto-modules Here] |&lt;br /&gt;
  download_link  = [https://nightly.mtasa.com/files/modules/32/mta_mysql.dll Windows 32 bit]&amp;lt;br/&amp;gt;[https://nightly.mtasa.com/files/modules/64/mta_mysql.dll Windows  64 bit]&lt;br /&gt;
[https://nightly.mtasa.com/files/modules/32/mta_mysql.so Linux 32 bit]&amp;lt;br/&amp;gt;[https://nightly.mtasa.com/files/modules/64/mta_mysql.so Linux 64 bit] |&lt;br /&gt;
  license        = [http://www.opensource.org/licenses/bsd-license.php BSD] |&lt;br /&gt;
  written_in     = C++ |&lt;br /&gt;
  operating_system = Cross-platform |&lt;br /&gt;
  compatible_with = DP2.x &amp;amp; 1.X |&lt;br /&gt;
}}&lt;br /&gt;
MTA MySQL is an alternative to the default [[Modules/MySQL|ml_mysql]] module provided by the MTA team.&lt;br /&gt;
It is available for Windows and GNU/Linux and provides the source code.&lt;br /&gt;
&lt;br /&gt;
''Note: From version 0.4 it supports both DP2.3 and 1.0 servers.''&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Windows===&lt;br /&gt;
'''32 bit:''' Copy 32 bit mta_mysql.dll into the '''MTA San Andreas\server\mods\deathmatch\modules\''' directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
''(You might also need to install [https://nightly.mtasa.com/files/vcredist_2013_x86.exe 32 bit VS2013 Runtime Redist])''&lt;br /&gt;
&lt;br /&gt;
'''64 bit:''' Copy 64 bit mta_mysql.dll into the '''MTA San Andreas\server\x64\modules\''' directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
''(You might also need to install [https://nightly.mtasa.com/files/vcredist_2013_x64.exe 64 bit VS2013 Runtime Redist])''&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module src=&amp;quot;mta_mysql.dll&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GNU/Linux===&lt;br /&gt;
'''32 bit:''' Copy 32 bit mta_mysql.so into the '''mods/deathmatch/modules/''' directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''64 bit:''' Copy 64 bit mta_mysql.so into the '''x64/modules/''' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module src=&amp;quot;mta_mysql.so&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To fix '''MODULE: Unable to find modules/mta_mysql.so (libmysqlclient.so.16: cannot open shared object file: No such file or directory)!''' copy ''libmysqlclient.so.16'' into '''/usr/lib''' ([https://nightly.mtasa.com/files/modules/32/libmysqlclient.so.16 32 bit], [https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16 64 bit])&lt;br /&gt;
&lt;br /&gt;
'''If you experience an error on Unix systems:'''&lt;br /&gt;
Try to add port and socket parameters to your mysql_connect.&lt;br /&gt;
&lt;br /&gt;
==Handler functions==&lt;br /&gt;
{{Modules/MTA-MySQL/Handler_functions}}&lt;br /&gt;
&lt;br /&gt;
==Result managing functions==&lt;br /&gt;
{{Modules/MTA-MySQL/Result_functions}}&lt;br /&gt;
&lt;br /&gt;
==Version 0.5 calling method==&lt;br /&gt;
From version 0.5 onwards you can call all this module functions, except mysql_connect and mysql_null, as if they are methods of an object.&lt;br /&gt;
&lt;br /&gt;
For example, having a valid MySQL handler, you can do handler:query ( &amp;quot;SELECT * FROM table&amp;quot; ) instead of mysql_query ( handler, &amp;quot;SELECT * FROM table&amp;quot; ).&lt;br /&gt;
&lt;br /&gt;
===Function aliases===&lt;br /&gt;
A function alias is a second name for a function, which makes calling any of the original name or the alias have the same result. The new aliases introduced in version 0.5 are:&lt;br /&gt;
* result:num_rows() is the same as result:numrows()&lt;br /&gt;
* result:num_fields() is the same as result:numfields()&lt;br /&gt;
* result:free_result() is the same as result:free()&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Modules/MTA-MySQL]]&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=59157</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=59157"/>
		<updated>2018-09-14T19:51:17Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Corrected the text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on frames.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&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>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRandomPlayer&amp;diff=51139</id>
		<title>GetRandomPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRandomPlayer&amp;diff=51139"/>
		<updated>2017-05-31T20:14:17Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns a random [[player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player getRandomPlayer ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Player]]:getRandom}}&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a random [[player]], ''false'' if the server is empty.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This code outputs a random player's name.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local randomPlayer = getRandomPlayer ( )&lt;br /&gt;
outputChatBox ( getPlayerName ( randomPlayer )..&amp;quot; is now the fugitive!&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
[[pl:getRandomPlayer]]&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49143</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49143"/>
		<updated>2016-09-15T16:18:31Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Code : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&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>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49142</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49142"/>
		<updated>2016-09-15T16:12:12Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&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>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49141</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49141"/>
		<updated>2016-09-15T15:07:11Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed prawdiłowe arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&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>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49140</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49140"/>
		<updated>2016-09-15T15:05:55Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed prawdiłowe arguments to the function.&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author : GalAnonim&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49139</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49139"/>
		<updated>2016-09-15T15:03:43Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''posX:''' x coordinates of the form&lt;br /&gt;
*'''posY:''' y coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed prawdiłowe arguments to the function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author : GalAnonim&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49138</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49138"/>
		<updated>2016-09-15T15:03:16Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:https://wiki.multitheftauto.com/images/thumb/6/60/Ocatgon.png/800px-Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''posX:''' x coordinates of the form&lt;br /&gt;
*'''posY:''' y coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed prawdiłowe arguments to the function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author : GalAnonim&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49137</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=49137"/>
		<updated>2016-09-15T15:02:41Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Created page with &amp;quot;{{Useful Function}} __NOTOC__ This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on cages.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:800px-Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''posX:''' x coordinates of the form&lt;br /&gt;
*'''posY:''' y coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed prawdiłowe arguments to the function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code : ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
local radius = radius or 1&lt;br /&gt;
local radius2 = radius/math.sqrt(2)&lt;br /&gt;
local width = width or 1&lt;br /&gt;
local color = color or tocolor(255,255,255,150)&lt;br /&gt;
point = {}&lt;br /&gt;
for i=1,8 do&lt;br /&gt;
	point[i] = {}&lt;br /&gt;
end&lt;br /&gt;
point[1].x = x&lt;br /&gt;
point[1].y = y-radius&lt;br /&gt;
point[2].x = x+radius2&lt;br /&gt;
point[2].y = y-radius2&lt;br /&gt;
point[3].x = x+radius&lt;br /&gt;
point[3].y = y&lt;br /&gt;
point[4].x = x+radius2&lt;br /&gt;
point[4].y = y+radius2&lt;br /&gt;
point[5].x = x&lt;br /&gt;
point[5].y = y+radius&lt;br /&gt;
point[6].x = x-radius2&lt;br /&gt;
point[6].y = y+radius2&lt;br /&gt;
point[7].x = x-radius&lt;br /&gt;
point[7].y = y&lt;br /&gt;
point[8].x = x-radius2&lt;br /&gt;
point[8].y = y-radius2&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example : ==&lt;br /&gt;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author : GalAnonim&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Ocatgon.png&amp;diff=49136</id>
		<title>File:Ocatgon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Ocatgon.png&amp;diff=49136"/>
		<updated>2016-09-15T14:43:31Z</updated>

		<summary type="html">&lt;p&gt;GalAnonim: Ocatagon useful function.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ocatagon useful function.&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
</feed>