mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
WIP ox_lib documentation
This commit is contained in:
1 parent
f9aa5347e3
commit
86fa21d64a
8 files changed
+75
-2
No files matched your search
@@ -0,0 +1,17 @@
|
||||
---
|
||||
id: register
|
||||
title: lib.callback.register
|
||||
---
|
||||
|
||||
```lua
|
||||
-- name: string
|
||||
-- cb: function
|
||||
lib.callback.register(name, cb)
|
||||
```
|
||||
|
||||
```lua
|
||||
lib.callback.register('ox_inventory:getItemCount', function(source, item, metadata, target)
|
||||
local inventory = target and Inventory(target) or Inventory(source)
|
||||
return (inventory and Inventory.GetItem(inventory, item, metadata, true)) or 0
|
||||
end)
|
||||
```
|
||||
Reference in new issue
Block a user