GET_RESOURCE_COMMANDS
Returns all commands registered by the specified resource.
Signature
object GET_RESOURCE_COMMANDS(char* resource);Parameters
| Name | Type | Description |
|---|---|---|
resource | char* | — |
Returns object — An object containing registered commands.
Description
Returns all commands registered by the specified resource. The data returned adheres to the following layout:
[
{
"name": "cmdlist",
"resource": "example_resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "example_resource2",
"arity" = -1,
}
]Usage
local retval = GetResourceCommands(resource)
-- always works, by hash
local retval = Citizen.InvokeNative(0x97628584, resource, Citizen.ResultAsObject2(msgpack.unpack))JavaScript and C#
const retval = GetResourceCommands(resource);
// by hash
const retval = Citizen.invokeNative('0x97628584', resource, Citizen.returnResultAnyway(), Citizen.resultAsObject2());Function.Call((Hash)0x97628584, resource);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.