Check if assets exist, such as models, and loads them into memory.
Throws errors for invalid assets and returns true if the asset is loaded.
lib.requestAnimDict
lib.requestAnimDict(dict, timeout)
- dict:
string
- timeout:
number
- Default:
100
- Default:
lib.requestAnimSet
lib.requestAnimSet(set, timeout)
- set:
string
- timeout:
number
- Default:
100
- Default:
lib.requestModel
lib.requestModel(model, timeout)
- model:
string
- timeout:
number
- Default:
100
- Default:
lib.requestStreamedTextureDict
lib.requestStreamedTextureDict(dict, timeout)
- dict:
string
- timeout:
number
- Default:
100
- Default:
lib.requestNamedPtfxAsset
lib.requestNamedPtfxAsset(fxName, timeout)
- fxName:
string
- timeout:
number
- Default:
100
- Default:
lib.requestScaleformMovie
lib.requestScaleformMovie(scaleformMovie, timeout)
- dict:
string
- timeout:
number
- Default:
100
- Default:
lib.requestWeaponAsset
lib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)
- weaponType:
string | number
- timeout:
number?
- Number of ticks to wait for the asset to load. Default is
500
- Number of ticks to wait for the asset to load. Default is
- weaponResourceFlags:
WeaponResourceFlags?
- Default is
31
- Default is
- extraWeaponComponentFlags:
ExtraWeaponComponentFlags?
- Default is
0
- Default is
Return:
string | number?
weaponType
WeaponResourceFlags
1 WRF_REQUEST_BASE_ANIMS
2 WRF_REQUEST_COVER_ANIMS
4 WRF_REQUEST_MELEE_ANIMS
8 WRF_REQUEST_MOTION_ANIMS
16 WRF_REQUEST_STEALTH_ANIMS
32 WRF_REQUEST_ALL_MOVEMENT_VARIATION_ANIMS
31 WRF_REQUEST_ALL_ANIMS
ExtraWeaponComponentFlags
0 WEAPON_COMPONENT_NONE
1 WEAPON_COMPONENT_FLASH
2 WEAPON_COMPONENT_SCOPE
4 WEAPON_COMPONENT_SUPP
8 WEAPON_COMPONENT_SCLIP2
16 WEAPON_COMPONENT_GRIP