- Documentation
- Client functions
- engineReplaceAnimation
Function
engineReplaceAnimation
Makes a game animation (block and name) play on this ped as an animation from a loaded IFP file. It works only for this player; if it is your own ped, others see the effect in the streamed pose.
Syntax
bool engineReplaceAnimation(ped thePed, string internalBlockName, string internalAnimName, string customBlockName, string customAnimName)Arguments
thePedped- The ped.
internalBlockNamestring- Game block.
internalAnimNamestring- Game animation.
customBlockNamestring- A block from
engineLoadIFP. customAnimNamestring- An animation from the file.
Returns
true on success.
Example
A custom walk instead of the game walk.
engineLoadIFP("anim/chod.ifp", "chod.blok")
engineReplaceAnimation(localPlayer, "ped", "walk_player", "chod.blok", "walk_custom")
See also
engineRestoreAnimationUndoes animation replacements fromengineReplaceAnimationon a ped: all, one game block's or one animation.engineLoadIFPLoads an IFP animation library (ANPK from Vice City, ANP2/ANP3 from San Andreas) from a file or data under your own block name (preferably"resource.block"). Play animations withsetPedAnimation(ped, block, animation)or substitute them withengineReplaceAnimation. Stopping the resource frees the block.