# CFX::SET_CURRENT_PED_WEAPON

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

## Signature

```c
void SET_CURRENT_PED_WEAPON(Ped ped, Hash weaponHash, BOOL bForceInHand);
```

## Parameters

- `ped` (`Ped`)
- `weaponHash` (`Hash`)
- `bForceInHand` (`BOOL`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

SET_CURRENT_PED_WEAPON

**This is the server-side RPC native equivalent of the client native [SET_CURRENT_PED_WEAPON](?\_0xADF692B254977C0C).**

## Usage

### Lua

```lua
SetCurrentPedWeapon(ped, weaponHash, bForceInHand)

-- always available, by hash
Citizen.InvokeNative(0xb8278882, ped, weaponHash, bForceInHand)
```

### JavaScript

```js
SetCurrentPedWeapon(ped, weaponHash, bForceInHand);

// by hash
Citizen.invokeNative('0xb8278882', ped, weaponHash, bForceInHand);
```

### C#

```csharp
Function.Call((Hash)0xb8278882, ped, weaponHash, bForceInHand);
```

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

## See also

- [CFX::GET_CURRENT_PED_WEAPON](https://natives.borderlinerp.com/natives/CFX/GET_CURRENT_PED_WEAPON.md) — Returns the hash of weapon the Ped is currently using.

*Sources: Cfx.re native reference.*
