# ATTRIBUTE::GET_DEFAULT_ATTRIBUTE_POINTS_NEEDED_FOR_RANK

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

## Signature

```c
int GET_DEFAULT_ATTRIBUTE_POINTS_NEEDED_FOR_RANK(Hash modelHash, int attributeIndex, int rank);
```

## Parameters

- `modelHash` (`Hash`)
- `attributeIndex` (`int`)
- `rank` (`int`)

## Returns

`int`

## Description

attributeIndex: see SET_ATTRIBUTE_BASE_RANK

## Usage

### Lua

```lua
local retval = GetDefaultAttributePointsNeededForRank(modelHash, attributeIndex, rank)

-- always available, by hash
local retval = Citizen.InvokeNative(0x94A7F191DB49A44D, modelHash, attributeIndex, rank, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetDefaultAttributePointsNeededForRank(modelHash, attributeIndex, rank);

// by hash
const retval = Citizen.invokeNative('0x94A7F191DB49A44D', modelHash, attributeIndex, rank, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x94A7F191DB49A44D, modelHash, attributeIndex, rank);
```

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

## Related enums

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

*Sources: alloc8or RDR3 NativeDB.*
