GetPedAnimationData: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(15 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{Disabled}} | |||
This function is used to return the animation data of a [[player]] or [[ped]] that was set using [[setPedAnimation | This function is used to return the animation data of a [[player]] or [[ped]] that was set using [[setPedAnimation]]. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getPedAnimationData ( ped thePed ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 13: | Line 13: | ||
===Returns=== | ===Returns=== | ||
Returns a [[table]] containing information about | Returns 2 <!-- Returns a string [[table]] -->[[string]]s containing information about [[animations]]. These keys are present below <!-- in the table --> : | ||
*'''name:''' string - name of the animation | *'''name:''' string - name of the animation | ||
*'''block_name:''' string - name of animation block | *'''block_name:''' string - name of animation block | ||
*'''loop:''' boolean - is animation looping? | <!-- For some reason it doesn't output these *'''loop:''' boolean - is animation looping? | ||
*'''update_position:''' boolean - updating position | *'''update_position:''' boolean - updating position | ||
*'''interruptible:''' boolean - is animation interruptible? | *'''interruptible:''' boolean - is animation interruptible? | ||
Line 23: | Line 23: | ||
*'''finished:''' boolean - has animation finished playing? | *'''finished:''' boolean - has animation finished playing? | ||
*'''speed:''' float - speed | *'''speed:''' float - speed | ||
*'''blend_speed:''' float - blending speed | *'''blend_speed:''' float - blending speed --> | ||
===Example=== | |||
This example adds a command to get the local player [[animations | animation]] data. | |||
<syntaxhighlight lang="lua">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) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Client ped functions}} | {{Client ped functions}} |
Latest revision as of 15:32, 7 November 2024
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
- canPedBeKnockedOffBike
- getPedAnalogControlState
- getPedAnimation
- getPedBonePosition
- getPedCameraRotation
- getPedControlState
- getPedMoveState
- getPedOxygenLevel
- getPedSimplestTask
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedVoice
- getPedWeaponMuzzlePosition
- givePedWeapon
- isPedBleeding
- isPedDoingTask
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedControlState
- setPedEnterVehicle
- setPedExitVehicle
- IsPedFootBloodEnabled
- setPedFootBloodEnabled
- setPedLookAt
- setPedOxygenLevel
- setPedTargetingMarkerEnabled
- setPedVoice
- Shared
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle