# Moh-pawnshop

A fully-featured FiveM pawn shop resource for QBCore. Players sell valuables to an NPC, get paid, and every transaction is logged to Discord.

## What is moh-pawnshop?

**moh-pawnshop** is a secure, multi-inventory-compatible pawn shop system for FiveM servers running the QBCore framework. Players approach a frozen NPC, open a custom animated UI, choose items from their inventory that the shop accepts, enter a quantity, and receive money instantly.

Every transaction is verified entirely server-side — item validity, player proximity, amount integrity — and any exploit attempt triggers an automatic permanent ban.

#### NPC & Blip

Frozen pawn shop NPC with a map blip. Configurable coordinates.

#### Custom NUI

Orbitron-font animated tablet UI. Purple theme with item images.

#### Server-side security

All validation done on the server. Exploiters are permanently banned.

#### Discord Logs

Rich embed webhooks for every sale — item, quantity, player, IDs.

#### Universal Inventory

Auto-detects ox\_inventory, qs-inventory, ps-inventory, qb-inventory.

#### Universal Target

Auto-detects ox\_target, qb-target, qtarget. Falls back to E keypress.

## How it works

The flow is simple and fully server-authoritative:

{% stepper %}
{% step %}
**Player approaches NPC**

Player walks to the pawn shop NPC. The target prompt or \[E] hint appears.
{% endstep %}

{% step %}
**UI opens**

The server fetches the player's inventory and filters it against `Config.PawnItems`. Matching items appear in the NUI.
{% endstep %}

{% step %}
**Player selects item & amount**

Player clicks an item card and enters a quantity in the modal dialog.
{% endstep %}

{% step %}
**Server validates and pays**

The server checks item validity, amount, and proximity. If all pass, items are removed and money is added.
{% endstep %}

{% step %}
**Webhook fires**

A Discord embed is sent with full transaction details.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Quick start** Drop the folder in your resources, add `ensure moh-pawnshop` to server.cfg, configure config.lua, and restart. See the Installation page for the full guide.
{% endhint %}


---

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