# CFX::GET_CURRENT_PED_WEAPON

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

## Signature

```c
Hash GET_CURRENT_PED_WEAPON(Ped ped);
```

## Parameters

- `ped` (`Ped`) — The target ped.

## Returns

`Hash` — The weapon hash.

## Description

*Source: Cfx.re native reference*

Returns the hash of weapon the Ped is currently using.

## Usage

### Lua

```lua
local retval = GetCurrentPedWeapon(ped)

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

### JavaScript

```js
const retval = GetCurrentPedWeapon(ped);

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

### C#

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

## See also

- [CFX::SET_CURRENT_PED_WEAPON](https://natives.borderlinerp.com/natives/CFX/SET_CURRENT_PED_WEAPON.md) — SET_CURRENT_PED_WEAPON This is the server-side RPC native equivalent of the client native SET_CURRENT_PED_WEAPON.

*Sources: Cfx.re native reference.*
