Files
JagandLuke 1d2c490b26 refactor: Add h1 headers to all pages missing it (#137)
* refactor: Add h1 headers to all pages missing it

* refactor: missed example h3

* change hooks example heading to bold text

---------

Co-authored-by: Luke <[email protected]>
2023-07-08 11:08:43 +02:00

188 lines
3.5 KiB
Plaintext

import { Tabs, Tab } from 'nextra-theme-docs';
# Client
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
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestAnimDict(dict, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestAnimDict(dict, timeout)
```
</Tab>
</Tabs>
- dict: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestAnimSet
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestAnimSet(set, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestAnimSet(set, timeout)
```
</Tab>
</Tabs>
- set: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestModel
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestModel(model, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestModel(model, timeout)
```
</Tab>
</Tabs>
- model: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestStreamedTextureDict
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestStreamedTextureDict(dict, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestStreamedTextureDict(dict, timeout)
```
</Tab>
</Tabs>
- dict: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestNamedPtfxAsset
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestNamedPtfxAsset(ptFxName, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestNamedPtfxAsset(ptFxName, timeout)
```
</Tab>
</Tabs>
- ptFxName: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestScaleformMovie
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestScaleformMovie(scaleformName, timeout)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestScaleformMovie(scaleformName, timeout)
```
</Tab>
</Tabs>
- scaleformName: `string`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
## lib.requestWeaponAsset
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
lib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/client'
lib.requestWeaponAsset(weaponType, timeout, weaponResourceFlags, extraWeaponComponentFlags)
```
</Tab>
</Tabs>
- weaponType: `string | number`
- timeout?: `number`
- Number of ticks to wait for the asset to load.
- Default: `500`
- weaponResourceFlags?: `WeaponResourceFlags`
- Default: `31`
- extraWeaponComponentFlags?: `ExtraWeaponComponentFlags`
- Default: `0`
### 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
```