GetPedAnimationData: Difference between revisions
Jump to navigation
Jump to search
m (→Example: Forgot the var) |
No edit summary |
||
Line 28: | Line 28: | ||
This example adds a command to get the local player [[animations | animation]] data. | This example adds a command to get the local player [[animations | animation]] data. | ||
<syntaxhighlight lang="lua">function animData() | <syntaxhighlight lang="lua">function animData() | ||
local data = | local data = getPedAnimationData(localPlayer) | ||
if data then | if data then | ||
outputChatBox(data) | outputChatBox(data) | ||
Line 36: | Line 36: | ||
end | end | ||
addCommandHandler("getAnimData",animData) | addCommandHandler("getAnimData",animData) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 14:15, 21 September 2012
This article needs checking. | |
Reason(s): Still missing in 1.3, getPedTask monitors the player, but you can't get animation table --Ransom 03:14, 1 September 2012 (UTC) |
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)
Requirements
This template will be deleted.
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