<?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=JMirror</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=JMirror"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/JMirror"/>
	<updated>2026-05-10T05:58:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68106</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68106"/>
		<updated>2020-12-25T11:31:33Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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(getLocalPlayer(), 2)&lt;br /&gt;
    setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
    for key, value in ipairs(shoulders) do&lt;br /&gt;
       setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68105</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68105"/>
		<updated>2020-12-25T11:30:28Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
Этот пример показывает как можно превратить местного игрока в так называемый 'Вертолёт'.&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
	   setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68104</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68104"/>
		<updated>2020-12-25T11:29:55Z</updated>

		<summary type="html">&lt;p&gt;JMirror: &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;
Этот пример показывает как можно превратить местного игрока в так называемый 'Вертолёт'.&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68103</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68103"/>
		<updated>2020-12-25T11:29:12Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
Этот пример показывает как можно превратить местного игрока в так называемый 'Вертолёт'.&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68102</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68102"/>
		<updated>2020-12-25T11:28:58Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
Этот пример показывает как можно превратить местного игрока в так называемый 'Вертолёт'&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68101</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68101"/>
		<updated>2020-12-25T11:23:11Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68100</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68100"/>
		<updated>2020-12-25T11:22:49Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Пример&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/section&amp;gt;&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68099</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68099"/>
		<updated>2020-12-25T11:21:17Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Пример&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68098</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68098"/>
		<updated>2020-12-25T11:21:04Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Пример&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&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(getLocalPlayer(), 2)&lt;br /&gt;
	setElementBoneRotation(getLocalPlayer(), 2, custom_yaw, pitch, roll)&lt;br /&gt;
	for key, value in ipairs(shoulders) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, 0, 0, 0)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68097</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68097"/>
		<updated>2020-12-25T11:19:02Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Пример 2&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68096</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68096"/>
		<updated>2020-12-25T11:18:02Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
{{RU/Client function}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68095</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68095"/>
		<updated>2020-12-25T11:16:45Z</updated>

		<summary type="html">&lt;p&gt;JMirror: &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;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68094</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68094"/>
		<updated>2020-12-25T11:16:23Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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==&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68093</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68093"/>
		<updated>2020-12-25T11:15:56Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Example.jpg|Caption1&lt;br /&gt;
Example.jpg|Caption2&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68092</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68092"/>
		<updated>2020-12-25T11:15:23Z</updated>

		<summary type="html">&lt;p&gt;JMirror: &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;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68087</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68087"/>
		<updated>2020-12-23T20:04:32Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* This example shows how you can create the effect of shaking several body parts in a player */&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;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68086</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68086"/>
		<updated>2020-12-23T20:03:49Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* This example shows how you can create the effect of shaking several body parts in a player */&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;
==This example shows how you can create the effect of shaking several body parts in a player==&lt;br /&gt;
local bones = {5, 22, 32, 23, 33, 24, 34, 2, 3}&lt;br /&gt;
&lt;br /&gt;
function changeBoneRotation()&lt;br /&gt;
	local number = math.random(-2, 0)&lt;br /&gt;
	for key, value in ipairs(bones) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, number, number, number)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&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;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68085</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68085"/>
		<updated>2020-12-23T19:59:55Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* Returns */&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;
==This example shows how you can create the effect of shaking several body parts in a player==&lt;br /&gt;
local bones = {5, 22, 32, 23, 33, 24, 34, 2, 3}&lt;br /&gt;
&lt;br /&gt;
[[function changeBoneRotation()&lt;br /&gt;
	local number = math.random(-2, 0)&lt;br /&gt;
	for key, value in ipairs(bones) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, number, number, number)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68084</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68084"/>
		<updated>2020-12-23T19:59:07Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* This example shows how you can create the effect of shaking several body parts in a player */&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;
'''Bold text'''==This example shows how you can create the effect of shaking several body parts in a player==&lt;br /&gt;
local bones = {5, 22, 32, 23, 33, 24, 34, 2, 3}&lt;br /&gt;
&lt;br /&gt;
function changeBoneRotation()&lt;br /&gt;
	local number = math.random(-2, 0)&lt;br /&gt;
	for key, value in ipairs(bones) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, number, number, number)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68083</id>
		<title>SetElementBoneRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBoneRotation&amp;diff=68083"/>
		<updated>2020-12-23T19:57:06Z</updated>

		<summary type="html">&lt;p&gt;JMirror: /* 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;
==This example shows how you can create the effect of shaking several body parts in a player==&lt;br /&gt;
local bones = {5, 22, 32, 23, 33, 24, 34, 2, 3}&lt;br /&gt;
&lt;br /&gt;
function changeBoneRotation()&lt;br /&gt;
	local number = math.random(-2, 0)&lt;br /&gt;
	for key, value in ipairs(bones) do&lt;br /&gt;
		setElementBoneRotation(getLocalPlayer(), value, number, number, number)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, getRootElement(), changeBoneRotation)&lt;br /&gt;
&lt;br /&gt;
updateElementRpHAnim(getLocalPlayer())&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>JMirror</name></author>
	</entry>
</feed>