SetPedAnimationSpeed
From Multi Theft Auto: Wiki
Sets the speed of a currently running animation for a particular player or ped.
Syntax
bool setPedAnimationSpeed ( ped thePed [, string anim = "", float speed = 1.0 ] )
OOP Syntax Help! I don't understand this!
- Method: ped:setAnimationProgress(...)
Required Arguments
Optional Arguments
- anim: the animation name it will affect.
- speed: a float containing the speed between 0.0–1.0 you want to apply to the animation. This limitation may be adjusted in the future, so do not provide speeds outside this boundary.
Returns
Returns true if successful, false otherwise.
Example
Click to collapse [-]
ServerIn this example we give the animation of dancing to the player and after 5 seconds it becomes 0.2s slower.
addCommandHandler('dance', function( player, cmd ) setPedAnimation( player, 'DANCING', 'DAN_Down_A', -1 ) source = player setTimer(function() setPedAnimationSpeed( source, 'DAN_Down_A', 0.2 ) end,5000,1) end )
See Also
- addPedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedClothes
- getPedContactElement
- getPedFightingStyle
- getPedGravity
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedChoking
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedGravity
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot