EngineUnloadIFP: Difference between revisions
Jump to navigation
Jump to search
(Syntax added. Example needed.) |
|||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
animation.lua | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function setanimation() | |||
ifp = engineLoadIFP("data/ani.ifp") | |||
setPedAnimation(getLocalPlayer(), "ANIMATIONBLOCK", "animation1") | |||
end | |||
addCommandHandler("animation", setanimation) | |||
function stopanimation() | |||
engineUnloadIFP(ifp) | |||
end | |||
addCommandHandler("stopanimation", stopanimation) | |||
</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:30, 10 December 2010
This function unloads an animation library loaded by engineLoadIFP.
Syntax
bool engineLoadIFP ( element ifp )
Required Arguments
- ifp: The IFP element loaded by engineLoadIFP to unload.
Returns
Returns true if the IFP file has been unloaded succesfully, false otherwise.
Example
animation.lua
function setanimation() ifp = engineLoadIFP("data/ani.ifp") setPedAnimation(getLocalPlayer(), "ANIMATIONBLOCK", "animation1") end addCommandHandler("animation", setanimation) function stopanimation() engineUnloadIFP(ifp) end addCommandHandler("stopanimation", stopanimation)
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