<?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=Saml1er</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=Saml1er"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Saml1er"/>
	<updated>2026-05-08T20:17:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68364</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68364"/>
		<updated>2021-01-21T21:32:00Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Improve example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20704|This function sets the rotation of a specific bone relative to the element. Currently the following element types are accepted:&lt;br /&gt;
* [[Element/Player|Player]]&lt;br /&gt;
* [[Element/Ped|Ped]]&lt;br /&gt;
}}&lt;br /&gt;
{{Tip|If you want to attach an element to a bone, see [[attachElementToBone]]}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementBoneRotation ( element theElement, int bone, float yaw, float pitch, float roll )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:The-yaw-pitch-and-roll-angles-in-the-human-head-motion-11.png|thumb|Rotation axes]]&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' the element to set the bone rotation on.&lt;br /&gt;
*'''bone:''' the ID of the bone to set the rotation of. See [[Bone IDs]]&lt;br /&gt;
*'''yaw:''' the 'yaw' rotation value.&lt;br /&gt;
*'''pitch:''' the 'pitch' rotation value.&lt;br /&gt;
*'''roll:''' the 'roll' rotation value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' [[updateElementRpHAnim]] must be called after this function to apply bone rotation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how you can turn a local player into a so-called 'Helicopter'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local custom_yaw = 0&lt;br /&gt;
&lt;br /&gt;
setTimer(function()&lt;br /&gt;
    custom_yaw = custom_yaw + 20&lt;br /&gt;
end, 10, 0)&lt;br /&gt;
&lt;br /&gt;
local shoulders = {22, 32}&lt;br /&gt;
&lt;br /&gt;
function changeBoneRotation()&lt;br /&gt;
    local yaw, pitch, roll = getElementBoneRotation(localPlayer, 2)&lt;br /&gt;
    setElementBoneRotation(localPlayer, 2, custom_yaw, pitch, roll)&lt;br /&gt;
    for key, value in pairs(shoulders) do&lt;br /&gt;
       setElementBoneRotation(localPlayer, value, 0, 0, 0)&lt;br /&gt;
    end&lt;br /&gt;
    updateElementRpHAnim(localPlayer)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedsProcessed&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AttachElementToBone&amp;diff=67826</id>
		<title>AttachElementToBone</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AttachElementToBone&amp;diff=67826"/>
		<updated>2020-11-28T02:09:52Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Make onPedsProcessed function local in code example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows you to attach an object, ped, player or vehicle to a ped or player bone for '''ONE FRAME'''. In order to attach an element continuously to a bone, this function should be used in conjunction with [[onClientPedsProcessed]].&lt;br /&gt;
The function checks if a player is actually on screen and if he is not, the object gets moved out of the stream distance in order to preserve some performance.&lt;br /&gt;
Unlike bone_attach, this function provides perfect accuracy for the attached elements and performs better.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool attachElementToBone(element theElement, ped thePed, int boneID, float offsetX, float offsetY, float offsetZ, float rotationOffsetX, float rotationOffsetZ, float rotationOffsetZ)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''theElement''': The element which should be attached to the ped/player bone. Should work with any element that is supported by matrix functions.&lt;br /&gt;
* '''thePed''': The ped or player which the element should be attached to.&lt;br /&gt;
* '''boneID''': The target bone where the element should be attached to.&lt;br /&gt;
* '''offsetX''': The X position offset from the bone.&lt;br /&gt;
* '''offsetY''': The Y position offset from the bone.&lt;br /&gt;
* '''offsetZ''': The Z position offset from the bone.&lt;br /&gt;
* '''rotationOffsetX''': The rotation X-axis offset from the bone, in '''radians'''.&lt;br /&gt;
* '''rotationOffsetY''': The rotation Y-axis offset from the bone, in '''radians'''.&lt;br /&gt;
* '''rotationOffsetZ''': The rotation Z-axis offset from the bone, in '''radians'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:Bones.jpg|thumb|Bone numbers]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px red solid; margin-bottom:3px; padding-left:5px;&amp;quot;&amp;gt;&lt;br /&gt;
*'''1:''' BONE_PELVIS1&lt;br /&gt;
*'''2:''' BONE_PELVIS&lt;br /&gt;
*'''3:''' BONE_SPINE1&lt;br /&gt;
*'''4:''' BONE_UPPERTORSO&lt;br /&gt;
*'''5:''' BONE_NECK&lt;br /&gt;
*'''6:''' BONE_HEAD2&lt;br /&gt;
*'''7:''' BONE_HEAD1&lt;br /&gt;
*'''8:''' BONE_HEAD&lt;br /&gt;
*'''21:''' BONE_RIGHTUPPERTORSO&lt;br /&gt;
*'''22:''' BONE_RIGHTSHOULDER&lt;br /&gt;
*'''23:''' BONE_RIGHTELBOW&lt;br /&gt;
*'''24:''' BONE_RIGHTWRIST&lt;br /&gt;
*'''25:''' BONE_RIGHTHAND&lt;br /&gt;
*'''26:''' BONE_RIGHTTHUMB&lt;br /&gt;
*'''31:''' BONE_LEFTUPPERTORSO&lt;br /&gt;
*'''32:''' BONE_LEFTSHOULDER&lt;br /&gt;
*'''33:''' BONE_LEFTELBOW&lt;br /&gt;
*'''34:''' BONE_LEFTWRIST&lt;br /&gt;
*'''35:''' BONE_LEFTHAND&lt;br /&gt;
*'''36:''' BONE_LEFTTHUMB&lt;br /&gt;
*'''41:''' BONE_LEFTHIP&lt;br /&gt;
*'''42:''' BONE_LEFTKNEE&lt;br /&gt;
*'''43:''' BONE_LEFTANKLE&lt;br /&gt;
*'''44:''' BONE_LEFTFOOT&lt;br /&gt;
*'''51:''' BONE_RIGHTHIP&lt;br /&gt;
*'''52:''' BONE_RIGHTKNEE&lt;br /&gt;
*'''53:''' BONE_RIGHTANKLE&lt;br /&gt;
*'''54:''' BONE_RIGHTFOOT&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns true if the object has successfully been attached to the ped/player, returns false if the specified ped/player is not on screen and the object has been moved out of the streaming distance.&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 attachElementToBone(element, ped, bone, offX, offY, offZ, offrx, offry, offrz)&lt;br /&gt;
if isElementOnScreen(ped) then&lt;br /&gt;
	local boneMat = getElementBoneMatrix(ped, bone)&lt;br /&gt;
	local sroll, croll, spitch, cpitch, syaw, cyaw = math.sin(offrz), math.cos(offrz), math.sin(offry), math.cos(offry), math.sin(offrx), math.cos(offrx)&lt;br /&gt;
	local rotMat = {&lt;br /&gt;
		{sroll * spitch * syaw + croll * cyaw,&lt;br /&gt;
		sroll * cpitch,&lt;br /&gt;
		sroll * spitch * cyaw - croll * syaw},&lt;br /&gt;
		{croll * spitch * syaw - sroll * cyaw,&lt;br /&gt;
		croll * cpitch,&lt;br /&gt;
		croll * spitch * cyaw + sroll * syaw},&lt;br /&gt;
		{cpitch * syaw,&lt;br /&gt;
		-spitch,&lt;br /&gt;
		cpitch * cyaw}&lt;br /&gt;
	}&lt;br /&gt;
	local finalMatrix = {&lt;br /&gt;
		{boneMat[2][1] * rotMat[1][2] + boneMat[1][1] * rotMat[1][1] + rotMat[1][3] * boneMat[3][1],&lt;br /&gt;
		boneMat[3][2] * rotMat[1][3] + boneMat[1][2] * rotMat[1][1] + boneMat[2][2] * rotMat[1][2],-- right&lt;br /&gt;
		boneMat[2][3] * rotMat[1][2] + boneMat[3][3] * rotMat[1][3] + rotMat[1][1] * boneMat[1][3],&lt;br /&gt;
		0},&lt;br /&gt;
		{rotMat[2][3] * boneMat[3][1] + boneMat[2][1] * rotMat[2][2] + rotMat[2][1] * boneMat[1][1],&lt;br /&gt;
		boneMat[3][2] * rotMat[2][3] + boneMat[2][2] * rotMat[2][2] + boneMat[1][2] * rotMat[2][1],-- front &lt;br /&gt;
		rotMat[2][1] * boneMat[1][3] + boneMat[3][3] * rotMat[2][3] + boneMat[2][3] * rotMat[2][2],&lt;br /&gt;
		0},&lt;br /&gt;
		{boneMat[2][1] * rotMat[3][2] + rotMat[3][3] * boneMat[3][1] + rotMat[3][1] * boneMat[1][1],&lt;br /&gt;
		boneMat[3][2] * rotMat[3][3] + boneMat[2][2] * rotMat[3][2] + rotMat[3][1] * boneMat[1][2],-- up&lt;br /&gt;
		rotMat[3][1] * boneMat[1][3] + boneMat[3][3] * rotMat[3][3] + boneMat[2][3] * rotMat[3][2],&lt;br /&gt;
		0},&lt;br /&gt;
		{offX * boneMat[1][1] + offY * boneMat[2][1] + offZ * boneMat[3][1] + boneMat[4][1],&lt;br /&gt;
		offX * boneMat[1][2] + offY * boneMat[2][2] + offZ * boneMat[3][2] + boneMat[4][2],-- pos&lt;br /&gt;
		offX * boneMat[1][3] + offY * boneMat[2][3] + offZ * boneMat[3][3] + boneMat[4][3],&lt;br /&gt;
		1}&lt;br /&gt;
	}&lt;br /&gt;
	setElementMatrix(element, finalMatrix)&lt;br /&gt;
	return true&lt;br /&gt;
