mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
Basic docs for all of ox_lib
This commit is contained in:
1 parent
2350a5bfc1
commit
fd5ccc4964
14 files changed
+206
-64
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# Callbacks
|
||||
|
||||
### lib.callback.register
|
||||
```lua
|
||||
-- name: string
|
||||
-- cb: function
|
||||
lib.callback.register(name, cb)
|
||||
|
||||
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