<?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=Extasy</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=Extasy"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Extasy"/>
	<updated>2026-04-24T09:01:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Extasy&amp;diff=67024</id>
		<title>User:Extasy</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Extasy&amp;diff=67024"/>
		<updated>2020-07-05T11:41:13Z</updated>

		<summary type="html">&lt;p&gt;Extasy: Extasy moved page User:Extasy to User:ExTa&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:ExTa]]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:ExTa&amp;diff=67023</id>
		<title>User:ExTa</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:ExTa&amp;diff=67023"/>
		<updated>2020-07-05T11:41:13Z</updated>

		<summary type="html">&lt;p&gt;Extasy: Extasy moved page User:Extasy to User:ExTa&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==References in MTA==&lt;br /&gt;
[https://www.facebook.com/staymta/]&lt;br /&gt;
[https://www.facebook.com/internalGamingMTA/]&lt;br /&gt;
[https://www.facebook.com/identityMTA/]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62147</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62147"/>
		<updated>2019-02-05T17:02:05Z</updated>

		<summary type="html">&lt;p&gt;Extasy: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is make a rounded rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool roundedRectangle ( float startX, float startY, float width, float height [, int tocolor ( int red, int green, int blue [, int alpha = 255 ] ) , bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Exmaple==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&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 sx, sy = guiGetScreenSize()&lt;br /&gt;
roundedRectangle(sx/2, sy/2, 100, 100, tocolor(0,0,0,200))&lt;br /&gt;
&lt;br /&gt;
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&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 roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Written by: ExTasY[https://wiki.multitheftauto.com/wiki/User:Extasy]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62144</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62144"/>
		<updated>2019-02-02T20:38:03Z</updated>

		<summary type="html">&lt;p&gt;Extasy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is make a rounded rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool roundedRectangle ( float startX, float startY, float width, float height [, int tocolor ( int red, int green, int blue [, int alpha = 255 ] ) , bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Exmaple==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&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 sx, sy = guiGetScreenSize()&lt;br /&gt;
roundedRectangle(sx/2, sy/2, 100, 100, tocolor(0,0,0,200))&lt;br /&gt;
&lt;br /&gt;
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Both side&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Written by: ExTasY[https://wiki.multitheftauto.com/wiki/User:Extasy]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:ExTa&amp;diff=62143</id>
		<title>User:ExTa</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:ExTa&amp;diff=62143"/>
		<updated>2019-02-02T20:37:42Z</updated>

		<summary type="html">&lt;p&gt;Extasy: Created page with &amp;quot;==References in MTA== [https://www.facebook.com/staymta/] [https://www.facebook.com/internalGamingMTA/] [https://www.facebook.com/identityMTA/]&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==References in MTA==&lt;br /&gt;
[https://www.facebook.com/staymta/]&lt;br /&gt;
[https://www.facebook.com/internalGamingMTA/]&lt;br /&gt;
[https://www.facebook.com/identityMTA/]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62142</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=62142"/>
		<updated>2019-02-02T20:36:00Z</updated>

		<summary type="html">&lt;p&gt;Extasy: Created page with &amp;quot;{{Useful Function}} &amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt; __NOTOC__ This function is make a rounded rectangle.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool roundedRectangle ( floa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is make a rounded rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool roundedRectangle ( float startX, float startY, float width, float height [, int tocolor ( int red, int green, int blue [, int alpha = 255 ] ) , bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Exmaple==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&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 sx, sy = guiGetScreenSize()&lt;br /&gt;
roundedRectangle(sx/2, sy/2, 100, 100, tocolor(0,0,0,200))&lt;br /&gt;
&lt;br /&gt;
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Both side&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)&lt;br /&gt;
	if (x and y and w and h) then&lt;br /&gt;
		if (not borderColor) then&lt;br /&gt;
			borderColor = tocolor(0, 0, 0, 200);&lt;br /&gt;
		end&lt;br /&gt;
		if (not bgColor) then&lt;br /&gt;
			bgColor = borderColor;&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawRectangle(x, y, w, h, bgColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
		dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Written by: ExTasY (HUN)&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54526</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54526"/>
		<updated>2018-04-03T11:52:38Z</updated>

		<summary type="html">&lt;p&gt;Extasy: /* Example3 */&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 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 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;
==Example1== &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;
   ped1 = createPed(56, 1, 1, 4)&lt;br /&gt;
   setPedRotation(ped1, 315)&lt;br /&gt;
   setPedAnimation( ped1, &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;
&lt;br /&gt;
==Example2==&lt;br /&gt;
This example makes the player dance when he uses command /dance and stop when he uses the same command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;,root,&lt;br /&gt;
  function ()&lt;br /&gt;
    daBlock, daAnim = getPedAnimation(getLocalPlayer())&lt;br /&gt;
    setElementData(root,&amp;quot;blockz&amp;quot;,daBlock)&lt;br /&gt;
    setElementData(root,&amp;quot;animz&amp;quot;,daAnim)&lt;br /&gt;
  end )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&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 dance (source)&lt;br /&gt;
	daBlockz = getElementData(root,&amp;quot;blockz&amp;quot;)&lt;br /&gt;
	daAnimz = getElementData(root,&amp;quot;animz&amp;quot;)&lt;br /&gt;
		if daBlockz == &amp;quot;dancing&amp;quot; and daAnimz == &amp;quot;dnce_m_b&amp;quot; then&lt;br /&gt;
			setPedAnimation(source,false)&lt;br /&gt;
		else&lt;br /&gt;
			setPedAnimation ( source, &amp;quot;DANCING&amp;quot;, &amp;quot;dnce_m_b&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
addCommandHandler(&amp;quot;dance&amp;quot;,dance)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example3== &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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local animValue = false&lt;br /&gt;
&lt;br /&gt;
function sitDown (thePlayer)&lt;br /&gt;
   if animValue == false 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;
	animValue = true&lt;br /&gt;
   else&lt;br /&gt;
-- If you use again this command then your character stand up&lt;br /&gt;
	animValue = false&lt;br /&gt;
	setPedAnimation(thePlayer, nil, nil)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, sitDown)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54525</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54525"/>
		<updated>2018-04-03T11:51:43Z</updated>

		<summary type="html">&lt;p&gt;Extasy: /* Example3 */&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 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 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;
==Example1== &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;
   ped1 = createPed(56, 1, 1, 4)&lt;br /&gt;
   setPedRotation(ped1, 315)&lt;br /&gt;
   setPedAnimation( ped1, &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;
&lt;br /&gt;
==Example2==&lt;br /&gt;
This example makes the player dance when he uses command /dance and stop when he uses the same command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;,root,&lt;br /&gt;
  function ()&lt;br /&gt;
    daBlock, daAnim = getPedAnimation(getLocalPlayer())&lt;br /&gt;
    setElementData(root,&amp;quot;blockz&amp;quot;,daBlock)&lt;br /&gt;
    setElementData(root,&amp;quot;animz&amp;quot;,daAnim)&lt;br /&gt;
  end )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&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 dance (source)&lt;br /&gt;
	daBlockz = getElementData(root,&amp;quot;blockz&amp;quot;)&lt;br /&gt;
	daAnimz = getElementData(root,&amp;quot;animz&amp;quot;)&lt;br /&gt;
		if daBlockz == &amp;quot;dancing&amp;quot; and daAnimz == &amp;quot;dnce_m_b&amp;quot; then&lt;br /&gt;
			setPedAnimation(source,false)&lt;br /&gt;
		else&lt;br /&gt;
			setPedAnimation ( source, &amp;quot;DANCING&amp;quot;, &amp;quot;dnce_m_b&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
addCommandHandler(&amp;quot;dance&amp;quot;,dance)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example3== &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 remain seated.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local animValue = false&lt;br /&gt;
&lt;br /&gt;
function sitDown (thePlayer)&lt;br /&gt;
   if animValue == false 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;
	animValue = true&lt;br /&gt;
   else&lt;br /&gt;
-- If you use again this command then your character stand up&lt;br /&gt;
	animValue = false&lt;br /&gt;
	setPedAnimation(thePlayer, nil, nil)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, sitDown)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54524</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=54524"/>
		<updated>2018-04-03T11:48:55Z</updated>

		<summary type="html">&lt;p&gt;Extasy: /* Example3 */&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 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 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;
==Example1== &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;
   ped1 = createPed(56, 1, 1, 4)&lt;br /&gt;
   setPedRotation(ped1, 315)&lt;br /&gt;
   setPedAnimation( ped1, &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;
&lt;br /&gt;
==Example2==&lt;br /&gt;
This example makes the player dance when he uses command /dance and stop when he uses the same command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;,root,&lt;br /&gt;
  function ()&lt;br /&gt;
    daBlock, daAnim = getPedAnimation(getLocalPlayer())&lt;br /&gt;
    setElementData(root,&amp;quot;blockz&amp;quot;,daBlock)&lt;br /&gt;
    setElementData(root,&amp;quot;animz&amp;quot;,daAnim)&lt;br /&gt;
  end )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&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 dance (source)&lt;br /&gt;
	daBlockz = getElementData(root,&amp;quot;blockz&amp;quot;)&lt;br /&gt;
	daAnimz = getElementData(root,&amp;quot;animz&amp;quot;)&lt;br /&gt;
		if daBlockz == &amp;quot;dancing&amp;quot; and daAnimz == &amp;quot;dnce_m_b&amp;quot; then&lt;br /&gt;
			setPedAnimation(source,false)&lt;br /&gt;
		else&lt;br /&gt;
			setPedAnimation ( source, &amp;quot;DANCING&amp;quot;, &amp;quot;dnce_m_b&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
addCommandHandler(&amp;quot;dance&amp;quot;,dance)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example3== &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 remain seated.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local animValue = false&lt;br /&gt;
&lt;br /&gt;
function sitDown (thePlayer)&lt;br /&gt;
   if animValue == false then&lt;br /&gt;
	setPedAnimation(thePlayer, &amp;quot;ped&amp;quot;, &amp;quot;seat_down&amp;quot;, -1, false, false, false, true)&lt;br /&gt;
	animValue = true&lt;br /&gt;
   else&lt;br /&gt;
-- If you use again this command then your character stand up&lt;br /&gt;
	animValue = false&lt;br /&gt;
	setPedAnimation(thePlayer, nil, nil)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;sit&amp;quot;, sitDown)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Extasy</name></author>
	</entry>
</feed>