else&lt;br /&gt;
	setElementPosition(element, 0, 0, -1000)&lt;br /&gt;
	return false&lt;br /&gt;
end&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example attaches a sniper rifle and a backpack to the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local theGun = createObject(358, 0, 0, 0)&lt;br /&gt;
local thePara = createObject(371, 0, 0, 0)&lt;br /&gt;
&lt;br /&gt;
local function onPedsProcessed()&lt;br /&gt;
attachElementToBone(theGun, localPlayer, 24, 0, 0, 0, 0, 0, 0)-- Attach the sniper model to bone #24 of the local player, no offset is needed because the default GTA weapon models fit perfectly fine into bone #24&lt;br /&gt;
attachElementToBone(thePara, localPlayer, 3, 0.1, -0.14, 0, math.rad(90), 0, 0)-- Attach parachute to bone #3 of the local player with a small position and rotation offset, so it looks nice&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedsProcessed&amp;quot;, root, onPedsProcessed)&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Game_Processing_Order&amp;diff=67798</id>
		<title>Game Processing Order</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Game_Processing_Order&amp;diff=67798"/>
		<updated>2020-11-24T17:47:47Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Mta_game_proccess.png|left|caption]]&lt;br /&gt;
== Game processing order ==&lt;br /&gt;
Here is an overview to show the order in which things get done during an average frame of playing MTA.&lt;br /&gt;
&lt;br /&gt;
The [[onClientPreRender]] event is triggered after GTA updates the world, and is the ideal place to do dxDraws that are in some way attached to world elements.&lt;br /&gt;
&lt;br /&gt;
The [[onClientHUDRender]] event is triggered before GTA renders the in-game HUD, so it the best place to apply any full screen effects that you want 'behind' the HUD.&lt;br /&gt;
&lt;br /&gt;
The [[onClientPedsProcessed]] event is triggered after GTA updates bone transformations for all peds. This event can be used for updating bones.&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Game_process_order.png&amp;diff=67785</id>
		<title>File:Game process order.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Game_process_order.png&amp;diff=67785"/>
		<updated>2020-11-24T01:22:47Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Saml1er uploaded a new version of File:Game process order.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Game_Processing_Order&amp;diff=67784</id>
		<title>Game Processing Order</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Game_Processing_Order&amp;diff=67784"/>
		<updated>2020-11-24T01:20:26Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Add onClientPedsProcessed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Game_process_order.png|left|caption]]&lt;br /&gt;
