> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add weapon to armory

> Add a weapon to a specific armory marker for a given player.

Add a weapon to a marker ID for a specific player.

<CodeGroup>
  ```lua Export theme={null}
  exports["jobs_creator"]:addWeaponToArmory(markerId, playerIdentifier, weaponName, weaponAmmo, weaponComponents, weaponTintIndex)
  ```

  ```lua Example theme={null}
  local success = exports["jobs_creator"]:addWeaponToArmory(3, "2570e6efd3671584d7ed05a45cbf4156f782wwac", "WEAPON_PISTOL", 5, {}, 1)
  print(success)
  ```
</CodeGroup>

### Parameters

| Name               | Data Type | Description                |
| ------------------ | --------- | -------------------------- |
| `markerId`         | integer   | The marker ID              |
| `playerIdentifier` | string    | Player identifier          |
| `weaponName`       | string    | Weapon name                |
| `weaponAmmo`       | integer   | Ammo count                 |
| `weaponComponents` | table     | Table of weapon components |
| `weaponTintIndex`  | integer   | Weapon tint index          |

### Return value

| Name           | Data Type | Description                         |
| -------------- | --------- | ----------------------------------- |
| `isSuccessful` | boolean   | Whether the weapon was added or not |


## Related topics

- [Armory](/jobs-creator/server/armory/index.md)
- [Remove weapon from armory](/jobs-creator/server/armory/remove-weapon-from-armory.md)
- [Get all armory weapons](/jobs-creator/server/armory/get-all-armory-weapons.md)
- [Get player armory weapons](/jobs-creator/server/armory/get-player-armory-weapons.md)
- [Weapon Attachments](/jaksam-inventory/guides/weapon-attachments.md)
