EngineUnloadIFP

From Multi Theft Auto: Wiki
Revision as of 21:04, 18 June 2018 by Saml1er (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Dialog-warning.png Function has been disabled.

Reason/Note: Function disabled. It doesn't exist anymore, use destroyElement to unload IFP.


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

Click to collapse [-]
animation.lua
local localPlayer = getLocalPlayer()
local ifp = nil

function setanimation()
  ifp = engineLoadIFP("data/ani.ifp")
  if ifp then
    setPedAnimation(localPlayer, "ANIMATIONBLOCK", "animation1")
  end
end

addCommandHandler("animation", setanimation)

function stopanimation()
  if ifp then
    engineUnloadIFP(ifp)
    setPedAnimation(localPlayer)
  end
end

addCommandHandler("stopanimation", stopanimation)
Click to collapse [-]
meta.xml
<meta>
  <info author="lukry" version="1.0" type="script" />
  <script src="animation.lua" type="client" />
  <file src="data/ani.ifp" />
</meta>

See Also