<?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=Al3grabMTA</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=Al3grabMTA"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Al3grabMTA"/>
	<updated>2026-05-18T07:51:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedAnimation&amp;diff=28498</id>
		<title>GetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedAnimation&amp;diff=28498"/>
		<updated>2011-11-27T14:30:58Z</updated>

		<summary type="html">&lt;p&gt;Al3grabMTA: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
Gets the animation of a player or ped that was set using [[setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
''Note: Use [[getPedTask]] to monitor what movements the player is currently doing.''&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string string getPedAnimation ( ped thePed )&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 get the animation of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''strings'': the first is the name of the block, the second is the name of the animation. Returns ''false'' if there was an error or if the ped is not doing an animation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;Server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CopyAnimation(Me,theCommand,thePlayer) -- The Command Function&lt;br /&gt;
	if thePlayer then -- If a player name entered then&lt;br /&gt;
		thePlayerToCopyFrom = getPlayerFromName(thePlayer) -- get player from his name&lt;br /&gt;
		Block,Anim = getPedAnimation(thePlayerToCopyFrom) -- get the player animation&lt;br /&gt;
		if Block then -- if got the animation successfully then&lt;br /&gt;
			setPedAnimation(Me,Block,Anim) -- set my animation the same&lt;br /&gt;
			outputChatBox(&amp;quot;* Copied Successfully !&amp;quot;,Me)	-- output chat message&lt;br /&gt;
		end&lt;br /&gt;
	else	&lt;br /&gt;
		outputChatBox(&amp;quot;* Please Enter a Player Name To Copy From !&amp;quot;,Me)	-- if you didnt entered a player name , then output a chat box message&lt;br /&gt;
	end&lt;br /&gt;
	end&lt;br /&gt;
addCommandHandler(&amp;quot;copyanim&amp;quot;,CopyAnimation) --  adding the Command Handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&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;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Al3grabMTA</name></author>
	</entry>
</feed>