> 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/it/weapons-editor/integrations.md).

# Integrazioni e dati

Il Weapons Editor non espone export o eventi pubblici per altre risorse. Si integra con il server tramite le risorse di armi, il bridge del framework, lo storage e i log.

## Pack di armi e dati di riferimento

* La risorsa include i meta vanilla di GTA V (tutte le armi a mano, MK2 e DLC: **158 armi, 464 accessori**).
* Le risorse di armi avviate sul server (`data_file WEAPONINFO_FILE` / `WEAPONINFO_FILE_PATCH`) vengono scansionate **all'avvio** e con **`/gwe_rescan`**, e **vincono sul vanilla**.
* Se un pack di armi usa glob e il server non può elencare le cartelle (`io.popen` non disponibile, vedi selftest S5), indica a mano i suoi file meta:

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

* Le armi che non compaiono in nessun dato possono comunque avere i campi LIVE:

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

Categorie usate dall'editor: `pistol`, `smg`, `rifle`, `mg`, `shotgun`, `sniper`, `heavy`, `thrown`, `melee`, `other`.

{% hint style="warning" %}
L'editor non scrive **mai** nei file di altre risorse: solo in `ghiaccio_weaponeditor_patch` (con `add_filesystem_permission`) o nella propria cartella `generated/`. Avvia la patch **dopo** i pack di armi così i suoi valori vincono.
{% endhint %}

## Bridge del framework

`bridge/` non è cifrato. Contiene un file client e uno server per ogni framework (`esx`, `qbcore`, `qbox`, `standalone`) più `bridge/init.lua` (rilevamento). Il bridge fornisce controllo dei gruppi, job e grado, nome del giocatore e notifiche. Puoi adattare lì le notifiche o la logica dei gruppi per un framework personalizzato.

## Persistenza

| `Config.Storage`   | Dove                                                                                   |
| ------------------ | -------------------------------------------------------------------------------------- |
| `'json'` (default) | `data/overrides.json`, `data/history/`, `data/presets/`, `data/backups/`, `data/logs/` |
| `'oxmysql'`        | Tabella `gwe_kv`, creata automaticamente (`ensure oxmysql` prima dell'editor).         |

Il server è l'unica fonte di verità. Vengono conservati `Config.Backups` (20) backup a rotazione di `overrides.json`.

## Audit log e webhook Discord

* Audit log: `data/logs/audit_AAAA-MM.log`.
* Rifiuti (permessi, validazione, rate limit): `data/logs/rejects_AAAA-MM.log`, con un tetto per giocatore, mai inviati al webhook (`Config.LogRejections`).
* Webhook Discord opzionale: `ServerConfig.Webhook` in `config_server.lua`, oppure il convar `gwe_webhook` (ha la precedenza). Mai in `config.lua`.
* Nessun ban automatico.

## Dati di terze parti

I dati di riferimento inclusi provengono da progetti pubblici (vedi `THIRD_PARTY.md` e `data/SOURCES.md` nel pacchetto):

| Fonte                                                                                        | Licenza                                                    | File                                                      |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- |
| [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)    | non dichiarata                                             | `data/reference/vanilla/zz_gap_jbd__*.meta`               |
| [DurtyFree/gta-v-data-dumps](https://github.com/DurtyFree/gta-v-data-dumps)                  | non dichiarata (solo fatti: nomi, hash, gruppi, etichette) | `data/vanilla_weapons.lua`, `data/vanilla_components.lua` |

Sono inclusi solo dati; nessun codice di terze parti viene eseguito.


---

# 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/it/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.
