# ATTRIBUTE::GET_ATTRIBUTE_RANK

- **Hash:** `0xA4C8E23E29040DE0`
- **Namespace:** ATTRIBUTE
- **Runtime name (Lua/JS):** `GetAttributeRank`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ATTRIBUTE/GET_ATTRIBUTE_RANK

## Signature

```c
int GET_ATTRIBUTE_RANK(Ped ped, int attributeIndex);
```

## Parameters

- `ped` (`Ped`)
- `attributeIndex` (`int`)

## Returns

`int`

## Description

attributeIndex: see SET_ATTRIBUTE_BASE_RANK

## Usage

### Lua

```lua
local retval = GetAttributeRank(ped, attributeIndex)

-- always available, by hash
local retval = Citizen.InvokeNative(0xA4C8E23E29040DE0, ped, attributeIndex, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetAttributeRank(ped, attributeIndex);

// by hash
const retval = Citizen.invokeNative('0xA4C8E23E29040DE0', ped, attributeIndex, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xA4C8E23E29040DE0, ped, attributeIndex);
```

## Related enums

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

*Sources: alloc8or RDR3 NativeDB.*
