RedM Natives

DATAARRAY_GET_INT

Hash0x96DEA500B6EBBE53
Runtime nameDataarrayGetInt
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x3E5AE19425CD74BE

Signature

int DATAARRAY_GET_INT(Any* arrayData, int arrayIndex);

Parameters

NameTypeDescription
arrayDataAny*—
arrayIndexint—

Returns int

Usage

Lua
local retval, arrayData = DataarrayGetInt(arrayIndex)

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

// by hash
const [retval, arrayData] = Citizen.invokeNative('0x96DEA500B6EBBE53', Citizen.pointerValueInt(), arrayIndex, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var arrayData = new OutputArgument();
int retval = Function.Call<int>((Hash)0x96DEA500B6EBBE53, 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.