Basic docs for all of ox_lib

This commit is contained in:
Linden committed 2022-03-01 21:09:18 +11:00
1 parent 2350a5bfc1
commit fd5ccc4964
14 files changed
+206 -64

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# Command
```lua
-- principal: string or false
-- command: string
-- callback: function
-- parameters: table (optional)
-- help: string (optional)
lib.addCommand(principal, command, callback, parameters, help)
lib.addCommand('group.admin', {'additem', 'giveitem'}, function(source, args)
args.item = Items(args.item)
if args.item and args.count > 0 then
Inventory.AddItem(args.target, args.item.name, args.count, args.metatype)
end
end, {'target:number', 'item:string', 'count:number', 'metatype:?string'})
```