GET_REGISTERED_COMMANDS
Returns all commands that are registered in the command system.
Signature
object GET_REGISTERED_COMMANDS();Returns object — An object containing registered commands.
Description
Returns all commands that are registered in the command system. The data returned adheres to the following layout:
[
{
"name": "cmdlist",
"resource": "resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "resource_2",
"arity" = -1,
}
]Usage
local retval = GetRegisteredCommands()
-- always works, by hash
local retval = Citizen.InvokeNative(0xd4bef069, Citizen.ResultAsObject2(msgpack.unpack))JavaScript and C#
const retval = GetRegisteredCommands();
// by hash
const retval = Citizen.invokeNative('0xd4bef069', Citizen.returnResultAnyway(), Citizen.resultAsObject2());Function.Call((Hash)0xd4bef069);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.