RedM Natives

DATADICT_GET_DICT

Hash0x4D7A30130F46AC9C
Runtime nameDatadictGetDict
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xB6B9DDC412FCEEE2

Signature

Any* DATADICT_GET_DICT(Any* objectData, const char* key);

Parameters

NameTypeDescription
objectDataAny*—
keyconst char*—

Returns Any*

Usage

Lua
local retval, objectData = DatadictGetDict(key)

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

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