RedM Natives

DATADICT_GET_STRING

Hash0xE37B38C0B4E95DFA
Runtime nameDatadictGetString
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x3D2FD9E763B24472

Signature

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

Parameters

NameTypeDescription
objectDataAny*—
keyconst char*—

Returns const char*

Usage

Lua
local retval, objectData = DatadictGetString(key)

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

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