The Lab
STATS native

STAT_ID_IS_VALID

returns BOOL1 parambuild 1207

Returns true if statId refers to a valid stat.

Check it before reading or writing a stat built at runtime.

Signature

C
BOOL STAT_ID_IS_VALID(Any* statId); // 0xC48FE1971C9743FF b1207

Parameters

#NameType
1statIdAny* (out pointer)

Facts

Facts about STAT_ID_IS_VALID
Name
STAT_ID_IS_VALID
Hash
0xC48FE1971C9743FF
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(0xC48FE1971C9743FF, -- STAT_ID_IS_VALID
  Citizen.PointerValueInt(), -- Any* statId
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, statId] = Citizen.invokeNative("0xC48FE1971C9743FF", // STAT_ID_IS_VALID
  Citizen.pointerValueInt(), // Any* statId
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var statIdArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xC48FE1971C9743FF, // STAT_ID_IS_VALID
  statIdArg // Any* statId
);
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.