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

# Developers

Open the hub from your own scripts, log saves, and adapt the framework bridge.

The core is protected by escrow, but the hub was built to work with your other scripts. You get:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>📦 Exports</strong></td><td><code>OpenHub</code> opens the hub from a shop NPC, a crafting table or an item. <code>IsCustomizing</code> tells you who is at a bench.</td><td><a href="/visionstore-docs/scripts/weaponhub/developers/exports-and-events.md">Exports and events</a></td></tr><tr><td><strong>📡 Events</strong></td><td><code>vision_weaponhub:saved</code> fires after every save, for logs. A client event opens the hub on an inventory slot.</td><td><a href="/visionstore-docs/scripts/weaponhub/developers/exports-and-events.md">Exports and events</a></td></tr><tr><td><strong>🔌 Bridges</strong></td><td>Open files for money, jobs, admins, issued equipment, notifications and targets. Add any framework.</td><td><a href="/visionstore-docs/scripts/weaponhub/developers/framework-bridge.md">Framework bridge</a></td></tr></tbody></table>

## Which one should I use?

| You want to...                                         | Use                                                                                                         |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| Open the hub from your own script (NPC, item, command) | The **`OpenHub`** export                                                                                    |
| Keep other scripts from touching a player at the bench | The **`IsCustomizing`** export                                                                              |
| Log saves to Discord or your database                  | The **`vision_weaponhub:saved`** event                                                                      |
| Run on another framework, or change notifications      | **Bridges**, see [Framework bridge](/visionstore-docs/scripts/weaponhub/developers/framework-bridge.md)     |
| Read what the hub saved on a weapon                    | The [weapon metadata](/visionstore-docs/scripts/weaponhub/developers/exports-and-events.md#weapon-metadata) |

## Rules of the road

* **Server decides.** Every rule (distance, jobs, items, fees, ownership, compatibility) is checked on the server when the hub opens and on every save.
* **Saves are all or nothing.** If anything fails, items, weapon metadata and fees are rolled back.
* **The weapon is locked while the hub is open.** ox\_inventory hooks stop the weapon on the bench from being moved and stop items being used, so the hub's own save is the only change to it.
* **Listen with `AddEventHandler`.** `vision_weaponhub:saved` is a local server event.


---

# 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://visionstore.gitbook.io/visionstore-docs/scripts/weaponhub/developers.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.
