# PED::_GET_SHOP_ITEM_WEARABLE_STATE_BY_INDEX

- **Hash:** `0x6243635AF2F1B826`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `GetShopItemWearableStateByIndex`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/_GET_SHOP_ITEM_WEARABLE_STATE_BY_INDEX

## Signature

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

## Parameters

- `componentHash` (`Hash`)
- `wearableStateIndex` (`int`)
- `isMpFemale` (`BOOL`)
- `p3` (`BOOL`)

## 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

```lua
local retval = GetShopItemWearableStateByIndex(componentHash, wearableStateIndex, isMpFemale, p3)

-- always available, by hash
local retval = Citizen.InvokeNative(0x6243635AF2F1B826, componentHash, wearableStateIndex, isMpFemale, p3, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetShopItemWearableStateByIndex(componentHash, wearableStateIndex, isMpFemale, p3);

// by hash
const retval = Citizen.invokeNative('0x6243635AF2F1B826', componentHash, wearableStateIndex, isMpFemale, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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.*
