Restructure

This commit is contained in:
Linden committed 2022-02-28 15:55:21 +11:00
1 parent fa927640d4
commit f9aa5347e3
8 files changed
+82 -25

No files matched your search

Whitespace-only changes.
Whitespace-only changes.
+17
View File
@@ -0,0 +1,17 @@
```lua
-- principal: string or false
-- command: string
-- callback: function
-- parameters: table (optional)
-- help: string (optional)
lib.commands(principal, command, callback, parameters, help)
```
```lua
lib.commands('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'})
```