ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. engineReplaceAnimation

Function

engineReplaceAnimation

ClientGame engineIdentical to MTA:SA

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