# Add weapon to armory

To add a weapon in a marker ID for a specific player

### Export

```lua
exports["jobs_creator"]:addWeaponToArmory(markerId, playerIdentifier, weaponName, weaponAmmo, weaponComponents, weaponTintIndex)
```

#### 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   | If the weapon is added or not |

### Example

```lua
local success = exports["jobs_creator"]:addWeaponToArmory(3, "2570e6efd3671584d7ed05a45cbf4156f782wwac", "WEAPON_PISTOL", 5 {}, 1)

print(success)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.jaksam-scripts.com/jobs-creator/server/armory/add-weapon-to-armory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
