mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
External client functions
This commit is contained in:
1 parent
5e27cfb5be
commit
2a931c887a
13 files changed
+218
-3
No files matched your search
@@ -0,0 +1,30 @@
|
||||
Displays the notification used accross the inventory.
|
||||
|
||||
The notifications are built using the [react-hot-teast](https://github.com/timolins/react-hot-toast) library.
|
||||
|
||||
```lua
|
||||
-- data: table
|
||||
exports.ox_inventory:notify(data)
|
||||
```
|
||||
|
||||
Values for the `data` table:
|
||||
```lua
|
||||
-- text: string
|
||||
-- type: string (optional)
|
||||
-- 'success'
|
||||
-- 'info' - default
|
||||
-- 'error'
|
||||
-- position: string (optional)
|
||||
-- 'top-left'
|
||||
-- 'top-center' - default
|
||||
-- 'top-right'
|
||||
-- 'bottom-left'
|
||||
-- 'bottom-center'
|
||||
-- 'bottom-right
|
||||
-- duration: number (optional - default is 4000 ms)
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```lua
|
||||
exports.ox_inventory:notify({type = 'Success', text = 'Making pancakes', duration = 2500})
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
Enables the weapon wheel, but disables the use of inventory items.
|
||||
|
||||
Mostly used for weaponised vehicles, though could be called for "minigames"
|
||||
|
||||
```lua
|
||||
-- state: boolean
|
||||
local exports.ox_inventory:weaponWheel(state)
|
||||
```
|
||||
Reference in new issue
Block a user