RedM Natives

STAT_ID_IS_VALID

alignas(8) Hash BaseId; alignas(8) Hash PermutationId;

Hash0xC48FE1971C9743FF
Runtime nameStatIdIsValid
NamespaceSTATS
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL STAT_ID_IS_VALID(Any* statId);

Parameters

NameTypeDescription
statIdAny*—

Returns BOOL

Description

struct StatId
{
	alignas(8) Hash BaseId;
	alignas(8) Hash PermutationId;
}

Usage

Lua
local retval, statId = StatIdIsValid(statId)

-- always works, by hash
local retval, statId = Citizen.InvokeNative(0xC48FE1971C9743FF, Citizen.PointerValueIntInitialized(statId), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, statId] = StatIdIsValid(statId);

// by hash
const [retval, statId] = Citizen.invokeNative('0xC48FE1971C9743FF', Citizen.pointerValueIntInitialized(statId), Citizen.returnResultAnyway());
C#
var statId = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xC48FE1971C9743FF, statId);
// statId.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • 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.