The Lab
DATAFILE native

DATAARRAY_GET_VECTOR

returns Vector32 paramsbuild 1207

Returns the vector stored at arrayIndex in the data array arrayData.

Signature

C
Vector3 DATAARRAY_GET_VECTOR(Any* arrayData, int arrayIndex); // 0x850DA2750DA14E9A b1207

Parameters

#NameType
1arrayDataAny* (out pointer)
2arrayIndexint

Facts

Facts about DATAARRAY_GET_VECTOR
Name
DATAARRAY_GET_VECTOR
Hash
0x850DA2750DA14E9A
Namespace
Returns
Vector3
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local coords, arrayData = Citizen.InvokeNative(0x850DA2750DA14E9A, -- DATAARRAY_GET_VECTOR
  Citizen.PointerValueInt(), -- Any* arrayData
  0, -- int arrayIndex
  Citizen.ResultAsVector()
)
print(coords.x, coords.y, coords.z)
JavaScript
const [coords, arrayData] = Citizen.invokeNative("0x850DA2750DA14E9A", // DATAARRAY_GET_VECTOR
  Citizen.pointerValueInt(), // Any* arrayData
  0, // int arrayIndex
  Citizen.resultAsVector()
);
const [x, y, z] = coords
C#
var arrayDataArg = new OutputArgument();
Vector3 coords = Function.Call<Vector3>((Hash)0x850DA2750DA14E9A, // DATAARRAY_GET_VECTOR
  arrayDataArg, // Any* arrayData
  0 // int arrayIndex
);
int arrayData = arrayDataArg.GetResult<int>();
All DATAFILE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.