SetPedAnimation
From Multi Theft Auto: Wiki
Sets the current animation of a player or ped. Not specifying the type of animation will automatically cancel the current one.
Syntax
Required Arguments
- thePed: the player or ped you want to apply an animation to.
Optional Arguments
NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.
- block: the animation block's name.
- anim: the name of the animation within the block.
- time: how long the animation will run for in milliseconds.
- loop: indicates whether or not the animation will loop.
- updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.
- interruptable: if set to 'false' other tasks wont be able to interupt the animation.
- freezeLastFrame: ... (From 1.1 onwards).
Returns
Returns true if succesful, false otherwise.
Example
Click to collapse [-]
ServerThis example creates a ped, rotates him, and makes him walk:
function makePed() ped1 = createPed(56, 1, 1, 4) setPedRotation(ped1, 315) setPedAnimation( ped1, "ped", "WOMAN_walknorm") end addCommandHandler("makemyped", makePed)
See Also
- addPedClothes
- createPed
- doesPedHaveJetPack
- getPedAmmoInClip
- getPedArmor
- getPedClothes
- getPedContactElement
- getPedFightingStyle
- getPedGravity
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedRotation
- getPedSkin
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWeapon
- getPedWeaponSlot
- getValidPedModels
- givePedJetPack
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedFrozen
- isPedHeadless
- isPedInVehicle
- isPedInWater
- isPedOnFire
- isPedOnGround
- killPed
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- removePedJetPack
- setPedAnimation