mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 14:06:02 +01:00
better documentation layout
- seperated the 2000+ lines in ReadMe.md into seperate files. - useful if things expand - better readability for users - more organised layout
This commit is contained in:
37
documentation/main_functions/wrapperfunctions.md
Normal file
37
documentation/main_functions/wrapperfunctions.md
Normal file
@@ -0,0 +1,37 @@
|
||||
### wrapperfunctions.lua
|
||||
|
||||
Provides wrapper compatibility functions for command and inventory stash systems across different frameworks (OX, QB, ESX, QS, etc).
|
||||
|
||||
- **registerCommand(command, options)**
|
||||
|
||||
⚠️ Server Side Only
|
||||
- Registers a command using the appropriate framework's API.
|
||||
- **Parameters:**
|
||||
- `command`: Command name (string)
|
||||
- `options`: Table including help, params, callback, autocomplete, restrictedGroup
|
||||
- **Example:**
|
||||
```lua
|
||||
registerCommand("greet", {
|
||||
"Greets the player",
|
||||
{ name = "name", help = "Name of the player to greet" },
|
||||
function(source, args) print("Hello, "..args[1].."!") end,
|
||||
nil,
|
||||
"admin"
|
||||
})
|
||||
```
|
||||
|
||||
- **registerStash(name, label, slots?, weight?, owner?, coords?)**
|
||||
|
||||
⚠️ Server Side Only
|
||||
- Registers a stash using OX, QS, or Origen inventory systems.
|
||||
- **Example:**
|
||||
```lua
|
||||
registerStash(
|
||||
"playerStash",
|
||||
"Player Stash",
|
||||
100,
|
||||
8000000,
|
||||
"player123",
|
||||
{ x = 100.0, y = 200.0, z = 30.0 }
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user