SetPedAnimationProgress: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(added reference to bugtrack issue) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{Needs Checking|Progress always sets to 0, when used clientside since MTA 1.4}} | {{Needs Checking|Progress always sets to 0, when used clientside since MTA 1.4<ref>https://bugs.multitheftauto.com/view.php?id=8461</ref>}} | ||
Sets the current animation progress of a player or ped. | Sets the current animation progress of a player or ped. | ||
Line 42: | Line 42: | ||
{{Ped_functions}} | {{Ped_functions}} | ||
[[ru:setPedAnimationProgress]] | [[ru:setPedAnimationProgress]] | ||
== References == | |||
<references /> |
Revision as of 14:44, 25 August 2014
This article needs checking. | |
Reason(s): Progress always sets to 0, when used clientside since MTA 1.4[1] |
Sets the current animation progress of a player or ped.
Syntax
bool setPedAnimationProgress ( ped thePed [, string anim, float progress] )
Required Arguments
- thePed: the player or ped you want to change animation progress.
Optional Arguments
- 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
Returns true if successful, false otherwise.
Example
Click to collapse [-]
ServerThis 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 ) end addCommandHandler("makemyped", makePed)
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