The Lab
STATS native

STAT_ID_GET_INT

returns BOOL2 paramsbuild 1207

Reads the integer stat referenced by statId into p1. Returns true if the read succeeded.

Signature

C
BOOL STAT_ID_GET_INT(Any* statId, int* p1); // 0x767FBC2AC802EF3E b1207

Parameters

#NameType
1statIdAny* (out pointer)
2p1int* (out pointer)

Facts

Facts about STAT_ID_GET_INT
Name
STAT_ID_GET_INT
Hash
0x767FBC2AC802EF3E
Namespace
Returns
BOOL
Game build
1207

Examples

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

Lua
local result, statId, p1 = Citizen.InvokeNative(0x767FBC2AC802EF3E, -- STAT_ID_GET_INT
  Citizen.PointerValueInt(), -- Any* statId
  Citizen.PointerValueInt(), -- int* p1
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, statId, p1] = Citizen.invokeNative("0x767FBC2AC802EF3E", // STAT_ID_GET_INT
  Citizen.pointerValueInt(), // Any* statId
  Citizen.pointerValueInt(), // int* p1
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var statIdArg = new OutputArgument();
var p1Arg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x767FBC2AC802EF3E, // STAT_ID_GET_INT
  statIdArg, // Any* statId
  p1Arg // int* p1
);
int statId = statIdArg.GetResult<int>();
int p1 = p1Arg.GetResult<int>();
All STATS natives

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