RegisterCommand for esx

This commit is contained in:
MrNewb committed 2025-01-12 13:01:16 -05:00
1 parent 7e294b55fa
commit b1a23c79d4
1 file changed
+10
+10
View File
@@ -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