# CFX::GET_PLAYER_WANTED_LEVEL

- **Hash:** `0xBDCDD163`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetPlayerWantedLevel`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_WANTED_LEVEL

## Signature

```c
int GET_PLAYER_WANTED_LEVEL(char* playerSrc);
```

## Parameters

- `playerSrc` (`char*`) — The target player

## Returns

`int` — The wanted level

## Description

*Source: Cfx.re native reference*

```
Returns given players wanted level server-side.
```

## Usage

### Lua

```lua
local retval = GetPlayerWantedLevel(playerSrc)

-- always available, by hash
local retval = Citizen.InvokeNative(0xbdcdd163, playerSrc, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetPlayerWantedLevel(playerSrc);

// by hash
const retval = Citizen.invokeNative('0xbdcdd163', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xbdcdd163, playerSrc);
```

## See also

- [CFX::CLEAR_PLAYER_WANTED_LEVEL](https://natives.borderlinerp.com/natives/CFX/CLEAR_PLAYER_WANTED_LEVEL.md) — This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false); This is the server-side RPC native equivalent of the client native CLEAR_PLAYER_WANTED_LEVEL.
- [CFX::SET_PLAYER_WANTED_LEVEL](https://natives.borderlinerp.com/natives/CFX/SET_PLAYER_WANTED_LEVEL.md) — SET_PLAYER_WANTED_LEVEL This is the server-side RPC native equivalent of the client native SET_PLAYER_WANTED_LEVEL.

*Sources: Cfx.re native reference.*
