Loader Functions
loaders.lua
This module provides loading utilities for common asset types such as models, animations, texture dictionaries, and audio banks. It also provides animation and sound helpers.
loadModel(model)
Loads a model into memory if valid and not already loaded.
Example:
unloadModel(model)
Unloads a model from memory.
Example:
loadAnimDict(animDict)
Loads an animation dictionary into memory.
Example:
unloadAnimDict(animDict)
Removes an animation dictionary from memory.
Example:
loadPtfxDict(ptFxName)
Loads a particle effect (ptfx) dictionary.
Example:
unloadPtfxDict(dict)
Unloads a particle effect dictionary from memory.
Example:
loadTextureDict(dict)
Loads a streamed texture dictionary.
Example:
loadScriptBank(bank)
Loads a script audio bank.
Returns true
on success.
Example:
loadAmbientBank(bank)
Loads an ambient audio bank.
Returns true on success.
Example:
playAnim(animDict, animName, duration?, flag?, ped?, speed?)
Plays an animation on a ped.
Loads the dictionary if not already loaded.
Example:
stopAnim(animDict, animName, ped?)
Stops an animation and unloads the dictionary.
Example:
playGameSound(audioBank, soundSet, soundRef, coords, synced, range?)
Plays a game sound from a coordinate or entity.
Example:
Last updated