# WEAPON::GIVE_WEAPON_TO_PED

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

## Signature

```c
Hash GIVE_WEAPON_TO_PED(Ped ped, Hash weaponHash, int ammoCount, BOOL bForceInHand, BOOL bForceInHolster, int attachPoint, BOOL bAllowMultipleCopies, float p7, float p8, Hash addReason, BOOL bIgnoreUnlocks, float permanentDegradation, BOOL p12);
```

## Parameters

- `ped` (`Ped`)
- `weaponHash` (`Hash`)
- `ammoCount` (`int`)
- `bForceInHand` (`BOOL`)
- `bForceInHolster` (`BOOL`)
- `attachPoint` (`int`)
- `bAllowMultipleCopies` (`BOOL`)
- `p7` (`float`)
- `p8` (`float`)
- `addReason` (`Hash`)
- `bIgnoreUnlocks` (`BOOL`)
- `permanentDegradation` (`float`)
- `p12` (`BOOL`)

## Returns

`Hash`

## Description

Gives the ped the weapon.
List: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua

Params: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts
attachPoint: see SET_CURRENT_PED_WEAPON
addReason: see _ADD_AMMO_TO_PED
permanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness

## Usage

### Lua

```lua
local retval = GiveWeaponToPed(ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12)

-- always available, by hash
local retval = Citizen.InvokeNative(0x5E3BDDBCB83F3D84, ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GiveWeaponToPed(ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12);

// by hash
const retval = Citizen.invokeNative('0x5E3BDDBCB83F3D84', ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7 + 0.0000001, p8 + 0.0000001, addReason, bIgnoreUnlocks, permanentDegradation + 0.0000001, p12, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x5E3BDDBCB83F3D84, ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12);
```

- 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` ``.
- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## Related enums

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

*Sources: alloc8or RDR3 NativeDB.*
