SetPedAnimation
Jump to navigation
Jump to search
Sets the current animation of a player or ped.
Syntax
bool setPedAnimation ( ped thePed, string block, string anim, [ bool loop = false, bool updatePosition = true ] )
Or, to stop the current animation:
bool setPedAnimation ( ped thePed, bool false )
Required Arguments
- thePed: the player or ped you want to apply an animation to.
- block: the animation block's name.
- anim: the name of the animation within the block.
Optional Arguments
- loop: indicates whether or not the animation will loop.
- updatePosition: sets whether or not the animation is allowed to change the ped's position (e.g. walking and running animations).
Returns
Returns true if succesful, false otherwise.
Example
See Also
- 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