RedM Natives

GET_DEFAULT_ATTRIBUTE_RANK

Hash0x958DD43D41F89A47
Runtime nameGetDefaultAttributeRank
NamespaceATTRIBUTE
SideClient
NameOfficial
Docs
Since build1207

Signature

int GET_DEFAULT_ATTRIBUTE_RANK(Hash modelHash, int attributeIndex);

Parameters

NameTypeDescription
modelHashHash—
attributeIndexint—

Returns int

Description

attributeIndex: see SET_ATTRIBUTE_BASE_RANK

Usage

Lua
local retval = GetDefaultAttributeRank(modelHash, attributeIndex)

-- always works, by hash
local retval = Citizen.InvokeNative(0x958DD43D41F89A47, modelHash, attributeIndex, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetDefaultAttributeRank(modelHash, attributeIndex);

// by hash
const retval = Citizen.invokeNative('0x958DD43D41F89A47', modelHash, attributeIndex, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x958DD43D41F89A47, modelHash, attributeIndex);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Enums and flags

Sources

alloc8or RDR3 NativeDB

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