- Documentation
- Client functions
- engineLoadIFP
Function
engineLoadIFP
Loads 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 with setPedAnimation(ped, block, animation) or substitute them with engineReplaceAnimation. Stopping the resource frees the block.
Syntax
element engineLoadIFP(string ifpFileOrData, string customBlockName)Arguments
ifpFileOrDatastring- An
.ifpfile or its data. customBlockNamestring- Your own block name.
Returns
An IFP element or false.
Example
local ifp = engineLoadIFP("anim/taniec.ifp", "taniec.blok")
if ifp then setPedAnimation(localPlayer, "taniec.blok", "dance1") end
See also
engineGetIFPAnimationsReturns the list of animations in a loaded IFP block: a table of{ name, duration, bones }(duration in seconds, bone count).engineReplaceAnimationMakes 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.setPedAnimationPlays an animation on a ped. The animation comes from a game animation block (e.g.ped,dancing,smoking) or from an IFP file loaded withengineLoadIFP. Calling it without a block stops the animation. On the server the animation reaches every player. On the client it only runs in this game: for the local player others see it through pose streaming; for a remote player the function returnsfalsebecause their appearance comes from their own game.