st.requestModel / st.requestAnimDict — Asset Loading (Client)
All request functions yield the current thread until the asset is loaded, with a configurable timeout (default 10,000 ms).
lua
-- Load a model (string or hash)
local modelHash = st.requestModel('prop_barrel_01a')
local modelHash = st.requestModel(GetHashKey('prop_barrel_01a'), 5000)
-- Load an animation dictionary
local dict = st.requestAnimDict('mini@repair')
-- Load an animation set
st.requestAnimSet('move_m@drunk@verydrunk')
-- Load an audio bank
st.requestAudioBank('DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS')
-- Load a named ptfx asset
st.requestNamedPtfxAsset('core')
-- Load a scaleform movie
local handle = st.requestScaleformMovie('MIDSIZED_MESSAGE')
-- Load a streamed texture dictionary
st.requestStreamedTextureDict('commonmenu')
-- Load a weapon asset
st.requestWeaponAsset(`WEAPON_PISTOL`)