# Moh-redzone

This documentation covers two FiveM QBCore resources that work together as a complete PvP economy system:

* **moh-zone** — A configurable Red Zone PvP area where players earn coins by killing enemies.
* **moh-shop** — A NUI coin shop where players spend their earned coins on items, weapons, and cash.

Both resources share the same `player_coins` database table. No extra event bridge is needed between them.

### How They Work Together

1. An admin activates the Red Zone with `/startzone`.
2. Gang members enter the zone and receive a weapon automatically.
3. Every kill rewards the killer with coins stored in the database.
4. When the zone is not active, players open the shop with `/redzoneshop`.
5. Players spend coins to buy items, ammo, or cash.

### Requirements

| Resource         | Purpose               | Required            |
| ---------------- | --------------------- | ------------------- |
| `qb-core`        | Framework             | Yes                 |
| `oxmysql`        | Database              | Yes                 |
| `PolyZone`       | Circle zone detection | Yes (moh-zone only) |
| Ambulance script | Death detection       | Recommended         |
| Inventory script | Item delivery         | Yes (moh-shop)      |

### server.cfg Load Order

```
ensure qb-core
ensure oxmysql
ensure PolyZone
ensure moh-zone
ensure moh-shop
```

> **Important:** moh-shop must start after moh-zone so the `IsZoneActive` export is available.


---

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