WIP ox_lib documentation

This commit is contained in:
Linden committed 2022-02-28 19:09:34 +11:00
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)
```