> For the complete documentation index, see [llms.txt](https://wxn-studios.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wxn-studios.gitbook.io/documentation/fivecraft-scripts/weapon-repairs/installation.md).

# Installation

I've tried to make the installation process as straightforward as possible. Since this resource relies on the Ox ecosystem, if you're already running `ox_core` or `ox_inventory`, you're 90% of the way there.

{% stepper %}
{% step %}

### Prerequisites

Before we get started, I rely on a few powerful resources to make this script tick. You'll need to have these installed and running:

* **`ox_lib`**: This is the backbone. I use it for the UI, math, and utility functions.
* **`ox_inventory`**: This handles all the item checks and material removal.
* **`ox_target`** *(Optional)*: If you want to use the "Third Eye" interaction mode. If you prefer `TextUI` (Press E), you can skip this, but I highly recommend it for a smoother experience.

{% hint style="info" %}
If you already have `ox_core` or `ox_inventory` running, you're mostly set.
{% endhint %}
{% endstep %}

{% step %}

### Installation

* **Download**: Grab the latest release from the repository.
* **Extract**: Unzip the folder. You can rename it to `FiveCraft-WeaponRepairs` or leave it as is, but make sure the folder name matches what you put in your `server.cfg`.
* **Place**: Drop the folder into your server's `resources` directory (e.g., `resources/[fivecraft]/`).
  {% endstep %}

{% step %}

### Configuration

I've split the configuration to keep things organized.

#### Core Settings

Go to `shared/sh_config.lua`. This is where you'll spend most of your time. You can set up your:

* **Notification Style** (ESX, QB, Ox)
* **Interaction Mode** (Target vs TextUI)
* **Pricing & Materials**
* **Bench Locations**

{% hint style="info" %}
Check out [Config File](/documentation/fivecraft-scripts/weapon-repairs/installation/config-file.md) for a deep dive into every single setting.
{% endhint %}

#### Webhooks (Logs)

If you want to keep track of who is repairing what (and catch any potential exploiters), I've included a logging system.

* Open `server/sv_webhooks.lua`.
* Set `Config.Webhooks.enabled` to `true`.
* Paste your Discord Webhook URL into `Config.Webhooks.url`.
  {% endstep %}

{% step %}

### Server Configuration

This is the most critical step. You need to ensure the script starts **after** its dependencies. If it starts before `ox_lib` or `ox_inventory`, it will crash because it won't be able to find the functions it needs.

Add this to your `server.cfg`:

{% code title="server.cfg" %}

```cfg
# Dependencies
ensure ox_lib
ensure ox_inventory
ensure ox_target # (If using target)

# My Resource
ensure FiveCraft-Weapon-Repairs
```

{% endcode %}

{% hint style="warning" %}
Make sure the dependency order is correct; starting the resource before its dependencies will cause crashes.
{% endhint %}
{% endstep %}

{% step %}

### Restart & Verify

* Restart your server (or run `refresh` and `ensure FiveCraft-Weapon-Repairs` if you're live).
* **Check the Console**: I've added boot logs. You should see it detect your framework (ESX/QB) and confirm that it's ready.
* **Test It**: Go to one of the locations you configured or spawn a bench model (`gr_prop_gr_bench_02a`) and try to interact with it.

If you run into any issues, enable `Config.Debug = true` in the shared config. I've put a ton of debug prints in there to help you pinpoint exactly what's going wrong.
{% endstep %}
{% endstepper %}


---

# 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 dynamically by asking a question.

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

```
GET https://wxn-studios.gitbook.io/documentation/fivecraft-scripts/weapon-repairs/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
