# WEAPON::SET_CURRENT_PED_WEAPON_BY_GUID

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

## Signature

```c
void SET_CURRENT_PED_WEAPON_BY_GUID(Ped ped, Any* weaponUid, BOOL p2, BOOL p3, BOOL p4, BOOL p5);
```

## Parameters

- `ped` (`Ped`)
- `weaponUid` (`Any*`)
- `p2` (`BOOL`)
- `p3` (`BOOL`)
- `p4` (`BOOL`)
- `p5` (`BOOL`)

## Returns

`void`

## Description

Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED

## Usage

### Lua

```lua
local weaponUid = SetCurrentPedWeaponByGuid(ped, p2, p3, p4, p5)

-- always available, by hash
local weaponUid = Citizen.InvokeNative(0x12FB95FE3D579238, ped, Citizen.PointerValueInt(), p2, p3, p4, p5)
```

### JavaScript

```js
const weaponUid = SetCurrentPedWeaponByGuid(ped, p2, p3, p4, p5);

// by hash
const weaponUid = Citizen.invokeNative('0x12FB95FE3D579238', ped, Citizen.pointerValueInt(), p2, p3, p4, p5);
```

### C#

```csharp
var weaponUid = new OutputArgument();
Function.Call((Hash)0x12FB95FE3D579238, ped, weaponUid, p2, p3, p4, p5);
// weaponUid.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.

*Sources: alloc8or RDR3 NativeDB.*
