mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 22:16:03 +01:00
- seperated the 2000+ lines in ReadMe.md into seperate files. - useful if things expand - better readability for users - more organised layout
2.3 KiB
2.3 KiB
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:
loadModel('prop_chair_01a')
-
unloadModel(model)
- Unloads a model from memory.
- Example:
unloadModel('prop_chair_01a')
-
loadAnimDict(animDict)
- Loads an animation dictionary into memory.
- Example:
loadAnimDict('amb@world_human_hang_out_street@male_c@base')
-
unloadAnimDict(animDict)
- Removes an animation dictionary from memory.
- Example:
unloadAnimDict('amb@world_human_hang_out_street@male_c@base')
-
loadPtfxDict(ptFxName)
- Loads a particle effect (ptfx) dictionary.
- Example:
loadPtfxDict('core')
-
unloadPtfxDict(dict)
- Unloads a particle effect dictionary from memory.
- Example:
unloadPtfxDict('core')
-
loadTextureDict(dict)
- Loads a streamed texture dictionary.
- Example:
loadTextureDict('commonmenu')
-
loadScriptBank(bank)
- Loads a script audio bank.
- Returns true on success.
- Example:
local success = loadScriptBank('DLC_HEISTS_GENERAL_FRONTEND_SOUNDS')
-
loadAmbientBank(bank)
- Loads an ambient audio bank.
- Returns true on success.
- Example:
local success = loadAmbientBank('AMB_REVERB_GENERIC')
-
playAnim(animDict, animName, duration?, flag?, ped?, speed?)
- Plays an animation on a ped.
- Loads the dictionary if not already loaded.
- Example:
playAnim('amb@world_human_hang_out_street@male_c@base', 'base', 5000, 1, PlayerPedId(), 1.0)
-
stopAnim(animDict, animName, ped?)
- Stops an animation and unloads the dictionary.
- Example:
stopAnim('amb@world_human_hang_out_street@male_c@base', 'base', PlayerPedId())
-
playGameSound(audioBank, soundSet, soundRef, coords, synced, range?)
- Plays a game sound from a coordinate or entity.
- Example:
playGameSound('DLC_HEIST_HACKING_SNAKE_SOUNDS', 'Beep', vector3(0, 0, 0), false, 15.0)