RedM Natives

DATAARRAY_GET_DICT

Hash0xA010655985853485
Runtime nameDataarrayGetDict
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8B5FADCC4E3A145F

Signature

Any* DATAARRAY_GET_DICT(Any* arrayData, int arrayIndex);

Parameters

NameTypeDescription
arrayDataAny*—
arrayIndexint—

Returns Any*

Usage

Lua
local retval, arrayData = DataarrayGetDict(arrayIndex)

-- always works, by hash
local retval, arrayData = Citizen.InvokeNative(0xA010655985853485, Citizen.PointerValueInt(), arrayIndex, Citizen.ResultAsLong())
JavaScript and C#
JavaScript
const [retval, arrayData] = DataarrayGetDict(arrayIndex);

// by hash
const [retval, arrayData] = Citizen.invokeNative('0xA010655985853485', Citizen.pointerValueInt(), arrayIndex, Citizen.returnResultAnyway(), Citizen.resultAsLong());
C#
var arrayData = new OutputArgument();
long retval = Function.Call<long>((Hash)0xA010655985853485, arrayData, arrayIndex);
// arrayData.GetResult<int>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.