== Game processing order ==&lt;br /&gt;
Here is an overview to show the order in which things get done during an average frame of playing MTA.&lt;br /&gt;
&lt;br /&gt;
The [[onClientPreRender]] event is triggered after GTA updates the world, and is the ideal place to do dxDraws that are in some way attached to world elements.&lt;br /&gt;
&lt;br /&gt;
The [[onClientHUDRender]] event is triggered before GTA renders the in-game HUD, so it the best place to apply any full screen effects that you want 'behind' the HUD.&lt;br /&gt;
&lt;br /&gt;
The [[onClientPedsProcessed]] event is triggered after GTA updates bone transformations for all peds. This event can be used for updating bones.&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Game_process_order.png&amp;diff=67783</id>
		<title>File:Game process order.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Game_process_order.png&amp;diff=67783"/>
		<updated>2020-11-24T01:18:27Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=67782</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=67782"/>
		<updated>2020-11-24T00:30:27Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Add attachElementToBone&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» These functions are able to sort your tables by a key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAccountsRanks]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to detect the account name groups and put them in the chat.&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-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getClipboard]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This event returns the contents of the clipboard by pressing ctrl + v / ctrl + V. Event triggered ONLY if cursor is showing.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[formatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistance]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthH]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function convert english months to arabic months&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthM]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives you the real months name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hexadecimal numbers (colors, for example) from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; 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;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&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-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; 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;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; 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;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[isPlayerHitByVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function make player warp to another player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the nearest vehicle to the specified player in a specified distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is moving backwards.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[setVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the next weapon and previous.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use 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-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; 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;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=64793</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=64793"/>
		<updated>2019-12-20T20:09:11Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Rename customBlockName to custom_block_name in syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12195|&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string ifp_file / string raw_data, string custom_block_name )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''ifp_file / raw_data:''' the [[filepath|filepath]] to the IFP file you want to load or whole data buffer of the IFP file.&lt;br /&gt;
*'''custom_block_name:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names. '''You should namespace this name''' using a string like ''resource.blockname''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation( _, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation( localPlayer, customBlockName, animationName )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=62504</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=62504"/>
		<updated>2019-04-23T07:42:14Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Add restoreTaskOnAnimEnd parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Sets the current [[Animations|animation]] of a [[player]] or [[ped]]. Not specifying the type of animation will automatically cancel the current one.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedAnimation ( ped thePed [, string block = nil, string anim = nil, int time = -1, bool loop = true, bool updatePosition = true,&lt;br /&gt;
                       bool interruptable = true, bool freezeLastFrame = true, int blendTime = 250, bool restoreTaskOnAnimEnd = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:setAnimation||getPedAnimation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to apply an [[Animations|animation]] to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to ''false'' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.&lt;br /&gt;
*'''freezeLastFrame:''' if set to ''true'' after animation the last frame will be frozen, otherwise the animation will end and controls will return.&lt;br /&gt;
*'''blendTime:''' how long the animation will mixed with the previous one in milliseconds.&lt;br /&gt;
{{New items|3.0157|1.5.7|&lt;br /&gt;
*'''restoreTaskOnAnimEnd:''' will restore the task which was playing before calling this function. Useful for restoring the crouch task after animation ends.&lt;br /&gt;
|16632}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
	local thePed = createPed(56, 1, 1, 4, 315)&lt;br /&gt;
	setPedAnimation(thePed, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player sit down and stand up using the command /sit.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleSit(thePlayer)&lt;br /&gt;
	if not getElementData(thePlayer, &amp;quot;sitting&amp;quot;) then&lt;br /&gt;
		setPedAnimation(thePlayer, &amp;quot;ped&amp;quot;, &amp;quot;seat_down&amp;quot;, -1, false, false, false, false)&lt;br /&gt;
		setElementData(thePlayer, &amp;quot;sitting&amp;quot;, true)&lt;br /&gt;
	else&lt;br /&gt;
		-- If you use again this command then your character stand up&lt;br /&gt;
		setPedAnimation(thePlayer)&lt;br /&gt;
		removeElementData(thePlayer, &amp;quot;sitting&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, toggleSit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|9522|Setting a [[ped|ped's]] or [[player|player's]] animation whilst occupying a [[givePedJetPack|jetpack]] will remove their jetpack, but not the jetpack sound}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;br /&gt;
[[HU:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=59558</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=59558"/>
		<updated>2018-10-07T11:26:22Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Sets the current [[Animations|animation]] of a [[player]] or [[ped]]. Not specifying the type of animation will automatically cancel the current one.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedAnimation ( ped thePed [, string block = nil, string anim = nil, int time = -1, bool loop = true, bool updatePosition = true,&lt;br /&gt;
                       bool interruptable = true, bool freezeLastFrame = true, int blendTime = 250 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:setAnimation||getPedAnimation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to apply an [[Animations|animation]] to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to ''false'' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.&lt;br /&gt;
*'''freezeLastFrame:''' if set to ''true'' after animation the last frame will be frozen, otherwise the animation will end and controls will return.&lt;br /&gt;
*'''blendTime:''' how long the animation will mixed with the previous one in milliseconds.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
	local thePed = createPed(56, 1, 1, 4, 315)&lt;br /&gt;
	setPedAnimation(thePed, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player sit down and stand up using the command /sit.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleSit(thePlayer)&lt;br /&gt;
	if not getElementData(thePlayer, &amp;quot;sitting&amp;quot;) then&lt;br /&gt;
		setPedAnimation(thePlayer, &amp;quot;ped&amp;quot;, &amp;quot;seat_down&amp;quot;, -1, false, false, false, false)&lt;br /&gt;
		setElementData(thePlayer, &amp;quot;sitting&amp;quot;, true)&lt;br /&gt;
	else&lt;br /&gt;
		-- If you use again this command then your character stand up&lt;br /&gt;
		setPedAnimation(thePlayer)&lt;br /&gt;
		removeElementData(thePlayer, &amp;quot;sitting&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, toggleSit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|9522|Setting a [[ped|ped's]] or [[player|player's]] animation whilst occupying a [[givePedJetPack|jetpack]] will remove their jetpack, but not the jetpack sound}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=59557</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=59557"/>
		<updated>2018-10-07T11:24:51Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12195|&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=57708</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=57708"/>
		<updated>2018-08-10T20:05:44Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: fixed postGUI parameter name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|13977|This function draws a circle shape on the screen - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to be display continuously.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawCircle ( float posX, float posY, float radius [, float startAngle = 0.0, float stopAngle = 360.0, color theColor = white,&lt;br /&gt;
                    color theCenterColor = theColor, int segments = 32, int ratio = 1, postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_Saml1er.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&lt;br /&gt;
* '''theColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''theCenterColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''segments''': An integer ranging from 3-1024 representing how many triangles are used to form the circle, more segments = smoother circle. Note: using lots of segments may cause lag.&lt;br /&gt;
* '''ratio''': Ratio between width and height, e.g: 2 would mean that the width of the circle is 2 times the height.&lt;br /&gt;
* '''postGUI''': A bool representing whether the circle should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the creation of the 2D circle was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function draws a rectangle with rounded corners.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, rx, ry, color, radius)&lt;br /&gt;
    rx = rx - radius * 2&lt;br /&gt;
    ry = ry - radius * 2&lt;br /&gt;
    x = x + radius&lt;br /&gt;
    y = y + radius&lt;br /&gt;
&lt;br /&gt;
    if (rx &amp;gt;= 0) and (ry &amp;gt;= 0) then&lt;br /&gt;
        dxDrawRectangle(x, y, rx, ry, color)&lt;br /&gt;
        dxDrawRectangle(x, y - radius, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x, y + ry, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x - radius, y, radius, ry, color)&lt;br /&gt;
        dxDrawRectangle(x + rx, y, radius, ry, color)&lt;br /&gt;
&lt;br /&gt;
        dxDrawCircle(x, y, radius, 180, 270, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
dxDrawRoundedRectangle(350, 50, 100, 100, tocolor(0, 255, 0, 255), 20)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=57342</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=57342"/>
		<updated>2018-08-04T18:07:13Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Changed example image.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.6||This function draws a circle shape on the screen - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to be display continuously.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawCircle ( float posX, float posY, float radius [, float startAngle = 0.0, float stopAngle = 360.0, color theColor = white,&lt;br /&gt;
                    color theCenterColor = theColor, int segments = 32, int ratio = 1, bPostGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_Saml1er.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&lt;br /&gt;
* '''theColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''theCenterColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''segments''': An integer ranging from 3-1024 representing how many triangles are used to form the circle, more segments = smoother circle. Note: using lots of segments may cause lag.&lt;br /&gt;
* '''ratio''': Ratio between width and height, e.g: 2 would mean that the width of the circle is 2 times the height.&lt;br /&gt;
* '''postGUI''': A bool representing whether the circle should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the creation of the 2D circle was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function draws a rectangle with rounded corners.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, rx, ry, color, radius)&lt;br /&gt;
    rx = rx - radius * 2&lt;br /&gt;
    ry = ry - radius * 2&lt;br /&gt;
    x = x + radius&lt;br /&gt;
    y = y + radius&lt;br /&gt;
&lt;br /&gt;
    if (rx &amp;gt;= 0) and (ry &amp;gt;= 0) then&lt;br /&gt;
        dxDrawRectangle(x, y, rx, ry, color)&lt;br /&gt;
        dxDrawRectangle(x, y - radius, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x, y + ry, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x - radius, y, radius, ry, color)&lt;br /&gt;
        dxDrawRectangle(x + rx, y, radius, ry, color)&lt;br /&gt;
&lt;br /&gt;
        dxDrawCircle(x, y, radius, 180, 270, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
dxDrawRoundedRectangle(350, 50, 100, 100, tocolor(0, 255, 0, 255), 20)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:DxDrawCircle_Saml1er.png&amp;diff=57341</id>
		<title>File:DxDrawCircle Saml1er.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:DxDrawCircle_Saml1er.png&amp;diff=57341"/>
		<updated>2018-08-04T18:05:24Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: This image shows that you can draw a circle up to 360° using DxDrawCircle function by CrosRoad95.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This image shows that you can draw a circle up to 360° using DxDrawCircle function by CrosRoad95.&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Coding_info&amp;diff=57156</id>
		<title>Coding info</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Coding_info&amp;diff=57156"/>
		<updated>2018-07-30T08:19:55Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added IFP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page has information which would be useful for anyone who is doing coding for MTA SA. [[Coding guidelines]] also has a lot of useful info.&lt;br /&gt;
&lt;br /&gt;
== Projects explained ==&lt;br /&gt;
&lt;br /&gt;
* Client - Core: Typically UI elements like main menu etc and isn't ever unloaded.&lt;br /&gt;
* Client - Deathmatch: Where MTA makes all it's functions and events do stuff.&lt;br /&gt;
* Client - Game SA: Low level stuff which is mainly function calls to the game so each element will have a game_sa class like Vehicle, Ped, Object etc.&lt;br /&gt;
* Client - GUI: It's just wrappers to CEGUI, you need not touch.&lt;br /&gt;
* Client - Launch: Is the MTA executable which loads loader, you need not touch.&lt;br /&gt;
* Client - Loader: You need not touch the loader either.&lt;br /&gt;
* Client - Multiplayer SA: Hooks, code modification and that sort of low level things that lets us work.&lt;br /&gt;
* Server - Core: Cazomino05: &amp;quot;I genuinely don't really know why we have server core.&amp;quot;&lt;br /&gt;
* Server - Dbconmy: Stuff to do with the db* functions, you need not touch.&lt;br /&gt;
* Server - Deathmatch: All the server logic and storage classes for elements as well as Lua stuff.&lt;br /&gt;
* Server - Launcher: Just an executable to load all the DLLs we need.&lt;br /&gt;
* Shared - XML Module: XML module is just tinyxml and some high level wrapper functions for stuff we need.&lt;br /&gt;
* Dependencies: Has a load of 3rd party code, modules like sqlite, curl, lua, ehs, etc.&lt;br /&gt;
* CEGUI: Crazy Eddie's GUI system is a graphical user interface C++ library.&lt;br /&gt;
&lt;br /&gt;
Some of the code may be explained in detail in pages under the this category: [[:Category:Classes (Blue)|Classes (Blue)]]&lt;br /&gt;
&lt;br /&gt;
== Simplification of data types ==&lt;br /&gt;
&lt;br /&gt;
MTA has some type definitions you can use (Can be found in Shared/sdk/SharedUtil.h)&lt;br /&gt;
&lt;br /&gt;
* ulong = unsigned long&lt;br /&gt;
* uint = unsigned int&lt;br /&gt;
* ushort = unsigned short&lt;br /&gt;
* uchar = unsigned char&lt;br /&gt;
* uint64 = unsigned long long&lt;br /&gt;
* uint32 = unsigned int&lt;br /&gt;
* uint16 = unsigned short&lt;br /&gt;
* uint8 = unsigned char&lt;br /&gt;
* int64 = signed long long&lt;br /&gt;
* int32 = signed int&lt;br /&gt;
* int16 = signed short&lt;br /&gt;
* int8 = signed char&lt;br /&gt;
* BYTE = unsigned char&lt;br /&gt;
* WORD = unsigned short&lt;br /&gt;
* DWORD = unsigned long&lt;br /&gt;
* FLOAT = float&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
MTA has some commands which you can use if you're running debug mode&lt;br /&gt;
&lt;br /&gt;
* showsync - show sync data&lt;br /&gt;
* foo - debug command for devs&lt;br /&gt;
* showwepdata - shows the given player weapon data (nick)&lt;br /&gt;
* showtasks - shows the local player tasks (nick)&lt;br /&gt;
* showplayer - shows extended player information (nick)&lt;br /&gt;
* setmimic - enables player mimics (amount)&lt;br /&gt;
* setmimiclag - enables player mimic lag (amount)&lt;br /&gt;
* paintballs - enables paintball mode&lt;br /&gt;
* breakpoint - inserts breakpoint&lt;br /&gt;
* giveweapon - gives the player a weapon (id)&lt;br /&gt;
* showrpcs - shows the remote prodecure calls&lt;br /&gt;
* showinterpolation - shows information about the interpolation&lt;br /&gt;
* watch - enables wpm watch mode&lt;br /&gt;
* modules - enables wpm module&lt;br /&gt;
* debug - debug function 1&lt;br /&gt;
* debug2 - debug function 2&lt;br /&gt;
* debug3 - debug function 3&lt;br /&gt;
* debug4 - debug function 4&lt;br /&gt;
&lt;br /&gt;
== Entity types ==&lt;br /&gt;
&lt;br /&gt;
* CCLIENTCAMERA - Camera&lt;br /&gt;
* CCLIENTPLAYER - Player&lt;br /&gt;
* CCLIENTVEHICLE - Vehicle&lt;br /&gt;
* CCLIENTRADARMARKER - Blip&lt;br /&gt;
* CCLIENTOBJECT - Object&lt;br /&gt;
* CCLIENTPICKUP - Pickup&lt;br /&gt;
* CCLIENTRADARAREA - RadarArea&lt;br /&gt;
* CCLIENTMARKER - Marker&lt;br /&gt;
* CCLIENTTEAM - Team&lt;br /&gt;
* CCLIENTPED - Ped&lt;br /&gt;
* CCLIENTPROJECTILE - Projectile&lt;br /&gt;
* CCLIENTIFP - EngineIFP&lt;br /&gt;
* CCLIENTGUI:&lt;br /&gt;
* CGUI_BUTTON - GuiButton&lt;br /&gt;
* CGUI_CHECKBOX - GuiCheckBox&lt;br /&gt;
* CGUI_EDIT - GuiEdit&lt;br /&gt;
* CGUI_GRIDLIST - GuiGridList&lt;br /&gt;
* CGUI_LABEL - GuiLabel&lt;br /&gt;
* CGUI_MEMO - GuiMemo&lt;br /&gt;
* CGUI_PROGRESSBAR - GuiProgressBar&lt;br /&gt;
* CGUI_RADIOBUTTON - GuiRadioButton&lt;br /&gt;
* CGUI_STATICIMAGE - GuiStaticImage&lt;br /&gt;
* CGUI_TAB - GuiTab&lt;br /&gt;
* CGUI_TABPANEL - GuiTabPanel&lt;br /&gt;
* CGUI_WINDOW - GuiWindow&lt;br /&gt;
* CGUI_SCROLLPANE - GuiScrollPane&lt;br /&gt;
* CGUI_SCROLLBAR - GuiScrollBar&lt;br /&gt;
* CGUI_COMBOBOX - GuiComboBox&lt;br /&gt;
* CCLIENTCOLSHAPE - ColShape&lt;br /&gt;
* SCRIPTFILE - File&lt;br /&gt;
* CCLIENTDFF - EngineDFF&lt;br /&gt;
* CCLIENTCOL - EngineCOL&lt;br /&gt;
* CCLIENTTXD - EngineTXD&lt;br /&gt;
* CCLIENTSOUND - Sound&lt;br /&gt;
* CCLIENTWATER - Water&lt;br /&gt;
* CCLIENTDXFONT - DxFont&lt;br /&gt;
* CCLIENTGUIFONT - GuiFont&lt;br /&gt;
* CCLIENTTEXTURE - DxTexture&lt;br /&gt;
* CCLIENTSHADER - DxShader&lt;br /&gt;
* CCLIENTWEAPON - Weapon&lt;br /&gt;
* CCLIENTEFFECT - Effect&lt;br /&gt;
* CCLIENTSCREENSOURCE - DxScreenSource&lt;br /&gt;
* CCLIENTRENDERTARGET - DxRenderTarget&lt;br /&gt;
&lt;br /&gt;
[[Category: Development]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Coding_guidelines&amp;diff=57155</id>
		<title>Coding guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Coding_guidelines&amp;diff=57155"/>
		<updated>2018-07-30T08:12:48Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed deprecated instructions, and updated with latest coding guidelines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
So you've decided to become a contributor to our project. Excellent! But before we can start accepting your code, there are a couple of things you should know about how we work. These are mostly guidelines and rules as to how your code should be structured and how it can be committed without upsetting any fellow contributors.&lt;br /&gt;
&lt;br /&gt;
= Code repository =&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
Our code repository uses Git and is structured into number of different directories, which serve different purposes:&lt;br /&gt;
&lt;br /&gt;
* '''Client'''&lt;br /&gt;
* '''Server'''&lt;br /&gt;
* '''Shared''': contains code shared between both the client and the server&lt;br /&gt;
* '''irc''': bot code for the Multi Theft Auto IRC channels&lt;br /&gt;
* '''m4'''&lt;br /&gt;
* '''utils''': utilities used to automate certain tasks&lt;br /&gt;
* '''vendor''': unmodified third-party code and libraries (optionally linked to the appropriate third-party Git repository through Git submodules). &lt;br /&gt;
&lt;br /&gt;
Our branches contain groundbreaking research, radical ideas and other work-in-progress that is meant to be merged into the trunk at a later point, but also contains project milestones:&lt;br /&gt;
&lt;br /&gt;
* The master branch is the main development branch (containing the latest, bleeding-edge code)&lt;br /&gt;
* Project milestones are kept away from the trunk for stability reasons, but the latest version branch can be used by any regular player who has enabled nightly builds. Make sure that only well tested code is added to the latest version branch.&lt;br /&gt;
&lt;br /&gt;
== Gaining and Losing Commit access ==&lt;br /&gt;
Commit access is granted after patches have been submitted, and the coder has proven to be competent.  The subject matter of the patches does not matter, we are more interested in whether if you are granted commit access, you will be capable of maintaining a high standard of code and remaining cohesive with other project contributors.&lt;br /&gt;
&lt;br /&gt;
Patches can be submitted using [https://github.com/multitheftauto/mtasa-blue/pull/new GitHub's pull request system]. Usually commit access is gained after 2-3 patches, but this is not fixed and depends on the extent of the contributions. This requires you to fork our repository and make commits to your own branch first.&lt;br /&gt;
&lt;br /&gt;
After gaining commit access, if the contributor's commits are of a consistently low standard, or the user fails to stick to the rules, their commit access will be stripped and will be required to submit pull requests again.&lt;br /&gt;
&lt;br /&gt;
== Committing code ==&lt;br /&gt;
Keep in mind that your commits should initially be fixing or implementing existing issues on our [http://bugs.mtasa.com bug tracker]. The [http://bugs.mtasa.com/roadmap_page.php roadmap] is particularly important since it allows contributors to track down priority issues.&lt;br /&gt;
&lt;br /&gt;
Please follow these guidelines for all your contributions:&lt;br /&gt;
* Commits should be thoroughly tested when added to master.  Commits that 'need to be fixed later' which directly affect the state of the mod will be reverted other than in exceptional circumstances.&lt;br /&gt;
* If writing unstable or experimental code, a private branch should be added in your own fork. Branches should not be &amp;quot;personal&amp;quot; to each user.  This means that a branch should be created for a new feature, not for a user specific playground.&lt;br /&gt;
* Commit messages should always give a clear indication of the content of the change, without having to look at the code at all.  Where appropriate, include the Mantis Issue number in your log message and keep your log messages consistent, e.g. '''Fix #1234: description and notes here'''. [http://chris.beams.io/posts/git-commit/ Follow the seven rules identified here.]&lt;br /&gt;
* When committing updates to previous commits, include the previous commit SHA (and a summarised commit message) in the new commit message. Doing this will help identify related commits if they are viewed at a later date.&lt;br /&gt;
&lt;br /&gt;
== Ratings and comments ==&lt;br /&gt;
Ratings and comments are open for the public to review code and provide feedback.  Please be mature and civilised when posting comments.  Developers should try to review other contributor's commits and provide feedback as much as possible.&lt;br /&gt;
&lt;br /&gt;
Make sure you make appropriate use of the GitHub Reactions feature to rate commits or express agreement/disagreement to a comment. This avoids spammy comments such as &amp;quot;+1&amp;quot;, &amp;quot;-1&amp;quot;, &amp;quot;Nice one!&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
Since you can only react to comments, not commits, feel free to create the initial &amp;quot;+1&amp;quot; comment in response to a commit. However, future reactions to a commit should be to the first response comment.&lt;br /&gt;
&lt;br /&gt;
== What to code ==&lt;br /&gt;
Generally, developers should try to stick to the [http://bugs.mtasa.com/roadmap_page.php roadmap] when coding.  This lists the issues required to be resolved for the next release. Of course, if you're interested in something else, feel free to experiment and submit it.&lt;br /&gt;
&lt;br /&gt;
== Style ==&lt;br /&gt;
* We use 4 spaces instead of tabs.&lt;br /&gt;
* Hungarian notation for variable names.&lt;br /&gt;
 float         fValue;               // Local variable&lt;br /&gt;
 unsigned char m_ucValue;            // Class member variable&lt;br /&gt;
 char          ms_cValue;            // Class static variable&lt;br /&gt;
 bool          g_bCrashTwiceAnHour;  // Global variable&lt;br /&gt;
 char*         szUsername;           // Zero terminated string&lt;br /&gt;
 SString       strUsername;          // String&lt;br /&gt;
 CVector       vecPosition;          // 3D Vector&lt;br /&gt;
* Lower camel case for variable names of types like custom structs and enums:&lt;br /&gt;
 SSomeStruct   valueOne;&lt;br /&gt;
 ESomeEnum     m_valueTwo;&lt;br /&gt;
* Function names use UpperCamelCase:&lt;br /&gt;
 void UpperCamelCase()&lt;br /&gt;
* Functions with no arguments are declared and defined with (), and called with ()&lt;br /&gt;
 void MyTest();&lt;br /&gt;
 void MyTest() { return; }&lt;br /&gt;
 MyTest();&lt;br /&gt;
* Put ''#pragma once'' preprocessor directive next to the copyright comment for new header files and the ones you are modifying for the pull request. Make sure to remove include guard if you are using ''#pragma once'':&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/*****************************************************************************&lt;br /&gt;
&lt;br /&gt;
 *&lt;br /&gt;
 *  PROJECT:     Multi Theft Auto&lt;br /&gt;
 *  LICENSE:     See LICENSE in the top level directory&lt;br /&gt;
 *  FILE:        Client/mods/deathmatch/logic/CClientIFP.h&lt;br /&gt;
 *&lt;br /&gt;
 *  Multi Theft Auto is available from http://www.multitheftauto.com/&lt;br /&gt;
 *&lt;br /&gt;
 *****************************************************************************/&lt;br /&gt;
&lt;br /&gt;
#pragma once&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* Once you're done writing code, and you're about to create a pull request, apply clang formatting:&lt;br /&gt;
** Download [http://prereleases.llvm.org/win-snapshots/clang-format-r325576.exe clang-format-r325576.exe], and move it to '''utils''' folder.&lt;br /&gt;
** Download [http://findandreplace.io/downloads/fnr.zip fnr.zip], extract fnr.exe to '''utils''' folder.&lt;br /&gt;
** Run '''utils\win-apply-clang-format.bat'''.&lt;br /&gt;
&lt;br /&gt;
* For anything else, follow the style of the code that already exists.&lt;br /&gt;
&lt;br /&gt;
* Tip: In Visual Studio go to Tools -&amp;gt; Options -&amp;gt; Text Editor -&amp;gt; C/C++ -&amp;gt; Formatting -&amp;gt; Spacing and you can configure it to automatically apply the right spacing.&lt;br /&gt;
&lt;br /&gt;
== Coding info ==&lt;br /&gt;
Check out the [[Coding info]] page and feel free to add more coding info to it.&lt;br /&gt;
&lt;br /&gt;
[[Category: Development]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55976</id>
		<title>Template:Engine functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55976"/>
		<updated>2018-07-18T17:55:54Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Undo revision 55710 by Saml1er (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[engineApplyShaderToWorldTexture]]&lt;br /&gt;
* [[engineGetModelIDFromName]]&lt;br /&gt;
* [[engineGetModelLODDistance]]&lt;br /&gt;
* [[engineGetModelNameFromID]]&lt;br /&gt;
* [[engineGetModelTextureNames]]&lt;br /&gt;
* [[engineGetVisibleTextureNames]]&lt;br /&gt;
* [[engineImportTXD]]&lt;br /&gt;
* [[engineLoadCOL]]&lt;br /&gt;
* [[engineLoadDFF]]&lt;br /&gt;
* [[engineLoadTXD]]&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
* [[engineLoadIFP]]&lt;br /&gt;
* [[engineReplaceAnimation]]&lt;br /&gt;
* [[engineRestoreAnimation]]&lt;br /&gt;
|12195}}&lt;br /&gt;
* [[engineRemoveShaderFromWorldTexture]]&lt;br /&gt;
* [[engineReplaceCOL]]&lt;br /&gt;
* [[engineReplaceModel]]&lt;br /&gt;
* [[engineRestoreCOL]]&lt;br /&gt;
* [[engineRestoreModel]]&lt;br /&gt;
* [[engineSetAsynchronousLoading]]&lt;br /&gt;
* [[engineSetModelLODDistance]]&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55974</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55974"/>
		<updated>2018-07-18T17:55:20Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Restored version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12195|&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example restores all replaced animations within every block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example restores all replaced animations only within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPlayer, &amp;quot;ped&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example restores &amp;quot;weapon_crouch&amp;quot; animation within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPLayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55973</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55973"/>
		<updated>2018-07-18T17:54:39Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Restored version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Warning|engineReplaceAnimation does not apply the replaced animation if it is currently being used, for instance, the idle animation.|true}}&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12195|&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55970</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55970"/>
		<updated>2018-07-18T17:52:12Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Undo revision 55707 by Saml1er (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12195|&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation( _, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation( localPlayer, customBlockName, animationName )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55862</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55862"/>
		<updated>2018-07-17T00:06:11Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Warning|engineReplaceAnimation does not apply the replaced animation if it is currently being used, for instance, the idle animation.|true}}&lt;br /&gt;
&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=55861</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=55861"/>
		<updated>2018-07-17T00:00:10Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Fix space between warning and he header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{Warning|It's not possible to play the replaced animation immediately after calling engineReplaceAnimation via setPedAnimation.|true}}&lt;br /&gt;
&lt;br /&gt;
Sets the current [[Animations|animation]] of a [[player]] or [[ped]]. Not specifying the type of animation will automatically cancel the current one.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedAnimation ( ped thePed [, string block=nil, string anim=nil, int time=-1, bool loop=true, bool updatePosition=true, bool interruptable=true, bool freezeLastFrame=true, int blendTime=250] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:setAnimation||getPedAnimation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to apply an [[Animations|animation]] to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to ''false'' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.&lt;br /&gt;
*'''freezeLastFrame:''' if set to ''true'' after animation the last frame will be frozen, otherwise the animation will end and controls will return.&lt;br /&gt;
*'''blendTime:''' how long the animation will mixed with the previous one in milliseconds.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
	local thePed = createPed(56, 1, 1, 4, 315)&lt;br /&gt;
	setPedAnimation(thePed, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player sit down and stand up using the command /sit.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleSit(thePlayer)&lt;br /&gt;
	if not getElementData(thePlayer, &amp;quot;sitting&amp;quot;) then&lt;br /&gt;
		setPedAnimation(thePlayer, &amp;quot;ped&amp;quot;, &amp;quot;seat_down&amp;quot;, -1, false, false, false, false)&lt;br /&gt;
		setElementData(thePlayer, &amp;quot;sitting&amp;quot;, true)&lt;br /&gt;
	else&lt;br /&gt;
		-- If you use again this command then your character stand up&lt;br /&gt;
		setPedAnimation(thePlayer)&lt;br /&gt;
		removeElementData(thePlayer, &amp;quot;sitting&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, toggleSit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|9522|Setting a [[ped|ped's]] or [[player|player's]] animation whilst occupying a [[givePedJetPack|jetpack]] will remove their jetpack, but not the jetpack sound}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=55860</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=55860"/>
		<updated>2018-07-16T23:59:12Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
{{Warning|It's not possible to play the replaced animation immediately after calling engineReplaceAnimation via setPedAnimation.|true}}&lt;br /&gt;
Sets the current [[Animations|animation]] of a [[player]] or [[ped]]. Not specifying the type of animation will automatically cancel the current one.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedAnimation ( ped thePed [, string block=nil, string anim=nil, int time=-1, bool loop=true, bool updatePosition=true, bool interruptable=true, bool freezeLastFrame=true, int blendTime=250] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[ped]]:setAnimation||getPedAnimation}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to apply an [[Animations|animation]] to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to ''false'' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.&lt;br /&gt;
*'''freezeLastFrame:''' if set to ''true'' after animation the last frame will be frozen, otherwise the animation will end and controls will return.&lt;br /&gt;
*'''blendTime:''' how long the animation will mixed with the previous one in milliseconds.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
	local thePed = createPed(56, 1, 1, 4, 315)&lt;br /&gt;
	setPedAnimation(thePed, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player sit down and stand up using the command /sit.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleSit(thePlayer)&lt;br /&gt;
	if not getElementData(thePlayer, &amp;quot;sitting&amp;quot;) then&lt;br /&gt;
		setPedAnimation(thePlayer, &amp;quot;ped&amp;quot;, &amp;quot;seat_down&amp;quot;, -1, false, false, false, false)&lt;br /&gt;
		setElementData(thePlayer, &amp;quot;sitting&amp;quot;, true)&lt;br /&gt;
	else&lt;br /&gt;
		-- If you use again this command then your character stand up&lt;br /&gt;
		setPedAnimation(thePlayer)&lt;br /&gt;
		removeElementData(thePlayer, &amp;quot;sitting&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, toggleSit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|9522|Setting a [[ped|ped's]] or [[player|player's]] animation whilst occupying a [[givePedJetPack|jetpack]] will remove their jetpack, but not the jetpack sound}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55710</id>
		<title>Template:Engine functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55710"/>
		<updated>2018-07-07T09:54:24Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed version transclusion for ifp functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[engineApplyShaderToWorldTexture]]&lt;br /&gt;
* [[engineGetModelIDFromName]]&lt;br /&gt;
* [[engineGetModelLODDistance]]&lt;br /&gt;
* [[engineGetModelNameFromID]]&lt;br /&gt;
* [[engineGetModelTextureNames]]&lt;br /&gt;
* [[engineGetVisibleTextureNames]]&lt;br /&gt;
* [[engineImportTXD]]&lt;br /&gt;
* [[engineLoadCOL]]&lt;br /&gt;
* [[engineLoadDFF]]&lt;br /&gt;
* [[engineLoadTXD]]&lt;br /&gt;
* [[engineLoadIFP]]&lt;br /&gt;
* [[engineReplaceAnimation]]&lt;br /&gt;
* [[engineRestoreAnimation]]&lt;br /&gt;
* [[engineRemoveShaderFromWorldTexture]]&lt;br /&gt;
* [[engineReplaceCOL]]&lt;br /&gt;
* [[engineReplaceModel]]&lt;br /&gt;
* [[engineRestoreCOL]]&lt;br /&gt;
* [[engineRestoreModel]]&lt;br /&gt;
* [[engineSetAsynchronousLoading]]&lt;br /&gt;
* [[engineSetModelLODDistance]]&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55709</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55709"/>
		<updated>2018-07-07T09:53:12Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example restores all replaced animations within every block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example restores all replaced animations only within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPlayer, &amp;quot;ped&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example restores &amp;quot;weapon_crouch&amp;quot; animation within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
engineRestoreAnimation( localPLayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55708</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55708"/>
		<updated>2018-07-07T09:52:57Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55707</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55707"/>
		<updated>2018-07-07T09:52:30Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Removed version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation( _, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation( localPlayer, customBlockName, animationName )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=55432</id>
		<title>SetVehicleHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=55432"/>
		<updated>2018-06-23T01:03:15Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Undo revision 55407 by Saml1er (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used to change the handling data of a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, var value ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntaxes for reset configurations:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, false )  -- Reset one property to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, true )   -- Reset one property to GTA default value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, false )  -- Reset all properties to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, true )   -- Reset all properties to GTA default value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you wish to set the handling of.&lt;br /&gt;
*'''property:''' The property you wish to set the handling of the vehicle to.&lt;br /&gt;
{{Handling Properties}}&lt;br /&gt;
*'''value:''' The value of the property you wish to set the handling of the vehicle to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the handling was set successfully, ''false'' otherwise. See below a list of valid properties and their required values:&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
for functionality reasons suspension modification is disabled on monster trucks, trains, boats and trailers.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will make Infernus handling very fast and also make it damage proof from collision (handling by Mr.unpredictable).&lt;br /&gt;
this example will help you in creating your own vehicle Handling.&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 vhandling ( )&lt;br /&gt;
   for _,v in pairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
      if getElementModel(v) == 411 then -------------- vehicle Id&lt;br /&gt;
        setVehicleHandling (v, &amp;quot;mass&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;turnMass&amp;quot;, 200)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;dragCoeff&amp;quot;, 4.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;centerOfMass&amp;quot;, { 0.0,0.08,-0.09 } )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;percentSubmerged&amp;quot;, 103)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionMultiplier&amp;quot;, 1.8)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionLoss&amp;quot;, 1.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionBias&amp;quot;, 0.48)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;numberOfGears&amp;quot;, 5)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;maxVelocity&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineAcceleration&amp;quot;, 90.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineInertia&amp;quot;, 5.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;driveType&amp;quot;, &amp;quot;rwd&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineType&amp;quot;, &amp;quot;petrol&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeDeceleration&amp;quot;, 20.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeBias&amp;quot;, 0.60)&lt;br /&gt;
        -----abs----&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;steeringLock&amp;quot;,  35.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionForceLevel&amp;quot;, 0.85)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionDamping&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionHighSpeedDamping&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionUpperLimit&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionLowerLimit&amp;quot;, -0.16)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionFrontRearBias&amp;quot;, 0.5 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionAntiDiveMultiplier&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;seatOffsetDistance&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;collisionDamageMultiplier&amp;quot;, 0.00)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;monetary&amp;quot;,  10000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;modelFlags&amp;quot;, 1002000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;handlingFlags&amp;quot;, 1000002)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;headLight&amp;quot;, 3)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tailLight&amp;quot;, 2)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;animGroup&amp;quot;, 4)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), vhandling )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will add a command for players with which they can change the mass of the vehicle.&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 massChange ( me, command, mass )&lt;br /&gt;
    local mass = tonumber ( mass ) -- Convert mass to a number&lt;br /&gt;
    local veh = getPedOccupiedVehicle ( me ) -- Get the player's vehicle&lt;br /&gt;
    &lt;br /&gt;
    if mass and veh then  -- If valid mass and in a vehicle&lt;br /&gt;
        local success = setVehicleHandling ( veh, &amp;quot;mass&amp;quot;, mass) -- Set the vehicle's mass, and check if successful&lt;br /&gt;
        &lt;br /&gt;
        if success then -- If successful&lt;br /&gt;
            outputChatBox ( &amp;quot;Your vehicle's mass has been changed to: &amp;quot;..mass..&amp;quot; kg&amp;quot;, me, 0, 255, 0 ) -- Notify the player of success&lt;br /&gt;
        else -- Too bad failure is still an option&lt;br /&gt;
            outputChatBox ( &amp;quot;Setting mass failed. It's probably above or below allowed limits&amp;quot;, me, 255, 0, 0 ) -- Notify the player of failure, and give a possible reason&lt;br /&gt;
        end&lt;br /&gt;
    elseif not veh then -- If not in a vehicle&lt;br /&gt;
        outputChatBox ( &amp;quot;You're not in a vehicle&amp;quot;, me, 255, 0, 0 ) -- Tell the player; He / she obviously doesn't know&lt;br /&gt;
    elseif not mass then -- If not a valid mass&lt;br /&gt;
        outputChatBox ( &amp;quot;Syntax: /changemass [mass]&amp;quot;, me, 255, 0, 0 ) -- Tell the player the proper syntax&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;changemass&amp;quot;, massChange )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will apply custom handling as defined for each specific vehicle (ID) in below table&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;	 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local predefinedHandling = {&lt;br /&gt;
	[411] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
	[415] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
		[562] = { -- Universal drift handling&lt;br /&gt;
		[&amp;quot;driveType&amp;quot;] = &amp;quot;rwd&amp;quot;,&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 200,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 1.5,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 300,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.7,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;collisionDamageMultiplier&amp;quot;] = 0.4,&lt;br /&gt;
		[&amp;quot;engineInertia&amp;quot;] = -175,&lt;br /&gt;
		[&amp;quot;steeringLock&amp;quot;] = 75,&lt;br /&gt;
		[&amp;quot;numberOfGears&amp;quot;] = 4,&lt;br /&gt;
		[&amp;quot;suspensionForceLevel&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionDamping&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionUpperLimit&amp;quot;] = 0.33,&lt;br /&gt;
		[&amp;quot;suspensionFrontRearBias&amp;quot;] = 0.3,&lt;br /&gt;
		[&amp;quot;mass&amp;quot;] = 1800,&lt;br /&gt;
		[&amp;quot;turnMass&amp;quot;] = 3000,&lt;br /&gt;
		[&amp;quot;centerOfMass&amp;quot;] = { [1]=0, [2]=-0.2, [3]=-0.5 }, -- Good example to understand centerOfMass parameter usage&lt;br /&gt;
	},&lt;br /&gt;
&lt;br /&gt;
	--next model below etc (copy rows)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for i,v in pairs (predefinedHandling) do&lt;br /&gt;
	if i then&lt;br /&gt;
		for handling, value in pairs (v) do&lt;br /&gt;
			if not setModelHandling (i, handling, value) then&lt;br /&gt;
				outputDebugString (&amp;quot;* Predefined handling '&amp;quot;..tostring(handling)..&amp;quot;' for vehicle model '&amp;quot;..tostring(i)..&amp;quot;' could not be set to '&amp;quot;..tostring(value)..&amp;quot;'&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
	if v and predefinedHandling[getElementModel(v)] then&lt;br /&gt;
		for k,vl in pairs (predefinedHandling[getElementModel(v)]) do&lt;br /&gt;
			setVehicleHandling (v, k, vl)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function resetHandling()&lt;br /&gt;
	for model in pairs (predefinedHandling) do&lt;br /&gt;
		if model then&lt;br /&gt;
			for k in pairs(getOriginalHandling(model)) do&lt;br /&gt;
				setModelHandling(model, k, nil)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
		if v then&lt;br /&gt;
			local model = getElementModel(v)&lt;br /&gt;
			if predefinedHandling[model] then&lt;br /&gt;
				for k,h in pairs(getOriginalHandling(model)) do&lt;br /&gt;
					setVehicleHandling(v, k, h)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStop&amp;quot;, resourceRoot, resetHandling)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55431</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55431"/>
		<updated>2018-06-22T21:20:18Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Changed 1.5.6 to 1.5.5 for version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example restores all replaced animations within every block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 2:''' This example restores all replaced animations only within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer, &amp;quot;ped&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 3:''' This example restores &amp;quot;weapon_crouch&amp;quot; animation within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPLayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55430</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55430"/>
		<updated>2018-06-22T21:19:56Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Changed 1.5.6 to 1.5.5 for version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP ( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox ( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation ( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55429</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55429"/>
		<updated>2018-06-22T21:19:22Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Changed 1.5.6 to 1.5.5 for version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, customBlockName)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55428</id>
		<title>Template:Engine functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55428"/>
		<updated>2018-06-22T21:18:56Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Changed 1.5.6 to 1.5.5 for version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[engineApplyShaderToWorldTexture]]&lt;br /&gt;
* [[engineGetModelIDFromName]]&lt;br /&gt;
* [[engineGetModelLODDistance]]&lt;br /&gt;
* [[engineGetModelNameFromID]]&lt;br /&gt;
* [[engineGetModelTextureNames]]&lt;br /&gt;
* [[engineGetVisibleTextureNames]]&lt;br /&gt;
* [[engineImportTXD]]&lt;br /&gt;
* [[engineLoadCOL]]&lt;br /&gt;
* [[engineLoadDFF]]&lt;br /&gt;
* [[engineLoadTXD]]&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
* [[engineLoadIFP]]&lt;br /&gt;
* [[engineReplaceAnimation]]&lt;br /&gt;
* [[engineRestoreAnimation]]&lt;br /&gt;
|12213}}&lt;br /&gt;
* [[engineRemoveShaderFromWorldTexture]]&lt;br /&gt;
* [[engineReplaceCOL]]&lt;br /&gt;
* [[engineReplaceModel]]&lt;br /&gt;
* [[engineRestoreCOL]]&lt;br /&gt;
* [[engineRestoreModel]]&lt;br /&gt;
* [[engineSetAsynchronousLoading]]&lt;br /&gt;
* [[engineSetModelLODDistance]]&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55426</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55426"/>
		<updated>2018-06-22T13:46:01Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New items|3.0156|1.5.6|&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example restores all replaced animations within every block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 2:''' This example restores all replaced animations only within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer, &amp;quot;ped&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 3:''' This example restores &amp;quot;weapon_crouch&amp;quot; animation within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPLayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55425</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55425"/>
		<updated>2018-06-22T13:44:47Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New items|3.0156|1.5.6|&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP ( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox ( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation ( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55424</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55424"/>
		<updated>2018-06-22T13:42:51Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added version transclusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New items|3.0156|1.5.6|&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
|12213}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, customBlockName)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55423</id>
		<title>Template:Engine functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55423"/>
		<updated>2018-06-22T13:37:38Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added version transclusions to IFP functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[engineApplyShaderToWorldTexture]]&lt;br /&gt;
* [[engineGetModelIDFromName]]&lt;br /&gt;
* [[engineGetModelLODDistance]]&lt;br /&gt;
* [[engineGetModelNameFromID]]&lt;br /&gt;
* [[engineGetModelTextureNames]]&lt;br /&gt;
* [[engineGetVisibleTextureNames]]&lt;br /&gt;
* [[engineImportTXD]]&lt;br /&gt;
* [[engineLoadCOL]]&lt;br /&gt;
* [[engineLoadDFF]]&lt;br /&gt;
* [[engineLoadTXD]]&lt;br /&gt;
{{New items|3.0156|1.5.6|&lt;br /&gt;
* [[engineLoadIFP]]&lt;br /&gt;
* [[engineReplaceAnimation]]&lt;br /&gt;
* [[engineRestoreAnimation]]&lt;br /&gt;
|12213}}&lt;br /&gt;
* [[engineRemoveShaderFromWorldTexture]]&lt;br /&gt;
* [[engineReplaceCOL]]&lt;br /&gt;
* [[engineReplaceModel]]&lt;br /&gt;
* [[engineRestoreCOL]]&lt;br /&gt;
* [[engineRestoreModel]]&lt;br /&gt;
* [[engineSetAsynchronousLoading]]&lt;br /&gt;
* [[engineSetModelLODDistance]]&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55422</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55422"/>
		<updated>2018-06-22T10:20:34Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added a tip that links ifp_demo resource for animation synchronization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
{{Tip|If you want to synchronize animations, you can check [[https://drive.google.com/open?id=1L2NkQYuLS0YdoHECvxVRMdPBbEgaYUfH ifp_demo]] resource}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, customBlockName)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=55407</id>
		<title>SetVehicleHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=55407"/>
		<updated>2018-06-19T10:17:54Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: changed template from server function to Server client function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used to change the handling data of a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, var value ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntaxes for reset configurations:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, false )  -- Reset one property to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, true )   -- Reset one property to GTA default value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, false )  -- Reset all properties to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, true )   -- Reset all properties to GTA default value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you wish to set the handling of.&lt;br /&gt;
*'''property:''' The property you wish to set the handling of the vehicle to.&lt;br /&gt;
{{Handling Properties}}&lt;br /&gt;
*'''value:''' The value of the property you wish to set the handling of the vehicle to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the handling was set successfully, ''false'' otherwise. See below a list of valid properties and their required values:&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
for functionality reasons suspension modification is disabled on monster trucks, trains, boats and trailers.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will make Infernus handling very fast and also make it damage proof from collision (handling by Mr.unpredictable).&lt;br /&gt;
this example will help you in creating your own vehicle Handling.&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 vhandling ( )&lt;br /&gt;
   for _,v in pairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
      if getElementModel(v) == 411 then -------------- vehicle Id&lt;br /&gt;
        setVehicleHandling (v, &amp;quot;mass&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;turnMass&amp;quot;, 200)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;dragCoeff&amp;quot;, 4.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;centerOfMass&amp;quot;, { 0.0,0.08,-0.09 } )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;percentSubmerged&amp;quot;, 103)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionMultiplier&amp;quot;, 1.8)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionLoss&amp;quot;, 1.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionBias&amp;quot;, 0.48)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;numberOfGears&amp;quot;, 5)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;maxVelocity&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineAcceleration&amp;quot;, 90.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineInertia&amp;quot;, 5.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;driveType&amp;quot;, &amp;quot;rwd&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineType&amp;quot;, &amp;quot;petrol&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeDeceleration&amp;quot;, 20.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeBias&amp;quot;, 0.60)&lt;br /&gt;
        -----abs----&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;steeringLock&amp;quot;,  35.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionForceLevel&amp;quot;, 0.85)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionDamping&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionHighSpeedDamping&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionUpperLimit&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionLowerLimit&amp;quot;, -0.16)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionFrontRearBias&amp;quot;, 0.5 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionAntiDiveMultiplier&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;seatOffsetDistance&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;collisionDamageMultiplier&amp;quot;, 0.00)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;monetary&amp;quot;,  10000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;modelFlags&amp;quot;, 1002000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;handlingFlags&amp;quot;, 1000002)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;headLight&amp;quot;, 3)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tailLight&amp;quot;, 2)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;animGroup&amp;quot;, 4)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), vhandling )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will add a command for players with which they can change the mass of the vehicle.&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 massChange ( me, command, mass )&lt;br /&gt;
    local mass = tonumber ( mass ) -- Convert mass to a number&lt;br /&gt;
    local veh = getPedOccupiedVehicle ( me ) -- Get the player's vehicle&lt;br /&gt;
    &lt;br /&gt;
    if mass and veh then  -- If valid mass and in a vehicle&lt;br /&gt;
        local success = setVehicleHandling ( veh, &amp;quot;mass&amp;quot;, mass) -- Set the vehicle's mass, and check if successful&lt;br /&gt;
        &lt;br /&gt;
        if success then -- If successful&lt;br /&gt;
            outputChatBox ( &amp;quot;Your vehicle's mass has been changed to: &amp;quot;..mass..&amp;quot; kg&amp;quot;, me, 0, 255, 0 ) -- Notify the player of success&lt;br /&gt;
        else -- Too bad failure is still an option&lt;br /&gt;
            outputChatBox ( &amp;quot;Setting mass failed. It's probably above or below allowed limits&amp;quot;, me, 255, 0, 0 ) -- Notify the player of failure, and give a possible reason&lt;br /&gt;
        end&lt;br /&gt;
    elseif not veh then -- If not in a vehicle&lt;br /&gt;
        outputChatBox ( &amp;quot;You're not in a vehicle&amp;quot;, me, 255, 0, 0 ) -- Tell the player; He / she obviously doesn't know&lt;br /&gt;
    elseif not mass then -- If not a valid mass&lt;br /&gt;
        outputChatBox ( &amp;quot;Syntax: /changemass [mass]&amp;quot;, me, 255, 0, 0 ) -- Tell the player the proper syntax&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;changemass&amp;quot;, massChange )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will apply custom handling as defined for each specific vehicle (ID) in below table&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;	 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local predefinedHandling = {&lt;br /&gt;
	[411] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
	[415] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
		[562] = { -- Universal drift handling&lt;br /&gt;
		[&amp;quot;driveType&amp;quot;] = &amp;quot;rwd&amp;quot;,&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 200,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 1.5,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 300,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.7,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;collisionDamageMultiplier&amp;quot;] = 0.4,&lt;br /&gt;
		[&amp;quot;engineInertia&amp;quot;] = -175,&lt;br /&gt;
		[&amp;quot;steeringLock&amp;quot;] = 75,&lt;br /&gt;
		[&amp;quot;numberOfGears&amp;quot;] = 4,&lt;br /&gt;
		[&amp;quot;suspensionForceLevel&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionDamping&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionUpperLimit&amp;quot;] = 0.33,&lt;br /&gt;
		[&amp;quot;suspensionFrontRearBias&amp;quot;] = 0.3,&lt;br /&gt;
		[&amp;quot;mass&amp;quot;] = 1800,&lt;br /&gt;
		[&amp;quot;turnMass&amp;quot;] = 3000,&lt;br /&gt;
		[&amp;quot;centerOfMass&amp;quot;] = { [1]=0, [2]=-0.2, [3]=-0.5 }, -- Good example to understand centerOfMass parameter usage&lt;br /&gt;
	},&lt;br /&gt;
&lt;br /&gt;
	--next model below etc (copy rows)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for i,v in pairs (predefinedHandling) do&lt;br /&gt;
	if i then&lt;br /&gt;
		for handling, value in pairs (v) do&lt;br /&gt;
			if not setModelHandling (i, handling, value) then&lt;br /&gt;
				outputDebugString (&amp;quot;* Predefined handling '&amp;quot;..tostring(handling)..&amp;quot;' for vehicle model '&amp;quot;..tostring(i)..&amp;quot;' could not be set to '&amp;quot;..tostring(value)..&amp;quot;'&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
	if v and predefinedHandling[getElementModel(v)] then&lt;br /&gt;
		for k,vl in pairs (predefinedHandling[getElementModel(v)]) do&lt;br /&gt;
			setVehicleHandling (v, k, vl)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function resetHandling()&lt;br /&gt;
	for model in pairs (predefinedHandling) do&lt;br /&gt;
		if model then&lt;br /&gt;
			for k in pairs(getOriginalHandling(model)) do&lt;br /&gt;
				setModelHandling(model, k, nil)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
		if v then&lt;br /&gt;
			local model = getElementModel(v)&lt;br /&gt;
			if predefinedHandling[model] then&lt;br /&gt;
				for k,h in pairs(getOriginalHandling(model)) do&lt;br /&gt;
					setVehicleHandling(v, k, h)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStop&amp;quot;, resourceRoot, resetHandling)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55379</id>
		<title>Template:Engine functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Engine_functions&amp;diff=55379"/>
		<updated>2018-06-18T22:20:43Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added new IFP engine functions to Engine_functions template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[engineApplyShaderToWorldTexture]]&lt;br /&gt;
* [[engineGetModelIDFromName]]&lt;br /&gt;
* [[engineGetModelLODDistance]]&lt;br /&gt;
* [[engineGetModelNameFromID]]&lt;br /&gt;
* [[engineGetModelTextureNames]]&lt;br /&gt;
* [[engineGetVisibleTextureNames]]&lt;br /&gt;
* [[engineImportTXD]]&lt;br /&gt;
* [[engineLoadCOL]]&lt;br /&gt;
* [[engineLoadDFF]]&lt;br /&gt;
* [[engineLoadTXD]]&lt;br /&gt;
* [[engineLoadIFP]]&lt;br /&gt;
* [[engineRemoveShaderFromWorldTexture]]&lt;br /&gt;
* [[engineReplaceCOL]]&lt;br /&gt;
* [[engineReplaceModel]]&lt;br /&gt;
* [[engineReplaceAnimation]]&lt;br /&gt;
* [[engineRestoreCOL]]&lt;br /&gt;
* [[engineRestoreModel]]&lt;br /&gt;
* [[engineRestoreAnimation]]&lt;br /&gt;
* [[engineSetAsynchronousLoading]]&lt;br /&gt;
* [[engineSetModelLODDistance]]&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>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55378</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55378"/>
		<updated>2018-06-18T21:34:19Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Added examples, and separated optional arguments from required&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example restores all replaced animations within every block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 2:''' This example restores all replaced animations only within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPlayer, &amp;quot;ped&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
'''Example 3:''' This example restores &amp;quot;weapon_crouch&amp;quot; animation within &amp;quot;ped&amp;quot; block for the local player.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
engineRestoreAnimation ( localPLayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55377</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55377"/>
		<updated>2018-06-18T21:19:01Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Fixed typo in file name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, customBlockName)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55376</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55376"/>
		<updated>2018-06-18T21:18:22Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Fixed typo in file name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&amp;lt;section name=&amp;quot;client.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP ( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox ( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation ( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55375</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55375"/>
		<updated>2018-06-18T21:15:54Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), and replaces the internal crouch animation from ped block with a custom animation. If you press C on your keyboard, the custom animation will be played instead of crouch animation.&lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP ( &amp;quot;parkour.ifp&amp;quot;, customBlockName )&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox ( &amp;quot;Failed to load 'parkour.ifp'&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- replace the crouch animation&lt;br /&gt;
engineReplaceAnimation ( localPlayer, &amp;quot;ped&amp;quot;, &amp;quot;weapon_crouch&amp;quot;, customBlockName, &amp;quot;HandPlant&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55374</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55374"/>
		<updated>2018-06-18T21:09:18Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: used a variable instead of passing a raw string&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, customBlockName)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineUnloadIFP&amp;diff=55373</id>
		<title>EngineUnloadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineUnloadIFP&amp;diff=55373"/>
		<updated>2018-06-18T21:04:23Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Disabled|Function disabled. It doesn't exist anymore, use [[DestroyElement|destroyElement]] to unload IFP.}} &lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function unloads an animation library loaded by [[engineLoadIFP]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineLoadIFP ( element ifp ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''ifp:''' The IFP [[element]] loaded by [[engineLoadIFP]] to unload.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the IFP file has been unloaded succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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;
local localPlayer = getLocalPlayer()&lt;br /&gt;
local ifp = nil&lt;br /&gt;
&lt;br /&gt;
function setanimation()&lt;br /&gt;
  ifp = engineLoadIFP(&amp;quot;data/ani.ifp&amp;quot;)&lt;br /&gt;
  if ifp then&lt;br /&gt;
    setPedAnimation(localPlayer, &amp;quot;ANIMATIONBLOCK&amp;quot;, &amp;quot;animation1&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;animation&amp;quot;, setanimation)&lt;br /&gt;
&lt;br /&gt;
function stopanimation()&lt;br /&gt;
  if ifp then&lt;br /&gt;
    engineUnloadIFP(ifp)&lt;br /&gt;
    setPedAnimation(localPlayer)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;stopanimation&amp;quot;, stopanimation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
  &amp;lt;info author=&amp;quot;lukry&amp;quot; version=&amp;quot;1.0&amp;quot; type=&amp;quot;script&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;script src=&amp;quot;animation.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;file src=&amp;quot;data/ani.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55372</id>
		<title>EngineReplaceAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceAnimation&amp;diff=55372"/>
		<updated>2018-06-18T20:51:05Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.&lt;br /&gt;
&lt;br /&gt;
Internal animations replaced using this function can still be played with [[SetPedAnimation|setPedAnimation]]. You can restore replaced animations back with [[EngineRestoreAnimation|engineRestoreAnimation]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, &amp;quot;FightA_block&amp;quot; animation from &amp;quot;ped&amp;quot; block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter.&lt;br /&gt;
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- @todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55371</id>
		<title>EngineRestoreAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineRestoreAnimation&amp;diff=55371"/>
		<updated>2018-06-18T20:49:45Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Created page with &amp;quot;__NOTOC__ {{Client function}} This function restores internal (default) animations that were replaced using engineReplaceAnimation function. This fu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function restores internal (default) animations that were replaced using [[EngineReplaceAnimation|engineReplaceAnimation]] function. This function only affects a specific [[player]] or [[ped]] just like [[EngineReplaceAnimation|engineReplaceAnimation]]. &lt;br /&gt;
&lt;br /&gt;
If only 1st parameter ([[Ped|ped]]) is provided to this function, all replaced animations are restored. &lt;br /&gt;
If block name is also provided for 2nd parameter, then replaced animations within that block are restored.&lt;br /&gt;
If 3rd parameter (animation name) is provided, then only that specific animation within that specific block is restored.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineRestoreAnimation ( ped thePed [, string InternalBlockName, string InternalAnimName ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the [[player]] or [[ped]] you want to restore an animation(s) for.&lt;br /&gt;
*'''InternalBlockName:''' the [[Animations|internal block]] name.&lt;br /&gt;
*'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- @todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55370</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55370"/>
		<updated>2018-06-18T19:55:31Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: Updated engineLoadIFP with latest syntax and example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file. You cannot use the GTA default [[Animations|internal block]] names.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example loads a custom IFP file ([https://drive.google.com/file/d/1XZNNCCn7xhBNbhaIbsBubky3BEj06zWp/view?usp=sharing parkour.ifp]), adds a command &amp;quot;animation&amp;quot; that takes 1 parameter as animation name for playing animations within that IFP. &lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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;
--[[&lt;br /&gt;
credits to Paul_Cortez for the IFP file.&lt;br /&gt;
parkour.ifp has following animations:&lt;br /&gt;
&lt;br /&gt;
BckHndSpingBTuck&lt;br /&gt;
BckHndSping&lt;br /&gt;
CartWheel&lt;br /&gt;
FrntHndSpring&lt;br /&gt;
HandPlant&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
-- you can choose any name you want, do not choose a default GTA:SA block name&lt;br /&gt;
local customBlockName = &amp;quot;myNewBlock&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- load the IFP file&lt;br /&gt;
local IFP = engineLoadIFP(&amp;quot;parkour.ifp&amp;quot;, &amp;quot;myNewBlock&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- let us know if IFP failed to load&lt;br /&gt;
if not IFP then&lt;br /&gt;
    outputChatBox(&amp;quot;Failed to load 'parkour.ifp'&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- execute the command using /animation &amp;lt;NameOfCustomAnimation&amp;gt;&lt;br /&gt;
-- for example, /animation CartWheel&lt;br /&gt;
function setanimation ( commandName, animationName )&lt;br /&gt;
    -- check if IFP file has loaded&lt;br /&gt;
    if IFP then&lt;br /&gt;
        -- now play our custom animation&lt;br /&gt;
        setPedAnimation(localPlayer, customBlockName, animationName)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;animation&amp;quot;, setanimation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Saml1er&amp;quot; version=&amp;quot;1.0.0&amp;quot; description=&amp;quot;Just a simple test resource for custom ped IFP animations&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;parkour.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55369</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55369"/>
		<updated>2018-06-18T18:53:05Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
If you wish to replace a GTA internal animation with a custom one, you can use [[EngineReplaceAnimation|engineReplaceAnimation]]. To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
IFP engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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 setanimation()&lt;br /&gt;
  if engineLoadIFP(&amp;quot;data/ani.ifp&amp;quot;) then&lt;br /&gt;
    setPedAnimation(getLocalPlayer(), &amp;quot;ANIMATIONBLOCK&amp;quot;, &amp;quot;animation1&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;animation&amp;quot;, setanimation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
  &amp;lt;info author=&amp;quot;lukry&amp;quot; version=&amp;quot;1.0&amp;quot; type=&amp;quot;script&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script src=&amp;quot;animation.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;file src=&amp;quot;data/ani.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55368</id>
		<title>EngineLoadIFP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadIFP&amp;diff=55368"/>
		<updated>2018-06-18T18:47:39Z</updated>

		<summary type="html">&lt;p&gt;Saml1er: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads an animation library (IFP) file into GTA with a custom block name. All three IFP formats are supported ANPK, ANP2, and ANP3. Unfortunately, GTA 3 animations are not supported, however, you can load GTA:VC IFP files using this function. You don't have to replace any animation to play a custom one, to play a custom animation, load the IFP file using this function, then use [[SetPedAnimation|setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
To unload the IFP file, use [[DestroyElement|destroyElement]], restarting or stopping the resource can also unload the IFP file automatically.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ifp engineLoadIFP ( string IfpFilePath, string CustomBlockName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IfpFilePath:''' the [[filepath|file path]] to the IFP file you want to load.&lt;br /&gt;
*'''CustomBlockName:''' the new block name for the IFP file.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;animation.lua&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 setanimation()&lt;br /&gt;
  if engineLoadIFP(&amp;quot;data/ani.ifp&amp;quot;) then&lt;br /&gt;
    setPedAnimation(getLocalPlayer(), &amp;quot;ANIMATIONBLOCK&amp;quot;, &amp;quot;animation1&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;animation&amp;quot;, setanimation)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;meta.xml&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;
&amp;lt;meta&amp;gt;&lt;br /&gt;
  &amp;lt;info author=&amp;quot;lukry&amp;quot; version=&amp;quot;1.0&amp;quot; type=&amp;quot;script&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script src=&amp;quot;animation.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;file src=&amp;quot;data/ani.ifp&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Saml1er</name></author>
	</entry>
</feed>