# ATTRIBUTE::SET_ATTRIBUTE_BASE_RANK

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

## Signature

```c
void SET_ATTRIBUTE_BASE_RANK(Ped ped, int attributeIndex, int newValue);
```

## Parameters

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

## Returns

`void`

## Description

attributeIndex:
enum ePedAttribute
{
	PA_HEALTH,
	PA_STAMINA,
	PA_SPECIALABILITY,
	PA_COURAGE,
	PA_AGILITY,
	PA_SPEED,
	PA_ACCELERATION,
	PA_BONDING,
	SA_HUNGER,
	SA_FATIGUED,
	SA_INEBRIATED,
	SA_POISONED,
	SA_BODYHEAT,
	SA_BODYWEIGHT,
	SA_OVERFED,
	SA_SICKNESS,
	SA_DIRTINESS,
	SA_DIRTINESSHAT,
	MTR_STRENGTH,
	MTR_GRIT,
	MTR_INSTINCT,
	PA_UNRULINESS,
	SA_DIRTINESSSKIN
};

## Usage

### Lua

```lua
SetAttributeBaseRank(ped, attributeIndex, newValue)

-- always available, by hash
Citizen.InvokeNative(0x5DA12E025D47D4E5, ped, attributeIndex, newValue)
```

### JavaScript

```js
SetAttributeBaseRank(ped, attributeIndex, newValue);

// by hash
Citizen.invokeNative('0x5DA12E025D47D4E5', ped, attributeIndex, newValue);
```

### C#

```csharp
Function.Call((Hash)0x5DA12E025D47D4E5, ped, attributeIndex, newValue);
```

## Related enums

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

## See also

- [ATTRIBUTE::GET_ATTRIBUTE_BASE_RANK](https://natives.borderlinerp.com/natives/ATTRIBUTE/GET_ATTRIBUTE_BASE_RANK.md)

*Sources: alloc8or RDR3 NativeDB.*
