EngineUnloadIFP: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 40: Line 40:
==See Also==
==See Also==
{{Engine_functions}}
{{Engine_functions}}
[[Category:Needs_Example]]

Revision as of 12:30, 10 December 2010

This function unloads an animation library loaded by engineLoadIFP.

Syntax

bool engineLoadIFP ( element ifp ) 

Required Arguments

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