# PED::_GET_SHOP_ITEM_HAT_COMPONENT

- **Hash:** `0x7E02E4218D916B94`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `GetShopItemHatComponent`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/_GET_SHOP_ITEM_HAT_COMPONENT

## Signature

```c
Any _GET_SHOP_ITEM_HAT_COMPONENT(Ped ped, int metapedType, BOOL p2);
```

## Parameters

- `ped` (`Ped`)
- `metapedType` (`int`)
- `p2` (`BOOL`)

## Returns

`Any`

## Usage

### Lua

```lua
local retval = GetShopItemHatComponent(ped, metapedType, p2)

-- always available, by hash
local retval = Citizen.InvokeNative(0x7E02E4218D916B94, ped, metapedType, p2, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetShopItemHatComponent(ped, metapedType, p2);

// by hash
const retval = Citizen.invokeNative('0x7E02E4218D916B94', ped, metapedType, p2, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x7E02E4218D916B94, ped, metapedType, p2);
```

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

## Related enums

- [eMetaPedType](https://natives.borderlinerp.com/enums/eMetaPedType.md) — 4 values

*Sources: alloc8or RDR3 NativeDB.*
