RegisterCommand for esx
This commit is contained in:
1 parent
7e294b55fa
commit
b1a23c79d4
1 file changed
+10
@@ -200,4 +200,14 @@ end
|
||||
-- Registers a usable item with a callback function.
|
||||
Framework.RegisterUsableItem = function(item, cb)
|
||||
ESX.RegisterUsableItem(item, cb)
|
||||
end
|
||||
|
||||
Framework.Commands = {}
|
||||
Framework.Commands.Add = function(name, help, arguments, argsrequired, callback, permission, ...)
|
||||
ESX.RegisterCommand(name, permission, function(xPlayer, args, showError)
|
||||
callback(xPlayer, args)
|
||||
end, false, {
|
||||
help = help,
|
||||
arguments = arguments
|
||||
})
|
||||
end
|
||||
Reference in new issue
Block a user