RedM Natives

DATADICT_SET_INT

Hash0x26FDF5E99AA2F3E9
Runtime nameDatadictSetInt
NamespaceDATAFILE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xE7E035450A7948D5

Signature

void DATADICT_SET_INT(Any* objectData, const char* key, int value);

Parameters

NameTypeDescription
objectDataAny*—
keyconst char*—
valueint—

Returns void

Usage

Lua
local objectData = DatadictSetInt(key, value)

-- always works, by hash
local objectData = Citizen.InvokeNative(0x26FDF5E99AA2F3E9, Citizen.PointerValueInt(), key, value)
JavaScript and C#
JavaScript
const objectData = DatadictSetInt(key, value);

// by hash
const objectData = Citizen.invokeNative('0x26FDF5E99AA2F3E9', Citizen.pointerValueInt(), key, value);
C#
var objectData = new OutputArgument();
Function.Call((Hash)0x26FDF5E99AA2F3E9, objectData, key, value);
// 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.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.