EngineLoadIFP: Difference between revisions
Jump to navigation
Jump to search
(Added syntax. Example is coming.) |
|||
Line 19: | Line 19: | ||
Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise. | Returns an [[IFP]] element if the IFP file loaded, ''false'' otherwise. | ||
==Example== | ==Example== | ||
animation.lua | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function setanimation() | |||
engineLoadIFP("data/ani.ifp") | |||
setPedAnimation(getLocalPlayer(), "ANIMATIONBLOCK", "animation1") | |||
end | |||
addCommandHandler("animation", setanimation) | |||
</syntaxhighlight> | |||
meta.xml | |||
<syntaxhighlight lang="lua"> | |||
<info author="lukry" version="1.0" type="script" /> | |||
<script src="animation/animation.lua" /> | |||
<file src="animation/data/ani.ifp" /> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 12:24, 10 December 2010
This function loads an animation library (IFP) file into GTA.
- This function does not replace animations yet, you can only use the animations that are inside the IFP with setPedAnimation.
- To use this correctly, you need to use an IFP file with new animation blocks with different names than existing ones.
This is a client side function. Be sure to transfer your IFP file by including it in the meta file.
Syntax
ifp engineLoadIFP ( string ifp_file )
Required Arguments
- ifp_file: The filepath to the IFP file you want to load
Returns
Returns an IFP element if the IFP file loaded, false otherwise.
Example
animation.lua
function setanimation() engineLoadIFP("data/ani.ifp") setPedAnimation(getLocalPlayer(), "ANIMATIONBLOCK", "animation1") end addCommandHandler("animation", setanimation)
meta.xml
<info author="lukry" version="1.0" type="script" /> <script src="animation/animation.lua" /> <file src="animation/data/ani.ifp" />
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory