mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
545 B
545 B
lib.addCommand(principal, command, callback, parameters, help)
- principal:
stringorstring[]orfalse - command:
string - callback:
function - parameters?:
table(array) - help?:
string
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'})