mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
* oxmysql and some lib interface fixes - Various fixes throughout oxmysql - started ox_lib audit * chore: More clean up - Reword some confusing descriptions - Add some descriptions - Type fixes - Spelling and grammar fixes - Swapping in `-` where `*` used to be for bullet point consistency ox_lib - Interface, ACL through GetClosestVehicle audited * chore: Finishing up ox_lib
214 lines
3.3 KiB
Plaintext
214 lines
3.3 KiB
Plaintext
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.
|
|
|
|
import { Tabs, Tab } from 'nextra-theme-docs';
|
|
|
|
### 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
|
|
```
|