# Installation

Step-by-step guide to getting moh-pawnshop running on your server.

{% stepper %}
{% step %}

#### Download & extract

Download the resource and extract it into your server's `resources/` folder. Make sure the folder is named `moh-pawnshop`.
{% endstep %}

{% step %}

#### Add to server.cfg

Add the resource after your inventory and target resources:

```cfg
ensure qb-core
ensure qs-inventory # or ox_inventory etc.
ensure qb-target # or ox_target etc.
ensure moh-pawnshop
```

{% endstep %}

{% step %}

#### Configure config.lua

Open `config.lua` and set at minimum:

```lua
Config.Webhook = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE'
Config.BankMoney = false -- true = bank, false = cash
Config.UseTarget = true -- true = use target crosshair
Config.UseTimes = false -- true = enforce opening hours
```

{% endstep %}

{% step %}

#### Add your pawn items

List the items the shop will accept with their prices. Item names must match your shared items exactly.

```lua
Config.PawnItems = {{
    {{ item = 'goldchain', price = 500 }},
    {{ item = 'diamond', price = 1500 }},
    {{ item = 'rolex', price = 3000 }},
    {{ item = 'laptop', price = 800 }},
}}
```

{% endstep %}

{% step %}

#### Set the shop location

Configure the coordinates for your pawn shop NPC and zone:

```lua
Config.PawnLocation = {{
    {{
        coords = vector3(-781.14, -608.94, 30.28),
        length = 3.0,
        width = 3.0,
        heading = 0,
        minZ = 29.28,
        maxZ = 31.28,
    }},
}}
```

{% endstep %}

{% step %}

#### Start your server

Restart or start your server. The NPC, blip, and interaction zones spawn automatically. Walk to the NPC to test.

{% hint style="info" %}
**Troubleshooting** If nothing opens when you approach the NPC, check your server console for Lua errors. The most common cause is a missing item in `Config.PawnItems` that doesn't exist in your shared items.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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://mohssins.gitbook.io/mohscriptsdocs/moh-pawnshop/installation.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.
