RedM Natives

DATADICT_GET_VECTOR

Hash0xE459C941431E0FFA
Runtime nameDatadictGetVector
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x46CD3CB66E0825CC

Signature

Vector3 DATADICT_GET_VECTOR(Any* objectData, const char* key);

Parameters

NameTypeDescription
objectDataAny*—
keyconst char*—

Returns Vector3

Usage

Lua
local retval, objectData = DatadictGetVector(key)

-- always works, by hash
local retval, objectData = Citizen.InvokeNative(0xE459C941431E0FFA, Citizen.PointerValueInt(), key, Citizen.ResultAsVector())
JavaScript and C#
JavaScript
const [retval, objectData] = DatadictGetVector(key);

// by hash
const [retval, objectData] = Citizen.invokeNative('0xE459C941431E0FFA', Citizen.pointerValueInt(), key, Citizen.returnResultAnyway(), Citizen.resultAsVector());
C#
var objectData = new OutputArgument();
Vector3 retval = Function.Call<Vector3>((Hash)0xE459C941431E0FFA, objectData, key);
// objectData.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.