# Moh-stoptroll

## 👋 moh-stoptroll

**moh-stoptroll** is a dual-punishment system for FiveM QBCore servers. It provides two distinct in-game sanctions that staff can apply to players directly from an in-game panel:

| System                   | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| 🔥 **Stopfire**          | Prevents a player from using weapons for a set number of minutes   |
| 🧹 **Community Service** | Sends a player to complete physical tasks at a designated location |

***

### ✨ Features

* In-game staff UI panel (NUI) — no external tools needed
* Two separate permission systems (Stopfire staff vs Community Service staff)
* Players are teleported, given a prisoner outfit, and forced to complete tasks
* Real-time row updates in the panel (live player status)
* Escape detection — auto-extends service if the player leaves the work area
* MySQL persistent storage — sentences survive server restarts
* Configurable locations, outfits, timers, and action limits
* QBCore groups + license-based permission support

***

### 🗂 Resource Files

```
moh-stoptroll/
├── fxmanifest.lua
├── config.lua
├── client.lua          ← Stopfire + Community Service logic
├── client_ui.lua       ← NUI callbacks (staff panel)
├── server.lua          ← Core sentence logic + MySQL
├── server_ui.lua       ← Staff panel server handlers
└── web/
    ├── index.html
    ├── styles.css
    ├── app.js
    └── logo.png
```

***

### 📦 Dependencies

| Dependency                                                     | Purpose          |
| -------------------------------------------------------------- | ---------------- |
| [qb-core](https://github.com/qbcore-framework/qb-core)         | Framework        |
| [mysql-async](https://github.com/brouznouf/fivem-mysql-async)  | Database         |
| [qb-clothing](https://github.com/qbcore-framework/qb-clothing) | Prisoner outfits |


---

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