The Lab
STATS native

STAT_ID_SET_BOOL

returns BOOL3 paramsbuild 1207

Sets the boolean stat referenced by statId to value. Returns true on success; p2 is commonly a save flag.

Signature

C
BOOL STAT_ID_SET_BOOL(Any* statId, BOOL value, BOOL p2); // 0x3B5107353267D7A1 b1207

Parameters

#NameType
1statIdAny* (out pointer)
2valueBOOL
3p2BOOL

Facts

Facts about STAT_ID_SET_BOOL
Name
STAT_ID_SET_BOOL
Hash
0x3B5107353267D7A1
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 = Citizen.InvokeNative(0x3B5107353267D7A1, -- STAT_ID_SET_BOOL
  Citizen.PointerValueInt(), -- Any* statId
  false, -- BOOL value
  false, -- BOOL p2
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, statId] = Citizen.invokeNative("0x3B5107353267D7A1", // STAT_ID_SET_BOOL
  Citizen.pointerValueInt(), // Any* statId
  false, // BOOL value
  false, // BOOL p2
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var statIdArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x3B5107353267D7A1, // STAT_ID_SET_BOOL
  statIdArg, // Any* statId
  false, // BOOL value
  false // BOOL p2
);
int statId = statIdArg.GetResult<int>();
All STATS natives

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