setPedAnimationProgress
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
Sets the current animation progress of a player or ped.
OOP Syntax Help! I don't understand this!
- Method:ped:setAnimationProgress(...)
Syntax
bool setPedAnimationProgress ( ped thePed, string anim, float progress )Required Arguments
- thePed: the player or ped you want to change animation progress.
- anim: the animation name currently applied to ped, if not supplied, the animation will stop
- progress: current animation progress you want to apply, value from 0.0 to 1.0, if not supplied will default to 0.0
Returns
- bool: value
Returns true if successful, false otherwise.
Code Examples
shared
This example creates a ped, apply animation to it, and "freeze" the animation at half of overall animation time.
function animRender( ped1 ) setPedAnimationProgress( ped1, "M_SMKSTND_LOOP", 0.5 ) setTimer( animRender, 50, 1, ped1 )end
function makePed( ) local ped1 = createPed( 56, 1, 1, 4 ) setPedAnimation( ped1, "SMOKING", "M_SMKSTND_LOOP" ) setTimer ( animRender, 50, 1, ped1 )endaddCommandHandler( "makemyped", makePed )See Also
Ped Functions
- addPedClothes
- canPedBeKnockedOffBike
- createPed
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedGravity
- 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
- isPedOnGround
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- isPedWearingJetpack
- killPed
- playPedVoiceLine
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- resetPedVoice
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedChoking
- setPedControlState
- setPedDoingGangDriveby
- setPedEnterVehicle
- setPedExitVehicle
- setPedFightingStyle
- setPedFootBloodEnabled
- setPedGravity
- setPedHeadless
- setPedLookAt
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- setPedWearingJetpack
- warpPedIntoVehicle