> For the complete documentation index, see [llms.txt](https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/weapons-editor/integrations.md).

# Integrations & data

The Weapons Editor does not expose public exports or events for other resources. It integrates with your server through weapon resources, the framework bridge, storage and logs.

## Weapon packs and reference data

* The resource ships the vanilla GTA V metas (all hand weapons, MK2 and DLC: **158 weapons, 464 attachments**).
* Weapon resources running on the server (`data_file WEAPONINFO_FILE` / `WEAPONINFO_FILE_PATCH`) are scanned **at start** and with **`/gwe_rescan`**, and **win over vanilla**.
* If a weapon pack uses globs and the server cannot list folders (`io.popen` unavailable, see selftest S5), list its meta files by hand:

```lua
Config.ExtraMetaFiles = {
    ['my_weapons'] = { 'metas/weapons.meta' },
}
```

* Weapons that are not in any data can still get LIVE fields:

```lua
Config.ExtraWeapons = {
    { name = 'WEAPON_XXX', label = 'Name', category = 'pistol' },
}
```

Categories used by the editor: `pistol`, `smg`, `rifle`, `mg`, `shotgun`, `sniper`, `heavy`, `thrown`, `melee`, `other`.

{% hint style="warning" %}
The editor **never** writes into other resources: only into `ghiaccio_weaponeditor_patch` (with `add_filesystem_permission`) or into its own `generated/` folder. Ensure the patch **after** your weapon packs so its values win.
{% endhint %}

## Framework bridge

`bridge/` is not encrypted. It contains one client and one server file per framework (`esx`, `qbcore`, `qbox`, `standalone`) plus `bridge/init.lua` (detection). The bridge provides group checks, job and grade, player name and notifications. You can adapt the notification or group logic there for a customised framework.

## Storage

| `Config.Storage`   | Where                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------- |
| `'json'` (default) | `data/overrides.json`, `data/history/`, `data/presets/`, `data/backups/`, `data/logs/` |
| `'oxmysql'`        | Table `gwe_kv`, created automatically (`ensure oxmysql` before the editor).            |

The server is the single source of truth. `Config.Backups` (20) rotating backups of `overrides.json` are kept.

## Audit log and Discord webhook

* Audit log: `data/logs/audit_YYYY-MM.log`.
* Rejections (permissions, validation, rate limit): `data/logs/rejects_YYYY-MM.log`, with a per-player cap, never sent to the webhook (`Config.LogRejections`).
* Optional Discord webhook: `ServerConfig.Webhook` in `config_server.lua`, or the `gwe_webhook` convar (takes precedence). Never in `config.lua`.
* No automatic bans.

## Third-party data

The bundled reference data comes from public projects (see `THIRD_PARTY.md` and `data/SOURCES.md` in the package):

| Source                                                                                       | License                                                  | Files                                                     |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------- |
| [CyCoSnag/snag\_weapon\_metas](https://github.com/CyCoSnag/snag_weapon_metas)                | GPL-3.0                                                  | `data/reference/vanilla/snag__*.meta`                     |
| [tugamars/tugamars-weapons\_scrapper](https://github.com/tugamars/tugamars-weapons_scrapper) | GPL-3.0                                                  | `data/reference/vanilla/zz_gap_tuga__*.meta`              |
| [JustBlueDolphin/GTA\_weapon\_metas](https://github.com/JustBlueDolphin/GTA_weapon_metas)    | not declared                                             | `data/reference/vanilla/zz_gap_jbd__*.meta`               |
| [DurtyFree/gta-v-data-dumps](https://github.com/DurtyFree/gta-v-data-dumps)                  | not declared (facts only: names, hashes, groups, labels) | `data/vanilla_weapons.lua`, `data/vanilla_components.lua` |

Only data is included; no third-party code is executed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/weapons-editor/integrations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
