RedM Natives

_GET_SHOP_ITEM_WEARABLE_STATE_BY_INDEX

Gets an available wearable state by index for a shop item / component - it does not retreive what the current state is.

Hash0x6243635AF2F1B826
Runtime nameGetShopItemWearableStateByIndex
NamespacePED
SideClient
NameCommunity guess
Docs
Since build1207

Signature

Hash _GET_SHOP_ITEM_WEARABLE_STATE_BY_INDEX(Hash componentHash, int wearableStateIndex, BOOL isMpFemale, BOOL p3);

Parameters

NameTypeDescription
componentHashHash—
wearableStateIndexint—
isMpFemaleBOOL—
p3BOOL—

Returns Hash

Description

Gets an available wearable state by index for a shop item / component - it does not retreive what the current state is. p3 seems to be true in scripts.

Use 0xFFCC2DB2D9953401 (_GET_SHOP_ITEM_NUM_WEARABLE_STATES) to get the number of available wearable states

Usage

Lua
local retval = GetShopItemWearableStateByIndex(componentHash, wearableStateIndex, isMpFemale, p3)

-- always works, by hash
local retval = Citizen.InvokeNative(0x6243635AF2F1B826, componentHash, wearableStateIndex, isMpFemale, p3, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetShopItemWearableStateByIndex(componentHash, wearableStateIndex, isMpFemale, p3);

// by hash
const retval = Citizen.invokeNative('0x6243635AF2F1B826', componentHash, wearableStateIndex, isMpFemale, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x6243635AF2F1B826, componentHash, wearableStateIndex, isMpFemale, p3);
  • 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`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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