A collection of wrapper functions to handle asset requests in GTA. It simplifies the process of loading models, animations, interiors, textures, and more, ensuring resources are available before use.
Functions
request_model
Load and wait for a specified model to be available.
--- Specify modellocal model_hash =GetHashKey('a_m_m_business_01')--- Utils objectutils.requests.model(model_hash)--- Direct exportexports.boii_utils:request_model(model_hash)
request_interior
Request an interior and wait until its ready.
--- Get interior idlocal interior_id =GetInteriorAtCoords(440.84, -983.14, 30.69)--- Utils objectutils.requests.interior(interior_id)--- Direct exportexports.boii_utils:request_interior(interior_id)
Request collision at a location and wait until its loaded.
--- Define locationlocal x, y, z =440.84, -983.14, 30.69--- Utils objectutils.requests.collision(x, y, z)--- Direct exportexports.boii_utils:request_collision(x, y, z)
request_anim
Request animation dictionary and wait until its loaded.
--- Specify anim dictlocal anim_dict ='amb@world_human_smoking@male@male_a@base'--- Utils objectutils.requests.anim(anim_dict)--- Direct exportexports.boii_utils:request_anim(anim_dict)
request_anim_set
Request animation set and wait until its loaded.
--- Specify anim setlocal anim_set_name ='move_m@brave'--- Utils objectutils.requests.anim_set(anim_set_name)--- Direct exportexports.boii_utils:request_anim_set(anim_set_name)
request_clip_set
Request animation clip set and wait until its loaded.
--- Specify clip setlocal anim_clip_set ='move_m@confident'--- Utils objectutils.requests.clip_set(clip_set)--- Direct exportexports.boii_utils:request_clip_set(clip_set)
request_audio_bank
Requests a script audio bank and waits until loaded.
--- Specify audio banklocal audio_bank ='DLC_HEIST_HACKING_SNAKE'--- Utils objectutils.requests.audio_bank(audio_bank)--- Direct exportexports.boii_utils:request_audio_bank(audio_bank)
request_scaleform_movie
Requests a scaleform movie and waits until loaded.
--- Specify scaleform movielocal scaleform ='instructional_buttons'--- Utils objectutils.requests.scaleform_movie(scaleform)--- Direct exportexports.boii_utils:request_scaleform_movie(scaleform)
request_cutscene
Request a cutscene and play once loaded.
--- Specify cutscenelocal cutscene_name ='mp_intro'--- Utils objectutils.requests.cutscene(cutscene_name)--- Direct exportexports.boii_utils:request_cutscene(cutscene_name)
request_ipl
Request an IPL and activate it.
--- Specify IPL namelocal ipl_name ='hei_dlc_heist_police_station'--- utils objectutils.requests.ipl(ipl_name)--- Direct exportexports.boii_utils:request_ipl(ipl_name)