GetPedAnimationData: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Function has been disabled.) |
||
(5 intermediate revisions by 3 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]]. | ||
Line 25: | Line 24: | ||
*'''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> | |||
==Requirements== | ==Requirements== |
Latest revision as of 17:09, 6 July 2016
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)
Requirements
Minimum server version | n/a |
---|---|
Minimum client version | 1.0.1 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.0.1" />
See Also
- addPedClothes
- canPedBeKnockedOffBike
- createPed
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedBleeding
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedFootBloodEnabled
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedControlState
- setPedDoingGangDriveby
- setPedEnterVehicle
- setPedExitVehicle
- setPedFightingStyle
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle