GetPedAnimationData: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Function has been disabled.)
(Remove obsolete Requirements section)
 
Line 37: Line 37:
addCommandHandler("getAnimData",animData)
addCommandHandler("getAnimData",animData)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|n/a|1.0.1|}}


==See Also==
==See Also==
{{Client ped functions}}
{{Client ped functions}}

Latest revision as of 15:32, 7 November 2024

Dialog-warning.png Function has been disabled.

This function is used to return the animation data of a player or ped that was set using setPedAnimation.

Syntax

string getPedAnimationData ( ped thePed )

Required Arguments

  • thePed: the player or ped you want to get the animation data of.

Returns

Returns 2 strings containing information about animations. These keys are present below  :

  • name: string - name of the animation
  • block_name: string - name of animation block

Example

This example adds a command to get the local player animation data.

function animData()
     local data = getPedAnimationData(localPlayer)
     if data then
          outputChatBox(data)
     else
          outputChatBox("Sorry, but you're not doing thing!")
     end
end
addCommandHandler("getAnimData",animData)

See Also