# About MadonneStudio

## 🎮 What is MadonneStudio?

MadonneStudio is an independent French development studio, founded in **2020**, with a mission to create immersive and personalized experiences for all its players. From the creation and sale of scripts, to the full development of video games, through the maintenance and management of game servers — MadonneStudio covers a wide range of activities, all driven by the same core philosophy.

Since its early days, MadonneStudio has consistently aimed to offer its users the most customizable experience possible. No matter which project you use, the goal is always the same: **configurability, flexibility and freedom**.

> 💡 These three words define every MadonneStudio project. Each resource is built so that server owners and players can shape their experience to fit their exact needs.

***

## 🚀 Our Projects

MadonneStudio develops and maintains several active projects:

* 🛡️ [**Madonn'Admin**](https://madonnestudio.com/madmin/) — A complete in-game moderation and administration solution, designed to equip your server and your staff team with the most comprehensive toolset available
* 🚔 [**FivePD Server**](https://madonnestudio.com/fivepd/) — A dedicated FiveM roleplay server focused on police and emergency services gameplay
* 📦 [**Addons & Scripts**](https://scripts.madonnestudio.com/) — A growing catalog of free and paid FiveM resources, built for quality, performance and ease of use

***

## 📬 Contact & Links

* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 📧 **Email:** <contact@madonnestudio.com>
* 📍 **Address:** 60 Rue François Ier, 75008 Paris, France
* 📞 **Phone:** 01.85.09.31.93

**Follow us:** [YouTube](https://www.youtube.com/@MadonneStudio) · [Twitter / X](https://x.com/MadonneStudio) · [Instagram](https://www.instagram.com/madonnestudio/) · [Facebook](https://www.facebook.com/MadonneStudio) · [Twitch](https://www.twitch.tv/madonnestudio) · [LinkedIn](http://www.linkedin.com/company/madonnestudio)


# How to buy our scripts ?

## 🛒 Our Scripts Store

You may have visited one of our servers at some point. If so, you must have noticed the number of exclusive scripts specific to our experience. In order to share our work and allow you to build your own server with quality resources, we have decided to make part of our catalog available to everyone.

All our scripts are sold exclusively on our dedicated store, which you can find at the following address: [**scripts.madonnestudio.com**](https://scripts.madonnestudio.com/)

***

## 🤔 Why Buy Our Scripts?

As game server creators ourselves, we know better than anyone what a server receiving a large number of players actually needs. We are constantly looking for features that can be genuinely useful to each of you.

Every script and resource we publish is **tested before release on servers with over a hundred connected players**. This process helps us identify any potential issues during large-scale use or when **OneSync** is enabled. As a result, all of our scripts are fully **OneSync compatible**.

***

## 🔒 A Note on Resource Protection

> ⚠️ **DISCLAIMER:** All our resources are protected by the **FiveM Escrow system** in order to protect our work and ensure its longevity. This means that resources must be downloaded through the **CFX Portal**, and only servers using a **FiveM key that belongs to you** can run the resource.
>
> We strongly advise against using a FiveM key provided by your hosting provider. A key that does not belong to you will block the use of **any Escrow-protected resource**, without exception. Always use your own personal key.

***

## 📦 How to Acquire a Script

Follow these steps to purchase and download a resource:

**1.** Visit [**scripts.madonnestudio.com**](https://scripts.madonnestudio.com/) and browse the catalog to find the resources that interest you.

**2.** **Log in using your CFX.re account** to ensure the proper delivery of the resource to your account.

**3.** *(Optional)* Connect your **Discord account** as well, to simplify future support requests on our Discord server.

**4.** If you wish to acquire paid resources, proceed to checkout to validate your order.

**5.** Once your order is confirmed, the resources will be available for download directly on the [**CFX Portal**](https://portal.cfx.re/). Navigate to the **Assets** section to find the resources you have just acquired and download them.

**6.** Add the resource to your server and follow the installation guide for the relevant script.

***

## 💬 Need Help?

If you encounter any issue during the purchase or download process, our team is available on Discord:

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Need an extra support ?

Need help setting up or using one of our game server scripts or resources? We're here to help!

At MadonneStudio, we primarily create scripts for **FiveM**, **Minecraft**, and **Garry's Mod**, as well as resources for other game servers. We know that configuring and using these tools can sometimes be challenging, which is why we have put together all the help you need to get started and troubleshoot issues on your own.

***

## 📖 Check the Documentation First

If you encounter any issue when using one of our scripts or resources, your first stop should always be our documentation. For each resource, you will find:

* 📥 **Installation guides** — Step-by-step setup instructions
* ⚙️ **Configuration references** — Detailed explanations of every option
* 🧩 **Usage guides & API references** — How to use exports, events, and integrations
* ❓ **Common Errors** — Solutions to the most frequently encountered problems

> 💡 Most issues can be resolved by carefully reading the **Common Errors** page of the relevant script. We recommend checking it before reaching out.

***

## 💬 Contact Us on Discord

If you can't find the answer to your question in the documentation, feel free to reach out to us directly on our Discord server. Our team and community are active and will do their best to assist you as quickly as possible.

👉 [**discord.gg/madonne**](https://discord.gg/madonne)

When opening a support request, please provide as much context as possible:

* The **name and version** of the resource you are using
* A **description of the issue** and the steps to reproduce it
* Any **error messages** from your server console
* Your **server configuration** (framework, inventory, permission system…)

This helps us resolve your issue much faster.

***

## 📧 Contact Us by Email

If you do not have access to Discord, you can also reach us by email:

📩 [**contact@madonnestudio.com**](mailto:contact@madonnestudio.com)

Please include the same information listed above in your message so we can assist you efficiently.

***

## 🌐 Other Resources

* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 🛒 **Scripts Store:** [scripts.madonnestudio.com](https://scripts.madonnestudio.com/)
* 📊 **Service Status:** [status.madonnestudio.com](http://status.madonnestudio.com/)

***

We are passionate about creating quality tools for game servers, and we want you to get the most out of them. We are here to help you at every step of the way — don't hesitate to reach out whenever you need it.


# Audits

**MadonneStudio Audits** is a professional audit service for FiveM and Discord servers. It is not a script — it is a structured analysis carried out by our team, delivered as a complete PDF report with scores, strengths, weaknesses, and a prioritized action plan.

The service is accessible at [audits.madonnestudio.com](https://audits.madonnestudio.com/).

***

## 📖 What is an audit?

An audit is a full review of your server conducted by a MadonneStudio auditor across **137 criteria** organized in **13 categories**, covering three essential areas:

* 🌐 **External presence** — social media, website, public image, branding
* 💬 **Discord server** — structure, moderation, community, bots, channels
* 🎮 **FiveM server** — performance, security, content, economy, scripts, staff

Each criterion is graded **A**, **B**, or **C**:

| Grade | Meaning                             |
| ----- | ----------------------------------- |
| **A** | Good — meets the standard           |
| **B** | Average — functional but improvable |
| **C** | Insufficient — requires attention   |

At the end of the audit, you receive a **PDF report** (available in French and English) including your category-by-category scores, your key strengths, your identified weaknesses, and a priority action plan built from your C-grade criteria.

***

## 👨‍💼 Who is it for?

MadonneStudio Audits is designed for any FiveM community that wants an objective, external view of their server — whether they are just launching, going through a reboot, or trying to identify what is holding them back.

***

## 🔗 Quick Links

* [📦 Offers & Pricing](/services/audits/offers-and-pricing)
* [🖥️ Client Space](/services/audits/client-space)
* [❓ FAQ](/services/audits/f.a.q.)


# Offers & Pricing

MadonneStudio Audits is available in two formats: **subscriptions** for recurring audits at a set frequency, and **packs** for servers that prefer to buy audits on demand.

***

## Subscriptions

Subscriptions automatically schedule a new audit at each renewal period. The higher the frequency, the higher the monthly price.

| Plan          | Frequency              | Price                      |
| ------------- | ---------------------- | -------------------------- |
| **Monthly**   | 1 audit / month        | 20 € / month               |
| **Bimonthly** | 1 audit every 2 months | 15 € / month (billed 30 €) |
| **Quarterly** | 1 audit every 3 months | 10 € / month (billed 30 €) |

> 💡 Bimonthly and quarterly plans are billed at the period price, not a per-month equivalent. A quarterly subscription costs 30 € every 3 months, not 10 € per month.

***

## Packs

Packs give you a fixed number of audits to use at your own pace, with no subscription or expiry.

| Pack       | Audits included | Price               |
| ---------- | --------------- | ------------------- |
| **Pack 1** | 1 audit         | 25 €                |
| **Pack 3** | 3 audits        | 65 € *(save \~13%)* |
| **Pack 5** | 5 audits        | 95 € *(save \~24%)* |

Ideal for servers that want flexibility without a recurring commitment. Use them when it suits you.

***

## What's included in every audit

Regardless of the plan, every audit includes:

* Full review across **137 criteria** in **13 categories**
* Coverage of **external presence**, **Discord server**, and **FiveM server**
* A complete **PDF report** available in **French and English**
* **Category-by-category scores** with letter grades (A / B / C)
* A summary of **strengths** and **weaknesses**
* A **priority action plan** based on your C-grade criteria

***

## How to subscribe

Subscriptions and packs are available directly on our Tebex store:

👉 [scripts.madonnestudio.com](https://scripts.madonnestudio.com/)

Once your purchase is confirmed, your account is automatically created on the platform and you will receive your login credentials by email.

> 💬 Any questions? Contact us on Discord: [discord.gg/madonne](https://discord.gg/madonne)


# Client Space

Once your subscription or pack is active, you can access your client space at [audits.madonnestudio.com](https://audits.madonnestudio.com/). Your account is created automatically after purchase and your login credentials are sent by email.

***

## Dashboard

The dashboard is your main overview. It shows:

### Active Contract

A summary of your current subscription or pack:

* Plan type (monthly, bimonthly, quarterly, or pack)
* Contract status (active, expired, cancelled)
* Number of audits completed
* For subscriptions: date of the next scheduled audit
* For packs: number of audits remaining

### Strengths & Weaknesses

A summary automatically generated from your most recent audit, highlighting your best-performing categories and the areas that most need improvement.

### Priority Action Plan

A top-5 list of the most critical points to address, built from criteria graded **C** in your last audit. Each item is actionable and directly extracted from your report.

### Score Evolution

A chart tracking your overall score across all completed audits, with a projected trend line to help you visualize your progress over time.

### My Reports

A list of all completed audit reports, with a direct download link for each one. Reports are available in **French** and **English**.

***

## Reports

The Reports page gives you access to all your PDF reports in one place. Each report includes:

* Your **scores per category** with letter grades
* The **detail of every criterion** graded in the audit
* A **summary page** with strengths, weaknesses, and the priority action plan

Reports are generated in both **French and English** and are available immediately after the auditor validates the audit.

***

## Notifications

The notifications page keeps you informed of any updates on your audits — when a new audit is started, when it is completed, and when your report is ready to download.

***

## Account

From your account settings you can update your server name, your email address, and your preferred language (French or English). Your preferred language determines which version of the PDF report is downloaded by default.


# F.A.Q.

## What exactly is audited?

Your server is reviewed across **137 criteria** organized in **13 categories**, covering three areas: external presence (social media, website, branding), Discord server (structure, channels, moderation, bots), and FiveM server (performance, security, content, economy, scripts, staff).

***

## How long does an audit take?

Audit duration depends on the complexity of your server. Once the auditor begins the review, you will be notified when it is complete and your report is ready to download.

***

## In what language is the report delivered?

Reports are generated in both **French and English**. The version downloaded by default matches your account language preference, but both versions are always available.

***

## What do the grades A, B, C mean?

Each of the 137 criteria is graded as follows:

* **A** — Good. The criterion is met.
* **B** — Average. The criterion is functional but could be improved.
* **C** — Insufficient. The criterion requires attention and is included in your action plan.

***

## What is the priority action plan?

The action plan is a list of the most critical improvements to make, automatically generated from the criteria you received a **C** grade on. It is included in your PDF report and also displayed directly in your dashboard.

***

## Can I request a new audit before the end of my subscription period?

No — subscriptions schedule one audit per period. If you need additional audits outside of your subscription rhythm, you can purchase a pack separately.

***

## What happens when a pack runs out?

When all audits in a pack have been used, the pack is marked as complete. You can purchase a new pack or subscribe at any time from the Tebex store.

***

## My account was not created after purchase — what should I do?

Account creation is automatic after payment confirmation. If you did not receive your credentials within a few minutes, contact us on Discord and we will sort it out manually.

👉 [discord.gg/madonne](https://discord.gg/madonne)

***

## Can I cancel my subscription?

Yes — you can cancel your subscription at any time from the Tebex store. The subscription remains active until the end of the current billing period.

***

### I have a question not covered here.

Join us on Discord and open a ticket — we will get back to you as soon as possible.

👉 [discord.gg/madonne](https://discord.gg/madonne) 🌐 [audits.madonnestudio.com](https://audits.madonnestudio.com/) 📧 <contact@madonnestudio.com>


# Madonn'Admin

Madonn'Admin is the ultimate moderation and administration solution created by MadonneStudio. Designed from the ground up for FiveM server owners who take their community seriously, it brings together everything you need to protect your players, manage your staff, and run your server with full control — in-game, on the web, and on mobile.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-73a8cb07823e51d7a7f2d4e364306b838ca45d33%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

## 📖 About Madonn'Admin

Trollers, cheaters, and bad actors will no longer have any excuse for going unpunished. With Madonn'Admin, your moderation team has access to a complete toolset at all times. The resource connects to the **Madonn'Admin cloud platform** (`madonnadmin.com`) to handle player profiles, sanctions, staff permissions, and real-time data synchronization across all your servers.

## ✨ Main Features

* 🎮 **In-Game Dashboard** — A complete admin panel accessible via `F10` (configurable), featuring a player list, live logs, report management, and all moderation actions, without ever leaving the game
* 💻 **Web Dashboard** — A full administration interface accessible from any browser, on desktop or mobile, synchronized in real time with the in-game panel
* 👥 **Staff & Role Management** — Create up to 5, 10, or 15 custom roles per server with granular per-permission control, and assign up to 10, 15, or 50 staff members depending on your plan
* ⚖️ **Sanction System** — Apply notes, commends, warns, kicks, temporary bans, permanent bans, and community bans, all stored permanently on each player's profile
* 🚨 **Report System** — Players submit reports in-game via `/report`, with automatic screenshot capture, real-time staff notifications, built-in messaging, and full statistics on the web dashboard
* 🗺️ **Player Blips & Nametags** — Active staff see player blips and nametags on the map, with trust level color coding and driver indicators
* 🔍 **Spectate System** — Discretely spectate any player with a built-in scaleform interface and `F` key to exit
* 📋 **Activity Logs** — Track connections, chat messages, shots, injuries, deaths, explosions, and name changes, with automatic Discord webhook delivery and automatic screenshots on kills
* 🏘️ **High Density Zones** — Automatically detect and display map areas where players are clustering, color-coded by density level
* 📣 **Broadcast & Staff Chat** — Send server-wide messages or communicate privately with your staff team via a dedicated admin chat command
* 🔔 **Notification System** — Compatible with `default`, `chat`, `MS_Madonne_Notify`, `okokNotify`, or a fully custom handler
* 🛡️ **Anti-Cheat** *(Silver & Gold)* — Built-in detection for prop spam, explosion spam, vehicle spam, noclip, freecam, invisibility, sound exploits, event spoofing, and task clearing — all auto-banning with configurable durations
* 🤖 **Birgitte AI Assistant** *(Gold)* — AI-powered assistant integrated into the dashboard with username compliance checking at connection
* 🧩 **Developer Exports** — `GetStaffRank`, `IsPlayerTrusted` (client), `GetStaffLevelServerSide`, `GetStaffStatus` (server)
* 🌐 **Multi-Language** — English, French, and Spanish included out of the box
* 📦 **Multi-Server** — Manage up to 2, 5, or 10 servers from a single account and dashboard

***

## 🔗 Quick Links

* [🚀 First Launch](/paid-scripts/madonnadmin/first-launch)
* [📥 Installation](/paid-scripts/madonnadmin/script-installation)
* [⚙️ Configuration](/paid-scripts/madonnadmin/configuration)
* [🖱️ Utilisation](/paid-scripts/madonnadmin/how-to-use-it)
* [🧩 Exports & API](/paid-scripts/madonnadmin/api-exports)
* [❓ Common Errors](/paid-scripts/madonnadmin/common-errors)


# First Launch

Before installing the resource on your server, you need to create and configure your **Madonn'Admin community** on the web platform. This step is required — the resource cannot load without a valid server token linked to an active subscription.

***

## 💳 Payment

When subscribing, it is imperative to **provide a valid email address**. All information relating to your Madonn'Admin account will be sent to this address.

After validating your payment, a confirmation email will be automatically sent by our service from **<noreply@madonnadmin.com>**. This email contains crucial information such as your credentials, your **community token**, and direct links to the documentation.

> 💡 If you do not receive the email within a few minutes, check your spam or junk mail folder. If you still cannot find it, contact our support on Discord immediately.

Keep this email somewhere safe — you will need it to set up your community.

***

## 👤 Step 1 — Create your account

Once you have received your email, create your Madonn'Admin account at [**madonnadmin.com**](https://madonnadmin.com/). This account is the main entry point to manage your server, your staff, and your community settings.

Once logged in, your account will be **automatically associated with your community**.

***

## 🔑 Step 2 — Retrieve your Community Token

Your **Community Token** is a unique identifier required for various administrative actions. It was included in the email sent by our services and looks like this:

```
x000xx0xx0xxx0xx00xx0xx0xx000xxx
```

It can also be found at any time in your **community settings** on the Madonn'Admin dashboard. Keep it safe and never share it publicly.

***

## ⚙️ Step 3 — Initial setup

Once registered, follow the initial setup steps on the dashboard:

* Configure your **community name** — this is displayed in-game as the prefix in notifications and staff chat messages
* Set your **language** (English, French, or Spanish)
* Set your **timezone** — used for accurate log timestamps

***

## 🖥️ Step 4 — Add your server

In the dashboard, navigate to **Servers** and add a new server. Fill in:

* The **server name**
* The **public IP address** of your FiveM server

> ⚠️ The IP address must match exactly the one your FiveM server is running on. An incorrect IP will prevent the resource from authenticating.

Once created, your **Server Token** will be generated. Copy it — you will need it in `config/cfg_main.lua` (see [📥 Installation](/paid-scripts/madonnadmin/script-installation)).

***

## 🎭 Step 5 — Create your staff roles

In **Roles**, create the ranks for your moderation team. For each role you can configure:

* The **role name** and **display color** (shown on nametags and in the staff list)
* The **rank order**
* **Per-permission toggles** — teleportations, spectate, god mode, submarine mode, delete radius, broadcast, and more

> 💡 Rank `-1` is the **super admin** rank and bypasses all permission checks. Rank `0` means the player has no staff access.

***

## 👮 Step 6 — Add staff members

Adding a player as a staff member requires a few steps to ensure a secure and correct association.

**Requirements before adding a staff member:**

* The player must have **connected at least once** to your server. This initial connection allows Madonn'Admin to recognize the player and automatically generate their profile on the platform.
* You must send the player your **Community Token** (see Step 2). The player must enter this token in the settings of their own Madonn'Admin account to link themselves to your community.

**How to finalize the association:**

Once the player has connected and entered the token, go to their **Madonn'Admin profile**. A box will appear under their username, showing the name linked to their account. Click on this box to officially add the player to your community as a staff member.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F4J31TvctJO5Wn7azy6jc%2Fimage.png?alt=media&amp;token=eebafdd6-2a54-4b84-be50-8c3f42c181bc" alt=""><figcaption></figcaption></figure>

This creates a permanent link between the player and your community. If you later wish to remove this link, click the **trash icon** to delete the association.

***

## 🏷️ Step 7 — Assign a role to a staff member

At this point, the staff member is linked to your community but does not yet have a specific role. To assign one:

* Go to **Team Staffs** → **Manage Staffs** in the dashboard
* Select the **server** on which you want to assign the permissions
* Enter the **username** of the staff member
* Choose the **role** to assign

This ensures each staff member has the appropriate permissions to fulfill their functions while maintaining a clear and structured organization within your team.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FBiELQtSMgMxWrI6RQtwX%2Fimage.png?alt=media&amp;token=24d4f690-2ea1-4e54-a644-c5b75323a48c" alt=""><figcaption></figcaption></figure>

***

## 📣 Step 8 — Configure broadcasts & announcements *(optional)*

In **Broadcasts**, pre-save server-wide message templates that staff can send with a single click from the in-game dashboard.

In **Announcements**, post staff-facing messages that appear on the admin panel homepage — useful for shift instructions, event reminders, or moderation guidelines.

***

## ✅ You're ready

Your community, server, roles, and staff are now configured. Proceed to the [📥 Installation](/paid-scripts/madonnadmin/script-installation) page to set up the resource on your FiveM server.


# Script Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* An active **Madonn'Admin subscription** with a configured community and server token (see [🚀 First Launch](/paid-scripts/madonnadmin/first-launch))
* *(Optional)* `screenshot-basic` — required for the automatic screenshot system (reports and anti-cheat)
* *(Optional)* `MS_Madonne_Notify` or `okokNotify` for enhanced notifications

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_MadonnAdmin** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the account used to purchase or claim the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_MadonnAdmin` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_MadonnAdmin/
        ├── client/
        ├── config/
        ├── server/
        ├── shared/
        ├── ui/
        └── fxmanifest.lua
```

***

## 🔑 Step 3 — Set your Server Token

Open `config/cfg_main.lua` and paste your **Server Token** from the Madonn'Admin dashboard:

```lua
CONFIG = {
    Server_Token = "your-server-token-here",
    ...
}
```

> ⚠️ This token is what authenticates your server with the Madonn'Admin platform. Without a valid token, the resource will refuse to start.

***

## 📝 Step 4 — Add to server.cfg

Add the following lines to your `server.cfg`. Make sure `oxmysql` and optionally `screenshot-basic` are started **before** `MS_MadonnAdmin`:

```cfg
ensure screenshot-basic   # optional, required for screenshots
ensure MS_Madonne_Notify  # optional, for enhanced notifications
ensure MS_MadonnAdmin
```

***

## ⚙️ Step 5 — Configure the resource

The main configuration file is `config/cfg_main.lua`. The most important options to set up at first launch are:

```lua
CONFIG = {
    Server_Token = "your-server-token-here",

    -- Key to open the admin menu in-game (default: F10)
    OpenAdminMenu = 'F10',

    -- Timezone offset for logs (e.g. 1 = UTC+1)
    Timezone = "+1",

    -- Notification system: "default" | "chat" | "okokNotify" | "MadonneNotify" | "custom"
    NotificationSystem = "default",

    -- Enable/disable modules
    ModuleAnticheat = true,   -- Silver & Gold only
    ModuleLogs = true,
    ModuleScreenshots = true, -- Requires screenshot-basic

    -- Restart announcement system
    RestartAnnouncement = {
        Enabled = true,
        Hours = { "22:00", "04:00", "10:00", "16:00" },
        XMinutesBefore = { 30, 10, 5, 2, 1 }
    }
}
```

Each module has its own config file under `config/module/`:

| File                  | Description                                                        |
| --------------------- | ------------------------------------------------------------------ |
| `cfg_anticheat.lua`   | Anti-cheat detection rules, ban lengths, whitelists                |
| `cfg_blips.lua`       | Player blips, nametags, high density zones, active staff display   |
| `cfg_brigitteai.lua`  | Birgitte AI settings (Gold only)                                   |
| `cfg_button.lua`      | Custom quick action buttons in the player profile and report panel |
| `cfg_commands.lua`    | Enable/disable and rename all in-game commands                     |
| `cfg_logs.lua`        | Discord webhooks per log type, ignored weapons                     |
| `cfg_reports.lua`     | Quick report presets, screenshot on report, notification options   |
| `cfg_sanctions.lua`   | Splash message on sanction, show ban author                        |
| `cfg_screenshots.lua` | screenshot-basic resource name, Discord webhook for screenshots    |

***

## 🔔 Step 6 — Configure the report command

In `config/module/cfg_reports.lua`, configure the quick reports available to players:

```lua
REPORTS_CONFIG = {
    ReportsEnabled = true,
    CreateReportCommand = "report",

    -- Up to 10 quick report types
    QuickReports = {
        "Bug",
        "Question",
        "Freekill",
        "NoFear",
        "NoPain",
        "Insults",
        "Cheater",
        "Spectate me",
        "New player"
    },
    TakeScreenshotWhenReportIsCreated = true,
}
```

***

## 🪝 Step 7 — Set up custom actions *(optional)*

The `config/module/cfg_button.lua` file lets you add custom quick action buttons that appear on each player's profile in the admin panel and in the report panel. Each button runs a Lua function on the targeted player's client:

```lua
BUTTONS = {
    [1] = {
        Title = "Heal",
        HaveAccess = true,           -- true = all staff, or {1,2,3} = specific rank IDs
        EnableCommandForThisButton = true,
        CommandName = "heal",
        CommandSuggestionText = "Heal a player",
        AddInReportMenu = true,
        Actions = function()
            SetEntityHealth(PlayerPed, 200)
        end
    },
    -- Add as many as needed
}
```

***

## 🔄 Step 8 — Restart your server

Restart your server or run the following in the console:

```
refresh
start MS_MadonnAdmin
```

If the Server Token is valid and your community is correctly configured, you should see the following in the console:

```
[SUCCESS] Madonn'Admin was successfully initialized. Thank you for using MadonneStudio ressources !
[SUCCESS] Retrieving community settings from the Madonn'Admin database : COMPLETED !
```

Madonn'Admin is now live! ✅

Staff members can open the admin panel in-game by pressing **`F10`** (default) and activating their moderation mode.


# Configuration

Before your staff members can open the admin panel in-game, Madonn'Admin requires a small amount of setup — both on the web platform and in the resource files. This section covers everything you need to configure to get your community running.

Configuration is split into two parts: the **Dashboard Configuration**, done entirely from the Madonn'Admin web platform, and the **Script Configuration**, done directly in the resource files on your FiveM server.

***

## 🖥️ Dashboard Configuration

The dashboard is where you define the structure of your community: your servers, your staff hierarchy, and how the platform behaves.

This is where you will:

* Set up your **community identity** — name, language, timezone, and trust score settings
* Add your **FiveM servers** and retrieve their unique tokens
* Create **staff roles** and configure their permissions
* Install the **Discord bot** to receive notifications directly in your Discord server

👉 [Dashboard Configuration](/paid-scripts/madonnadmin/configuration/dashboard-configuration)

***

## 📁 Script Configuration

The script configuration is done through the Lua files located in the `config/` folder of the resource. These files are not escrowed and can be freely edited.

This is where you will:

* Paste your **Server Token** and configure core behavior
* Enable or disable **modules** (anti-cheat, logs, screenshots)
* Define **staff commands**, **custom action buttons**, and **notification preferences**
* Configure the **anti-cheat** detection rules, sensitivity, and ban lengths
* Set up **Discord webhooks** for activity logs
* Customize the **report system** and its quick report presets

👉 [Script Configuration](/paid-scripts/madonnadmin/configuration/script-configuration)

***

> 💡 **Where to start?** If this is your first time setting up Madonn'Admin, begin with the [🚀 First Launch](/paid-scripts/madonnadmin/first-launch) guide, which walks you through the full setup process from account creation to your first server connection.


# Dashboard Configuration

The Madonn'Admin web dashboard is the central hub for managing your community. It is accessible from any browser at [**madonnadmin.com**](https://madonnadmin.com/) and is fully synchronized in real time with your in-game resource.

This section covers the four configuration areas available on the dashboard before using Madonn'Admin in-game.

***

### 📄 Pages

* [🏘️ Community Settings](/paid-scripts/madonnadmin/configuration/dashboard-configuration/community-settings) — Configure your community name, language, timezone, and token
* [🖥️ Manage Servers](/paid-scripts/madonnadmin/configuration/dashboard-configuration/manage-servers) — Add and manage the FiveM servers linked to your community
* [🎭 Manage Permissions](/paid-scripts/madonnadmin/configuration/dashboard-configuration/manage-permissions) — Create staff roles and assign permissions per role per server
* [🤖 Install the Discord Bot](/paid-scripts/madonnadmin/configuration/dashboard-configuration/install-the-discord-bot) — Connect the Madonn'Admin Discord bot to your community server

***

> 💡 These settings must be configured **before** installing the resource on your server. The resource will not load without a valid server token linked to an active subscription.
>
> If you haven't completed this step yet, refer to the [🚀 First Launch](/paid-scripts/madonnadmin/first-launch) guide.


# Community Settings

Community Settings is the first section to configure after creating your Madonn'Admin account. It defines the identity of your community and contains the token your server uses to authenticate with the platform.

Access it from the Madonn'Admin dashboard sidebar under **Community Settings**.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FVObeuCFnrNLozqNJS46O%2Fimage.png?alt=media&amp;token=9e393436-1c04-4a7b-80e4-316ac7dccc03" alt=""><figcaption></figcaption></figure>

***

## 🏷️ Community Name

The community name is displayed in-game as the **prefix** in several places:

* Staff chat messages (`[STAFF CHAT] CommunityName :`)
* Broadcast messages
* Notification messages sent to players
* The loading screen during profile verification

Choose a short, recognizable name for your community.

***

## 🌐 Language

Madonn'Admin supports three languages out of the box:

* 🇬🇧 **English**
* 🇫🇷 **French**
* 🇪🇸 **Spanish**

The selected language applies to all in-game text — nametag labels, sanction messages, log descriptions, ban screen translations, and the admin panel interface.

> 💡 The language is set at the community level and applies to all servers in your community. It can be changed at any time — staff members will see the new language on their next connection.

***

## 🕐 Timezone

The timezone setting controls the timestamp formatting used in **activity logs**. Set it to your local UTC offset to ensure log times match your team's timezone.

Examples:

* `+1` → UTC+1 (Central European Time)
* `0` → UTC
* `-5` → UTC-5 (Eastern Standard Time)

This value is also used by the restart announcement system to correctly calculate when to send warnings before scheduled restarts.

***

## 🔑 Community Token

The **Community Token** is the unique identifier for your community. It is used in two situations:

* **Server authentication** — pasted into `config/cfg_main.lua` as `Server_Token` to link your FiveM server to your community
* **Staff member onboarding** — shared with new staff members so they can link their player profile to your community from their Madonn'Admin account settings

Your token is displayed in the Community Settings page and looks like this:

```
x000xx0xx0xxx0xx00xx0xx0xx000xxx
```

> ⚠️ Keep your Community Token private. Anyone with this token can attempt to link themselves to your community. Never post it publicly.

***

## ⭐ Trust Score Settings

The Trust Score is a numerical value attached to each player's profile that evolves over time based on their behavior and history on your server. It is used by Madonn'Admin to automatically assign **trust flags** that are visible to your staff team.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FU4ZjyPVVuxnv0EadzR4i%2Fimage.png?alt=media&amp;token=c6cf058f-25c0-4d18-9a78-14369136d057" alt=""><figcaption></figcaption></figure>

You can configure the following parameters:

* **Starting score** — The score assigned to a new player on their first connection
* **Score increase rate** — How much the score increases per hour of playtime. The longer a player stays without incidents, the more trusted they become.
* **Penalty weights** — The score impact (positive or negative) of each type of sanction on a player's profile (warns, kicks, bans, commends…)

### 🏅 Flag Thresholds

The following three options configure the thresholds at which **visual flags** are applied to a player's profile:

* **Perfect Player** — After a configurable ratio of hours played per penalty, a player is awarded the *Perfect Player* flag
* **Negative flags** — After a configurable number of penalties, negative flags such as *Untrusted* or *Sanction Lover* are applied

> 💡 These flags are **visual indicators only**. They appear in the admin panel and on player profiles to help staff assess a player at a glance, but they do not automatically restrict or affect gameplay.

***

## 🔁 Accumulation of Sanctions

Madonn'Admin can automatically apply a **temporary ban** when a player accumulates a certain number of warnings on their profile. This allows you to enforce progressive discipline without requiring manual intervention from your staff.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F1DFAuUGZ7HZ2txZ0YX7M%2Fimage.png?alt=media&amp;token=5d29d5d7-7553-47d4-bd5a-1c0f2784caf0" alt=""><figcaption></figcaption></figure>

You can configure:

* **Number of warnings required** — After this many active warnings, a temporary ban is automatically triggered
* **Ban duration** — The length of the automatic ban applied

> ⚠️ Only **active warnings** are counted. Warnings that have been removed through a successful appeal are not included in the total.

If you wish to effectively disable this feature, set the warning threshold to an unreachable number such as `99` or `999`. There is very little risk of a player ever reaching such a count.

***

## ⚖️ Appeals Management

Players have the ability to submit **appeal requests** to contest sanctions applied to their profile. You can configure the conditions under which a player is eligible to submit an appeal:

* **Duration between two appeals** — The minimum amount of time a player must wait before submitting a new appeal after a previous one
* **Minimum and remaining ban duration** — A ban appeal can only be submitted if the ban meets a minimum total duration and still has a sufficient amount of time remaining
* **Age of a sanction** — For sanctions other than active bans, you can define a maximum age beyond which the sanction can no longer be appealed

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FggfQhawk7Z9V8yIdmbXm%2Fimage.png?alt=media&amp;token=d8b15159-31b8-4bbb-be89-7699f6a0f9c1" alt=""><figcaption></figcaption></figure>

> 💡 Appeals that are accepted by your staff result in the sanction being removed from the player's profile. Accepted appeals are **not counted** in the warning accumulation system


# Manage Servers

The Manage Servers section lists all the FiveM servers linked to your Madonn'Admin community. Each server has its own **Server Token** used to authenticate the in-game resource.

The maximum number of servers depends on your subscription plan:

* 🥉 **Bronze** — up to 2 servers
* 🥈 **Silver** — up to 5 servers
* 🥇 **Gold** — up to 10 servers

***

## 📋 Server List

For each server in the list, the following information is displayed:

* **Name** — The name you gave the server when creating it
* **IP Address** — The public IP of the FiveM server. This must be exact for all Madonn'Admin features to work correctly.
* **Status** — Whether the server is currently online or offline
* **Connected players** — The number of players currently on the server
* **Connected staff** — The number of staff members currently online

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FI3fev15BIrYPU0YV59lT%2Fimage.png?alt=media&amp;token=18a827db-f74a-4ce7-ab96-fa822f8adaa0" alt=""><figcaption></figcaption></figure>

Each server also has three action buttons:

* 📋 **Copy Token** — Copies the unique Server Token to your clipboard. This token is what you paste into `config/cfg_main.lua` on your FiveM server.
* ✏️ **Edit** — Opens the server settings form to modify its configuration
* 🗑️ **Delete** — Removes the server from your community

***

## ➕ Adding a Server

Click **Add a server** to open the configuration form. The same form is used when editing an existing server.

### 📝 Form Fields

**Server Name** A display name for this server, shown in the dashboard and in statistics.

**Server IP Address** The public IP address of your FiveM server.

> ⚠️ The IP address must be **correct and the server must be running** at the time of registration. Madonn'Admin will attempt to connect to this IP to verify it before saving. An unreachable or incorrect IP will prevent the server from being registered.

**Discord Webhook — Pending Sanctions** An optional Discord webhook URL. When a staff member applies a sanction that requires **validation from a superior** before being applied, a notification is automatically sent to this webhook. The message indicates which staff member submitted the request and which sanction is awaiting approval.

> 💡 This webhook is useful for servers with a multi-tier moderation system where higher-ranked staff must approve certain sanctions before they go through.

**Discord Webhook — Announcements** An optional Discord webhook URL for staff announcements. When an announcement is posted from the Madonn'Admin dashboard, it is automatically forwarded to the specified Discord channel.

By default, no Discord role is pinged when an announcement is sent. To ping a specific role, enter its **Discord role ID** in the field provided below the webhook URL.

> 💡 To get a role ID in Discord, enable **Developer Mode** in Discord Settings → Advanced, then right-click any role in the role list and select **Copy ID**.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FbBpBwfpnL7vcUlR0izzT%2Fimage.png?alt=media&amp;token=580a7e3d-ba7b-4b48-bf8d-156004027c90" alt=""><figcaption></figcaption></figure>

***

## 🔑 Retrieving your Server Token

After creating a server, its unique token can be retrieved at any time using the **Copy Token** button on the server's entry in the list.

Paste it into your FiveM resource configuration:

```lua
-- config/cfg_main.lua
Server_Token = "your-server-token-here",
```

> ⚠️ Each server has its own unique token. Never use the same token across multiple servers.

***

## 🗑️ Removing a Server

Click the **Delete** button on a server entry to remove it from your community. This frees up a server slot within your plan's limit.

> Removing a server does not delete its historical data (players, sanctions, logs). All data remains accessible on the dashboard.


# Manage Permissions

The Manage Permissions section is where you create and configure the **staff roles** for your community. Each role defines a precise set of permissions that determines what a staff member can see and do — both in the in-game admin panel and on the web dashboard.

The maximum number of roles per server depends on your subscription plan:

* 🥉 **Bronze** — up to 5 roles per server
* 🥈 **Silver** — up to 10 roles per server
* 🥇 **Gold** — up to 15 roles per server

***

## 📋 Roles List

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FMUUKAFMiZj55X0fEpn5B%2Fimage.png?alt=media&amp;token=5705cbae-494c-4778-bda8-321aa2048cf3" alt=""><figcaption></figcaption></figure>

Each server has its own roles list, displayed as a summary table. For each role you can see its name, color, and the permissions that have been granted to it.

From this table you can:

* **Reorder roles** — Drag and drop roles to change their hierarchy. The order determines authority levels between staff members: roles higher in the list outrank roles below them.
* **Edit a role** — Modify its name, color, or any of its permissions
* **Delete a role** — Remove it from the server. Staff members assigned to this role will lose their permissions until a new role is assigned.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F4XZGuoalohLS4x8rQTPt%2Fimage.png?alt=media&amp;token=a5a90842-040a-4b7c-b652-b1cebaca4a81" alt=""><figcaption></figcaption></figure>

***

## ➕ Adding a Role

A form at the bottom of the page allows you to create new roles. The same form is used when editing an existing role.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FTKRKKTzQXvffYiCQWJnk%2Fimage.png?alt=media&amp;token=0f2762cf-3338-4067-9f01-b0786a5ccd3b" alt=""><figcaption></figcaption></figure>

### 📝 Form Fields

**Server** Select the server for which this role is created. Roles are per-server — the same role name can exist on multiple servers with different permission sets.

**Role Name** The display name for this role, shown in:

* The staff list in the in-game admin panel
* Player nametags above staff members
* The web dashboard staff overview

**Color Code** *(hexadecimal)* The color associated with this role. It is used for the role badge in the dashboard and for the nametag color displayed in-game above the staff member's character.

***

## 🔐 Permissions

Below the basic settings, you will find the full list of permissions available in Madonn'Admin. Simply check the ones you want to grant to the role you are creating.

### Standard Permissions

* **Spectate** — Allows the staff member to spectate players using the in-game spectate system or the `/spectate` command
* **God Mode** — Allows the staff member to enable invincibility while in active moderation mode, from the Settings tab of the admin panel
* **Broadcast** — Allows the staff member to send server-wide broadcast messages from the admin panel, using both free-text and pre-saved templates
* **Teleportations** — Allows the staff member to use Go To, Go To Car, Bring, and Return actions on players
* **Options Tab** — Grants access to the Settings tab in the admin panel. Automatically enabled if God Mode, Submarine, or Mass Delete are granted.

### ⚠️ Special Permissions

Some permissions have additional configuration options that appear when they are checked:

**🔨 Temporary Ban** When this permission is enabled, an additional field appears asking for the **maximum ban duration in days** that this role is allowed to apply. This caps the ban length a staff member of this rank can issue — they will not be able to apply a ban longer than the configured limit.

> 💡 Permanent bans and community bans are separate permissions and are not affected by this cap.

**🤿 Submarine Mode** Allows the staff member to activate their moderation mode while remaining **hidden from the view of other players**. When in Submarine mode, the staff member appears as a regular player on the map and in nametags, allowing them to monitor situations discreetly without alerting rule-breakers.

> 💡 Higher-ranked staff can still see Submarine-mode staff with a specific nametag prefix, configurable in `cfg_blips.lua`.

**🗑️ Massive Delete Radius** When this permission is enabled, an additional field appears to set the **maximum radius in units** within which the staff member can use the mass deletion tools (delete vehicles, delete objects) from the Settings tab of the admin panel.

Setting a radius of `0` effectively disables this tool for the role, while a large value gives the staff member broad deletion capabilities.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FSWjqEJqZhexAmpmFQXfu%2Fimage.png?alt=media&amp;token=401e5b79-fe59-47ee-9281-4ad7d319119b" alt=""><figcaption></figcaption></figure>

***

## 🔄 Updating or Revoking a Role

* To **change** a staff member's role, go to **Team Staffs → Manage Staffs**, select the server, and assign a different role
* To **revoke** all access, delete the staff member's association with your community using the trash icon on their profile
* Permission changes take effect on the player's **next connection** to the server

***

> 💡 Rank `-1` is the **super admin** rank and bypasses all permission checks. Rank `0` means the player has no staff access at all. These special ranks cannot be assigned through the role creation form — they are reserved by the platform.


# Install the Discord Bot

This page allows you to install the Madonn'Admin Discord bot on the Discord server of your choice. Once connected, the bot extends the platform's capabilities directly into your Discord — giving your team access to player information, server status, and more without leaving Discord.

***

## 🛠️ Installation

Installing the bot is straightforward:

1. Click the **Login with Discord** button on the page
2. **Select the Discord server** on which you want to install the Madonn'Admin bot
3. Follow the authorization steps presented by Discord
4. Madonn'Admin takes care of the rest — the bot will be automatically configured for your community

**That's it!** The Discord bot is now ready to use on your server. 🎉


# Script Configuration

All configuration files for Madonn'Admin are located in the `config/` folder. None of these files are escrowed — they can be freely edited to match your server's needs.

***

## 📁 File Structure

```
MS_MadonnAdmin/
└── config/
    ├── cfg_main.lua          ← Main configuration
    └── module/
        ├── cfg_anticheat.lua
        ├── cfg_blips.lua
        ├── cfg_brigitteai.lua
        ├── cfg_button.lua
        ├── cfg_commands.lua
        ├── cfg_logs.lua
        ├── cfg_reports.lua
        ├── cfg_sanctions.lua
        └── cfg_screenshots.lua
```

***

## 📄 Configuration Files

### ⚙️ [Main Configuration File](/paid-scripts/madonnadmin/configuration/script-configuration/main-configuration-file)

The core of the resource. Contains the **Server Token**, notification system, active modules, staff chat settings, ban duration codes, timezone, and the restart announcement system.

**Start here** — most of the initial setup is done in this file.

***

### 🛡️ [Anticheat Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/anticheat-configuration)

Configures the built-in anti-cheat module *(Silver & Gold only)*. Each detection system is independent and can be individually enabled, tuned, and assigned its own ban duration.

Covers: Anti Props, Anti Explosions, Anti Vehicle Spam, Anti Trigger Event, Anti Noclip, Anti Invisible, Anti Freecam, Anti Sound, Anti Clear Tasks.

***

### 🗺️ [Blips Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/blips-configuration)

Controls everything related to player visibility on the map and nametags above players for active staff members. Includes player blip sprites, trust level color coding, active staff and submarine mode display, dead player blips, and high density zone detection.

***

### 🔧 [Buttons Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/buttons-configuration)

Defines the **custom quick action buttons** shown on player profiles and in the report panel. Each button runs a Lua function on the targeted player's client. Buttons can also register their own in-game commands.

***

### 💬 [Commands Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/commands-configuration)

Enable, disable, and rename every staff command: admin chat, note, commend, warn, kick, ban, goto, bring, return, and spectate. Also controls whether commands can be used on higher-ranked staff, and whether multi-ID syntax is supported.

***

### 📋 [Logs Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/logs-configuration)

Controls which activity types are tracked (connections, chat, shots, injuries, deaths, explosions) and where they are sent via **Discord webhooks**. Supports per-type webhook URLs, Discord thread routing, and custom log entries from external resources.

***

### 🚨 [Reports Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/reports-configuration)

Configures the in-game player report system: the command name, up to 10 quick report presets, automatic screenshot on submission, and notification triggers for players and staff.

***

### ⚖️ [Sanctions Configuration](/paid-scripts/madonnadmin/configuration/script-configuration/sanctions-configuration)

Configures how sanctions are presented to players — full-screen splash messages for warns and commends, and whether the ban author's name is shown on the ban screen.

***

## 🪝 Custom Files

In addition to the standard config files, Madonn'Admin provides dedicated files for custom logic that won't be overwritten on updates:

| File                             | Description                                  |
| -------------------------------- | -------------------------------------------- |
| `client/custom/cl_functions.lua` | Custom notification handler (`CustomNotify`) |
| `client/custom/cl_logs.lua`      | Custom client-side log logic                 |
| `client/custom/cl_events.lua`    | Custom client-side event handlers            |
| `server/custom/sv_logs.lua`      | Custom server-side log logic                 |

***

## ⚠️ Important Notes

* **Never share your `Server_Token`** publicly. It is the unique key that links your server to your Madonn'Admin account.
* Changes to config files require a **resource restart** to take effect: `restart MS_MadonnAdmin`
* The anti-cheat module (`cfg_anticheat.lua`) will only run on **Silver and Gold** subscriptions regardless of the `ModuleAnticheat` setting on Bronze.
* The screenshot system (`cfg_screenshots.lua`) requires `screenshot-basic` to be installed and started before `MS_MadonnAdmin`.


# Main Configuration File

The main configuration file is located at `config/cfg_main.lua`. It controls the core behavior of Madonn'Admin, including the server token, notification system, active modules, and general settings.

***

## 🔑 Authentication

```lua
Server_Token = "",
```

| Option         | Type     | Description                                                                                    |
| -------------- | -------- | ---------------------------------------------------------------------------------------------- |
| `Server_Token` | `string` | Your unique server token, found in your community settings on `madonnadmin.com`. **Required.** |

***

## 🐛 Debug & Display

| Option                | Type      | Description                                                  |
| --------------------- | --------- | ------------------------------------------------------------ |
| `Debug`               | `boolean` | Enable or disable debug messages in the server console       |
| `Discord_Invite_Link` | `string`  | Your Discord invite link, shown to players in the ban screen |

***

## 🕐 Date & Time

| Option          | Type     | Description                                                                 |
| --------------- | -------- | --------------------------------------------------------------------------- |
| `DateFormatSQL` | `string` | Date format used for log timestamps. Default: `"%d/%m/%Y %T"`               |
| `Timezone`      | `string` | Timezone offset for logs (e.g. `"+1"` = UTC+1, `"0"` = UTC, `"-5"` = UTC-5) |

***

## 🔌 Connection Handling

| Option                     | Type      | Description                                                                                                           |
| -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------- |
| `Failure_Override`         | `boolean` | If `true`, players can still connect even when Madonn'Admin is temporarily unreachable. If `false`, they are blocked. |
| `AprilFoolBan`             | `boolean` | Enables the April Fool's fake ban joke on April 1st                                                                   |
| `CantConnectText`          | `string`  | Message shown to players when Madonn'Admin is down and `Failure_Override` is `false`                                  |
| `CantConnectToMadonnAdmin` | `string`  | Message shown briefly when the platform is unreachable but `Failure_Override` is `true`                               |
| `CheckingProfile`          | `string`  | Message shown in the loading screen while a player's profile is being verified                                        |

***

## 🎮 In-Game Interface

| Option                         | Type     | Description                                                                     |
| ------------------------------ | -------- | ------------------------------------------------------------------------------- |
| `OpenAdminMenu`                | `string` | Key binding to open the admin menu. Default: `"F10"`                            |
| `StaffActiveNoticeSize`        | `string` | Font size of the active staff notice displayed on screen. Default: `"20px"`     |
| `MinPlayersForHighDensityArea` | `number` | Minimum number of players in a zone for it to be flagged as a high density zone |

***

## 🔔 Notification System

| Option                         | Values                                                                       | Description                                                                           |
| ------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `NotificationSystem`           | `"default"` \| `"chat"` \| `"okokNotify"` \| `"MadonneNotify"` \| `"custom"` | Controls how notifications are displayed to staff members                             |
| `NotificationChatColorMessage` | `{r, g, b}`                                                                  | Text color for chat-based notifications. Only used when `NotificationSystem = "chat"` |
| `NotifyAllPlayersForSanctions` | `boolean`                                                                    | If `true`, all players receive a server-wide chat message when a sanction is applied  |

> 💡 If using `"custom"`, implement your notification handler in `client/custom/cl_functions.lua` inside the `CustomNotify(text)` function.

***

## 💬 Staff Chat & Broadcasts

| Option                            | Type        | Description                                                                                          |
| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------- |
| `StaffMessagePrefix`              | `string`    | Prefix shown in chat for staff messages. Default: `"STAFF CHAT"`                                     |
| `ShowStaffMessageAsSplashMessage` | `boolean`   | If `true`, private staff messages sent to a player appear as a full-screen GTA V splash message      |
| `ShowAuthorName`                  | `boolean`   | If `true`, the author's name is shown in the splash message when a staff sends a message to a player |
| `StaffMessageColor`               | `{r, g, b}` | Text color of staff chat messages                                                                    |
| `BroadcastMessageColor`           | `{r, g, b}` | Text color of broadcast messages                                                                     |

***

## 🧩 Modules

| Option              | Type      | Description                                                              |
| ------------------- | --------- | ------------------------------------------------------------------------ |
| `ModuleAnticheat`   | `boolean` | Enable the anti-cheat module. **Requires Silver or Gold subscription.**  |
| `ModuleLogs`        | `boolean` | Enable the activity log module (shots, deaths, chat, connections…)       |
| `ModuleScreenshots` | `boolean` | Enable the automatic screenshot system. **Requires `screenshot-basic`.** |

***

## ⏱️ Ban Durations

The `BanDurations` table defines the letter codes used when applying bans via command or the in-game panel:

```lua
BanDurations = {
    Community = "c",  -- Community-wide ban
    Permanent = "p",  -- Permanent ban
    Year      = "y",
    Month     = "mo",
    Week      = "w",
    Day       = "d",
    Hour      = "h",
    Minute    = "m",
}
```

**Examples of valid durations:**

* `"30m"` → 30 minutes
* `"2h"` → 2 hours
* `"7d"` → 7 days
* `"2w"` → 2 weeks
* `"1mo"` → 1 month
* `"p"` → permanent
* `"c"` → community ban

***

## 🔄 Restart Announcement

Automatically send countdown messages in chat before scheduled server restarts:

```lua
RestartAnnouncement = {
    Enabled = true,
    Hours = {
        "22:00",
        "04:00",
        "10:00",
        "16:00",
    },
    XMinutesBefore = { 30, 10, 5, 2, 1 }
}
```

| Option           | Type      | Description                                                    |
| ---------------- | --------- | -------------------------------------------------------------- |
| `Enabled`        | `boolean` | Enable or disable the restart announcement system              |
| `Hours`          | `table`   | List of scheduled restart times in `"HH:MM"` format            |
| `XMinutesBefore` | `table`   | List of how many minutes before each restart to send a warning |


# Anticheat Configuration

The anti-cheat configuration is located at `config/module/cfg_anticheat.lua`.

> ⚠️ **This module requires a Silver or Gold subscription.** It will not run on Bronze plans regardless of configuration.

Each detection module can be independently enabled or disabled, and each has its own configurable ban length and sensitivity settings.

***

## 🚫 Anti Props

Blocks unauthorized prop spawning. If a player spawns any object from the blacklist, they are **immediately and automatically banned**.

```lua
AntiProps = {
    Enabled = true,
    BanLength = "p",
    BlacklistedProps = {
        [GetHashKey("stt_prop_stunt_jump45")] = true,
        -- ...
    }
}
```

| Option             | Type      | Description                                                                           |
| ------------------ | --------- | ------------------------------------------------------------------------------------- |
| `Enabled`          | `boolean` | Enable or disable this detection                                                      |
| `BanLength`        | `string`  | Ban duration applied on detection (uses `BanDurations` codes, e.g. `"p"` = permanent) |
| `BlacklistedProps` | `table`   | List of prop model hashes to block. Use `GetHashKey("model_name")` to add entries     |

> 💡 The default blacklist includes all stunt ramps, tubes, jumps, and various LOD map objects commonly used for griefing.

***

## 💥 Anti Explosions

Detects players generating an abnormal number of explosions in a short period.

```lua
AntiExplosions = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    WhitelistedExplosions = {
        ['BIRD_CRAP'] = true,
        ['FIREWORK'] = true,
        ['SNOWBALL'] = true,
    }
}
```

| Option                  | Type      | Description                                                                                                      |
| ----------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- |
| `Enabled`               | `boolean` | Enable or disable this detection                                                                                 |
| `BanLength`             | `string`  | Ban duration on detection                                                                                        |
| `MaxPlaytime`           | `number`  | Players with more playtime than this value (in minutes) are **exempt** from this check. Default: `300` (5 hours) |
| `WhitelistedExplosions` | `table`   | Explosion types that are ignored by the counter                                                                  |

***

## 🚗 Anti Vehicle Spam

Detects players spawning vehicles at an abnormally high rate.

```lua
AntiVehiclesSpam = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
}
```

| Option        | Type      | Description                             |
| ------------- | --------- | --------------------------------------- |
| `Enabled`     | `boolean` | Enable or disable this detection        |
| `BanLength`   | `string`  | Ban duration on detection               |
| `MaxPlaytime` | `number`  | Playtime exemption threshold in minutes |

***

## 📡 Anti Trigger Event

Protects your server events from being triggered by unauthorized client-side resources or exploits. Any event triggered from a resource that is not started on the server will automatically ban the player.

```lua
AntiTriggerEvent = {
    Enabled = true,
    BanLength = "p",
    ProtectedClientEvents = {},
    ProtectedServerEvents = {},
}
```

| Option                  | Type      | Description                              |
| ----------------------- | --------- | ---------------------------------------- |
| `Enabled`               | `boolean` | Enable or disable this detection         |
| `BanLength`             | `string`  | Ban duration on detection                |
| `ProtectedClientEvents` | `table`   | Additional client-side events to monitor |
| `ProtectedServerEvents` | `table`   | Additional server-side events to monitor |

***

## ✈️ Anti Noclip

Detects players moving through the air at suspicious speeds and heights without a valid animation or parachute, indicating the use of a noclip exploit.

```lua
AntiNoClip = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    DistanceTrigger = 20.0,
    MinHeight = 5.0,
    WhitelistedAnimation = {
        {dict = "nm", anim = "firemans_carry"}
    }
}
```

| Option                 | Type      | Description                                                                                                                                    |
| ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `Enabled`              | `boolean` | Enable or disable this detection                                                                                                               |
| `BanLength`            | `string`  | Ban duration on detection                                                                                                                      |
| `MaxPlaytime`          | `number`  | Playtime exemption threshold in minutes                                                                                                        |
| `DistanceTrigger`      | `number`  | Horizontal distance traveled in 2 seconds to trigger detection                                                                                 |
| `MinHeight`            | `number`  | Minimum height above ground required to trigger detection                                                                                      |
| `WhitelistedAnimation` | `table`   | List of animations that exempt a player from detection (add `{dict, anim}` entries for animations that put the player in the air legitimately) |

***

## 👻 Anti Invisible

Detects players who become invisible without a whitelisted animation active.

```lua
AntiInvisible = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    WhitelistedAnimation = {
        {dict = "nm", anim = "firemans_carry"}
    }
}
```

| Option                 | Type      | Description                                          |
| ---------------------- | --------- | ---------------------------------------------------- |
| `Enabled`              | `boolean` | Enable or disable this detection                     |
| `BanLength`            | `string`  | Ban duration on detection                            |
| `MaxPlaytime`          | `number`  | Playtime exemption threshold in minutes              |
| `WhitelistedAnimation` | `table`   | Animations that legitimately make a player invisible |

***

## 📷 Anti Freecam

Detects players whose camera moves far away from their character position, indicating a freecam exploit.

```lua
AntiFreecam = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    DistanceTrigger = 50,
    MaxHeight = 45.0
}
```

| Option            | Type      | Description                                                     |
| ----------------- | --------- | --------------------------------------------------------------- |
| `Enabled`         | `boolean` | Enable or disable this detection                                |
| `BanLength`       | `string`  | Ban duration on detection                                       |
| `MaxPlaytime`     | `number`  | Playtime exemption threshold in minutes                         |
| `DistanceTrigger` | `number`  | Distance between the player and the camera to trigger detection |
| `MaxHeight`       | `number`  | Maximum camera height before triggering detection               |

***

## 🔊 Anti Sound

Detects players broadcasting blacklisted sounds at suspicious distances via InteractSound, which is a common exploit vector.

```lua
AntiSound = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    BlacklistedSounds = {
        {name = "handcuff", maxDistance = 10000},
        {name = "alarm", maxDistance = 5},
        -- ...
    }
}
```

| Option              | Type      | Description                                                                                                               |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |
| `Enabled`           | `boolean` | Enable or disable this detection                                                                                          |
| `BanLength`         | `string`  | Ban duration on detection                                                                                                 |
| `MaxPlaytime`       | `number`  | Playtime exemption threshold in minutes                                                                                   |
| `BlacklistedSounds` | `table`   | List of `{name, maxDistance}` entries. If the exact sound name and distance combination is detected, the player is banned |

***

## 🧹 Anti Clear Tasks

Detects players sending an abnormally high number of `clearPedTask` events in a short window, which is a common method used by menus to force ragdoll other players.

```lua
AntiClearTasks = {
    Enabled = true,
    BanLength = "p",
    MaxPlaytime = 300,
    MaxTasks = 20
}
```

| Option        | Type      | Description                                                                          |
| ------------- | --------- | ------------------------------------------------------------------------------------ |
| `Enabled`     | `boolean` | Enable or disable this detection                                                     |
| `BanLength`   | `string`  | Ban duration on detection                                                            |
| `MaxPlaytime` | `number`  | Playtime exemption threshold in minutes                                              |
| `MaxTasks`    | `number`  | Maximum number of `clearPedTask` events allowed in a 10-second window before banning |

***

## 💡 Notes on Playtime Exemption

Every anti-cheat module has a `MaxPlaytime` option (in minutes). Players whose total playtime on your server exceeds this value are **exempt from that specific detection**. This is the trusted player system — long-time regulars are less likely to be false-positived by movement or camera detections.

The default value of `300` minutes (5 hours) is a reasonable starting point. Adjust it based on your server's population and tolerance for false positives.


# Blips Configuration

The blips configuration is located at `config/module/cfg_blips.lua`. It controls everything related to player visibility on the map and nametags above players — both for active staff members and for regular players.

***

## 👁️ General

| Option                           | Type      | Description                                                                             |
| -------------------------------- | --------- | --------------------------------------------------------------------------------------- |
| `ShowPlayerBlipsForActiveStaffs` | `boolean` | If `true`, active staff members see a map blip for every player visible to them         |
| `DistanceToShowBlipsAndNames`    | `number`  | Maximum distance (in units) at which blips and nametags are displayed. Default: `100.0` |

***

## 🚗 Blip Sprites per Vehicle Class

When a player is in a vehicle, their blip sprite changes based on the vehicle class. You can customize each sprite ID:

```lua
BlipSpritesForVehicleClasses = {
    ['0']  = 225, -- Compacts
    ['1']  = 225, -- Sedans
    ['8']  = 226, -- Motorcycles
    ['14'] = 427, -- Boats
    ['15'] = 43,  -- Helicopters
    ['16'] = 307, -- Planes
    -- ...
}
BlipSpritePlayerOnFoot = 1
```

> 📖 A full list of blip sprite IDs is available at [docs.fivem.net](https://docs.fivem.net/docs/game-references/blips/).

***

## 🔵 Submarine Mode (Undercover Staff)

The Submarine mode allows staff members to be hidden from other staff while appearing as regular players. When a staff member activates Submarine mode, their nametag displays differently.

```lua
SubMarine = {
    Abbreviation = "SB",           -- Prefix shown in the nametag for staff in same or lower rank
    Color = 150,                   -- Nametag color for same/lower rank staff
    ShowActuallyTalking = true,    -- Show voice indicator
    ShowHealth = true,             -- Show health bar in nametag

    AbbreviationHigherRanks = "SB",       -- Prefix shown to higher-ranked staff
    ColorHigherRanks = 150,               -- Nametag color shown to higher-ranked staff
    ShowActuallyTalkingHigherRanks = true,
    ShowHealthHigherRanks = false,
}
```

***

## 🟢 Active Staff Display

Controls how active (non-submarine) staff members are displayed to other staff and to regular players.

```lua
ActiveStaff = {
    Color = 176,                    -- Nametag color for active staff (seen by other staff)
    ShowActuallyTalking = true,
    ShowHealth = true,

    ShowNameForPlayers = true,              -- Show "ACTIVE STAFF - Name" nametag to regular players
    ShowActuallyTalkingForPlayers = true,
    ShowHealthForPlayers = false,
    ColorForPlayers = 1                     -- Nametag color shown to regular players
}
```

***

## 👤 Player Nametags

Controls how regular players are displayed to active staff members.

```lua
PlayerBlips = {
    ShowActuallyTalking = true,
    ShowActuallyDriving = true,   -- Show a driver prefix in the nametag when the player is driving
    DriverPrefix = "C",           -- Prefix shown when the player is the driver of a vehicle
    ShowHealth = true,

    TrustLevelInNames = {
        Enabled = true,
        Default   = 1,    -- Color for neutral players
        Trusted   = 18,   -- Color for trusted players (flag_trusted, flag_trusted_plus)
        Untrusted = 6,    -- Color for untrusted players (flag_untrusted, flag_caution, flag_cheater)
    },
}
```

> 💡 Players flagged as `flag_caution` or `flag_cheater` will also have `!!` prepended to their nametag to warn active staff at a glance.

***

## 💀 Dead Player Blips

When a player dies, a blip is automatically placed on the map for active staff members.

```lua
DeadPlayersBlips = {
    Enabled = true,
    BlipSprite = 310,
    BlipCategory = 10,
    DisplayOnMinimapOnlyAtShortRange = true,
    DelayBeforeRemovingBlip = 5,   -- Minutes before the blip is automatically removed
}
```

***

## 🏘️ High Density Zones

Automatically detects and highlights areas on the map where a high concentration of players is gathered, helping staff prioritize their attention.

```lua
HighDensityZones = {
    Enabled = true,
    Radius = 150.0,
    BlipSprite = 9,
    BlipAlpha = 100,
    BlipRotation = 50,
    DisplayOnMinimapOnlyAtShortRange = true,

    HighDensity = {
        Density = 30,   -- % of total online players in zone to trigger this level
        Color = 59,
    },
    MediumDensity = {
        Density = 20,
        Color = 47,
    },
    LowDensity = {
        Density = 10,
        Color = 60,
    }
}
```

| Option                | Type      | Description                                                   |
| --------------------- | --------- | ------------------------------------------------------------- |
| `Enabled`             | `boolean` | Enable or disable high density zone detection                 |
| `Radius`              | `number`  | Radius (in units) of each density zone blip                   |
| `BlipSprite`          | `number`  | Blip sprite ID used for density zones                         |
| `BlipAlpha`           | `number`  | Transparency of the blip (`0`–`255`)                          |
| `HighDensity.Density` | `number`  | Minimum % of online players in the zone to trigger this level |
| `HighDensity.Color`   | `number`  | Blip color for this density level                             |

> 💡 A zone is only shown if it also meets the `MinPlayersForHighDensityArea` threshold set in `cfg_main.lua`.


# Buttons Configuration

The buttons configuration is located at `config/module/cfg_button.lua`. It defines the **custom quick action buttons** that appear on each player's profile in the admin panel and in the report panel sidebar.

Each button runs a Lua function directly on the **targeted player's client**, allowing you to perform any in-game action on them with a single click.

***

## 📐 Button Structure

```lua
BUTTONS = {
    [1] = {
        Title = "Heal",
        HaveAccess = true,
        EnableCommandForThisButton = true,
        CommandCanBeUsedOnlyInActiveStaff = true,
        CommandCanBeUsedOnHigherRank = false,
        MultiIdsCommand = true,
        CommandName = "heal",
        CommandSuggestionText = "Heal a player",
        AddInReportMenu = true,
        Actions = function()
            SetEntityHealth(PlayerPed, 200)
        end
    },
}
```

| Option                              | Type                 | Description                                                                                                                 |
| ----------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `Title`                             | `string`             | Label displayed on the button in the admin panel                                                                            |
| `HaveAccess`                        | `boolean` \| `table` | `true` = all staff can use this button. Pass a table of rank IDs (e.g. `{1,2,3}`) to restrict access to specific ranks only |
| `EnableCommandForThisButton`        | `boolean`            | If `true`, a chat command is registered for this button so staff can also use it via `/CommandName [ID]`                    |
| `CommandCanBeUsedOnlyInActiveStaff` | `boolean`            | If `true`, the chat command can only be used while in active staff mode                                                     |
| `CommandCanBeUsedOnHigherRank`      | `boolean`            | If `true`, the command can target players with a higher rank than the staff member                                          |
| `MultiIdsCommand`                   | `boolean`            | If `true`, the command accepts multiple player IDs at once (e.g. `/heal 12 34 56`)                                          |
| `CommandName`                       | `string`             | The command name (without `/`)                                                                                              |
| `CommandSuggestionText`             | `string`             | Description shown in the chat suggestion                                                                                    |
| `AddInReportMenu`                   | `boolean`            | If `true`, this button also appears in the report panel sidebar when a staff member handles a report                        |
| `Actions`                           | `function`           | Lua function executed **on the targeted player's client**. `PlayerPed` refers to the target's ped.                          |

***

## 🧩 Default Buttons

Four buttons are included by default:

| # | Title           | Access    | Command       | Description                                                    |
| - | --------------- | --------- | ------------- | -------------------------------------------------------------- |
| 1 | **Heal**        | All staff | `/heal`       | Fully restores the player's health                             |
| 2 | **Kill**        | Ranks 1–5 | `/killplayer` | Kills the player                                               |
| 3 | **(Un)Freeze**  | Ranks 1–5 | `/freeze`     | Toggles the player's freeze state                              |
| 4 | **Fix Vehicle** | All staff | `/fixvcl`     | Repairs the player's current vehicle (engine, body, fuel tank) |

***

## ➕ Adding Custom Buttons

To add a new button, duplicate an existing entry and increment the key number:

```lua
BUTTONS = {
    -- ...existing buttons...
    [5] = {
        Title = "Revive",
        HaveAccess = true,
        EnableCommandForThisButton = true,
        CommandCanBeUsedOnlyInActiveStaff = true,
        CommandCanBeUsedOnHigherRank = false,
        MultiIdsCommand = true,
        CommandName = "revive",
        CommandSuggestionText = "Revive a player",
        AddInReportMenu = true,
        Actions = function()
            SetEntityHealth(PlayerPed, 200)
            NetworkResurrectLocalPlayer(
                GetEntityCoords(PlayerPed), 0, true, false
            )
        end
    },
}
```

> 💡 The `Actions` function is executed **on the targeted player's machine**, so `PlayerPed` always refers to their own character. You have access to all FiveM client-side natives.


# Commands Configuration

The commands configuration is located at `config/module/cfg_commands.lua`. It allows you to enable, disable, and rename every in-game command available to staff members.

***

## 🔤 Command Suggestions

```lua
CommandSuggestions = true,
```

If `true`, all enabled commands will display auto-complete suggestions in the FiveM chat box when a staff member starts typing the command.

***

## 📋 Available Commands

### Admin Chat

```lua
AdminChatCommand = {
    Enabled = true,
    Command = "admin",
    ChatColor = {r = 255, g = 255, b = 255},
}
```

Send a private message visible only to online staff members.

| Option      | Description                                      |
| ----------- | ------------------------------------------------ |
| `Enabled`   | Enable or disable the command                    |
| `Command`   | Command name without `/`. Default: `"admin"`     |
| `ChatColor` | RGB color of admin chat messages in the chat box |

***

### Note

```lua
NoteCommand = {
    Enabled = true,
    Command = "note",
}
```

Add a private internal note to a player's profile. Notes are visible only to staff on the web dashboard and in the admin panel.

Usage: `/note [ID] [reason]`

***

### Commend

```lua
CommendCommand = {
    Enabled = true,
    Command = "commend",
}
```

Add a positive commendation to a player's sanction history.

Usage: `/commend [ID] [reason]`

***

### Warn

```lua
WarnCommand = {
    Enabled = true,
    Command = "warn",
}
```

Issue a formal warning to a player. The warning is saved to their permanent profile and displayed as a splash message.

Usage: `/warn [ID] [reason]`

***

### Kick

```lua
KickCommand = {
    Enabled = true,
    Command = "kick",
}
```

Remove a player from the server immediately.

Usage: `/kick [ID] [reason]`

***

### Ban

```lua
BanCommand = {
    Enabled = true,
    Command = "ban",
}
```

Ban a player for a specified duration or permanently.

Usage: `/ban [ID] [duration] [reason]`

**Duration examples:** `30m`, `2h`, `7d`, `2w`, `1mo`, `p` (permanent), `c` (community ban)

***

### Go To

```lua
GoToCommand = {
    Enabled = true,
    CanBeUsedOnHigherRank = false,
    Command = "goto",
}
```

Teleport to a player's position.

Usage: `/goto [ID]`

| Option                  | Description                                                                     |
| ----------------------- | ------------------------------------------------------------------------------- |
| `CanBeUsedOnHigherRank` | If `false`, staff cannot teleport to players with a higher rank than themselves |

***

### Bring

```lua
BringCommand = {
    Enabled = true,
    CanBeUsedOnHigherRank = false,
    Command = "bring",
    MultiIds = true,
}
```

Teleport one or several players to your position.

Usage: `/bring [ID]` or `/bring [ID1] [ID2] [ID3]` if `MultiIds` is `true`

***

### Return

```lua
ReturnCommand = {
    Enabled = true,
    CanBeUsedOnHigherRank = false,
    Command = "return",
    MultiIds = true,
}
```

Send a player back to their position before the last teleportation.

Usage: `/return [ID]`

***

### Spectate

```lua
SpectateCommand = {
    Enabled = true,
    CanBeUsedOnHigherRank = false,
    Command = "spectate",
    MultiIds = false,
}
```

Discretely spectate a player from their perspective.

Usage: `/spectate [ID]`

Press `F` in-game to exit spectate mode.

***

> 💡 Custom action buttons defined in `cfg_button.lua` with `EnableCommandForThisButton = true` also register their own commands automatically and will appear as suggestions if `CommandSuggestions` is `true`.


# Logs Configuration

The logs configuration is located at `config/module/cfg_logs.lua`. It controls which activity types are logged, where they are sent (Discord webhooks), and various display options.

***

## ✅ Enabled Log Types

```lua
LogsEnabled = {
    Disconnections = true,
    Chat           = true,
    Explosions     = true,
    Shots          = true,
    Injuries       = true,
    Death          = true,
    Other          = true,
}
```

Each entry can be independently enabled or disabled. Setting a type to `false` completely disables its logging — no data is stored and no webhook is sent.

| Type             | Description                                                               |
| ---------------- | ------------------------------------------------------------------------- |
| `Disconnections` | Player connections and disconnections                                     |
| `Chat`           | All chat messages sent on the server                                      |
| `Explosions`     | Explosions caused by players                                              |
| `Shots`          | Weapon shots fired by players, grouped per session                        |
| `Injuries`       | Damage dealt to players                                                   |
| `Death`          | Player deaths, including the cause and the killer if applicable           |
| `Other`          | Custom logs triggered via `TriggerEvent('MadonnAdmin:SimpleLog', 8, ...)` |

***

## 📨 Discord Webhooks

Each log type has its own Discord webhook. Set a valid webhook URL to enable Discord delivery for that type, or set it to `false` to disable it:

```lua
DiscordWebhook = {
    Disconnections = "https://discord.com/api/webhooks/...",
    Chat           = "https://discord.com/api/webhooks/...",
    Shots          = "https://discord.com/api/webhooks/...",
    Injuries       = "https://discord.com/api/webhooks/...",
    Death          = "https://discord.com/api/webhooks/...",
    Explosions     = "https://discord.com/api/webhooks/...",
    Connections    = "https://discord.com/api/webhooks/...",
    ChangeName     = "https://discord.com/api/webhooks/...",
}
```

> 💡 You can use **Discord forum threads** by appending `?thread_id=YOUR_THREAD_ID` to the webhook URL. This allows you to send each log type to a dedicated thread inside a single forum channel.

***

## 🔫 Ignored Weapons

Weapons in this list are excluded from the shots log entirely:

```lua
IgnoredWeapons = {
    [GetHashKey("WEAPON_FIREEXTINGUISHER")] = true,
    [GetHashKey("WEAPON_PETROLCAN")]        = true,
}
```

Add any weapon model hash you want to exclude from shot tracking. Useful for tools that are technically "weapons" but are not relevant for moderation.

***

## 🖥️ In-Game Log Display

```lua
MaxLogsShowedInGame = 100,
```

Maximum number of log entries displayed in the **Logs** tab of the in-game admin panel. Increasing this value may impact performance when opening the logs page with a large history.

***

## 🏷️ Discord Embed Options

```lua
AddDiscordIdToDiscordLogs = true,
```

If `true`, the Discord ID of each player involved in a log entry is included in the webhook embed. This allows Discord moderators to directly ping or identify players from the logs.

***

## 🔧 Custom Logs

You can push custom log entries to both the in-game panel and Discord from any resource using the `MadonnAdmin:SimpleLog` event:

```lua
-- From server-side:
TriggerEvent(
    'MadonnAdmin:SimpleLog',
    8,                    -- type 8 = custom / "Other"
    playerServerId,       -- playerA
    "Used forbidden item",-- detail
    nil,                  -- playerB (optional)
    "Custom Action",      -- action label
    0x662d91,             -- embed color
    true,                 -- take screenshot
    "https://discord.com/api/webhooks/your-webhook"
)
```

To add persistent custom log threads, edit `server/custom/sv_logs.lua`:

```lua
if LOGS.LogsEnabled.Other then
    CreateThread(function()
        -- Your custom server-side log logic here
    end)
end
```


# Reports Configuration

The reports configuration is located at `config/module/cfg_reports.lua`. It controls the player report system — the command players use, the pre-configured quick report types, and how notifications are handled.

***

## ⚙️ General Settings

```lua
REPORTS_CONFIG = {
    ReportsEnabled = true,
    CreateReportCommand = "report",
    TakeScreenshotWhenReportIsCreated = true,
}
```

| Option                              | Type      | Description                                                                                                                         |
| ----------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `ReportsEnabled`                    | `boolean` | Enable or disable the entire report system                                                                                          |
| `CreateReportCommand`               | `string`  | The command players use to open the report interface. Default: `"report"` → `/report`                                               |
| `TakeScreenshotWhenReportIsCreated` | `boolean` | If `true`, a screenshot is automatically captured and attached to the report when it is submitted. **Requires `screenshot-basic`.** |

***

## ⚡ Quick Reports

Quick reports are pre-configured one-click report buttons shown to players when they open the report interface. Players can choose one without typing anything.

```lua
QuickReports = {
    "Bug",
    "Question",
    "Freekill",
    "NoFear",
    "NoPain",
    "Insults",
    "Cheater",
    "Spectate me",
    "New player"
},
```

* You can define **up to 10** quick report types
* Each entry is a string that becomes the report title
* Players can also submit a fully custom report with their own title and description

> 💡 Quick reports and custom reports are both available simultaneously. Players choose between them when they open the report menu.

***

## 🔔 Notifications

Controls which events trigger a notification in-game:

```lua
Notifications = {
    OwnReportCreated = false,
    NewScreenshot    = false,
    NewMessage       = true,
    NewReport        = true,
}
```

| Option             | Type      | Description                                                           |
| ------------------ | --------- | --------------------------------------------------------------------- |
| `OwnReportCreated` | `boolean` | Notify the player when their own report is successfully created       |
| `NewScreenshot`    | `boolean` | Notify the player when a new screenshot is attached to their report   |
| `NewMessage`       | `boolean` | Notify the player when a staff member sends a message in their report |
| `NewReport`        | `boolean` | Notify all active staff members when a new report is submitted        |

***

## 🖼️ Screenshot Configuration

The screenshots taken on report submission are stored via Discord webhook, configured in `config/module/cfg_screenshots.lua`:

```lua
SCREENSHOTS = {
    ScreenshotBasicName = "screenshot-basic",
    DiscordWebhookToSaveScreenshots = "https://discord.com/api/webhooks/...",
}
```

| Option                            | Type     | Description                                                                             |
| --------------------------------- | -------- | --------------------------------------------------------------------------------------- |
| `ScreenshotBasicName`             | `string` | Name of the `screenshot-basic` resource. Do not change unless you renamed the resource. |
| `DiscordWebhookToSaveScreenshots` | `string` | Discord webhook URL where report screenshots are uploaded and stored                    |

> ⚠️ Without a valid webhook, screenshots will fail to save even if `screenshot-basic` is running.

***

## 📊 Report Statistics

All reports are saved to the Madonn'Admin platform and can be reviewed on the **web dashboard** under the **Reports** section. For a full breakdown of available statistics, refer to the 📊 Report Statistics page.


# Sanctions Configuration

The sanctions configuration is located at `config/module/cfg_sanctions.lua`. It controls how sanctions are presented to players when they are applied.

***

## 💬 Splash Message

```lua
UseSplashMessage = true,
```

If `true`, when a player receives a **warn** or a **commend**, a full-screen GTA V splash message appears on their screen with the sanction type and reason.

* A **warn** displays a blue splash message
* A **commend** displays a green splash message
* A **staff message** (sent via the report or admin chat) displays a purple splash message, optionally with the author's name

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FAPbjz9gg24Yj6QNMP97L%2Fimage_2026-05-22_225717254.png?alt=media&amp;token=84877353-7d3f-4647-8b3b-2d4be32618aa" alt=""><figcaption></figcaption></figure>

> 💡 The `ShowStaffMessageAsSplashMessage` and `ShowAuthorName` options in `cfg_main.lua` also affect how staff messages are displayed in this system.

***

## 👤 Show Ban Author

```lua
ShowBanAuthor = false,
```

If `true`, the name of the staff member who applied the ban is displayed in the ban screen shown to the banned player at connection.

If `false`, the ban screen only shows the reason, duration, and expiry date — the author remains anonymous.

***

## 📋 Available Sanction Types

The following sanction types can be applied from the in-game admin panel, via chat commands, or from the web dashboard:

| Type                 | Command                         | Description                                                               |
| -------------------- | ------------------------------- | ------------------------------------------------------------------------- |
| 📝 **Note**          | `/note`                         | Internal note visible only to staff. Not shown to the player.             |
| ⭐ **Commend**        | `/commend`                      | Positive commendation added to the player's profile with a splash message |
| ⚠️ **Warn**          | `/warn`                         | Formal warning added to the player's profile with a splash message        |
| 👟 **Kick**          | `/kick`                         | Removes the player from the server immediately                            |
| 🔨 **Temporary Ban** | `/ban [ID] [duration] [reason]` | Bans the player for a defined duration                                    |
| 🔒 **Permanent Ban** | `/ban [ID] p [reason]`          | Bans the player permanently                                               |
| 🌐 **Community Ban** | `/ban [ID] c [reason]`          | Bans the player across all servers of the community                       |

***

## ⏱️ Ban Duration Format

Durations are entered as a number followed by a letter code, as defined in `BanDurations` in `cfg_main.lua`:

| Code | Duration      |
| ---- | ------------- |
| `m`  | Minutes       |
| `h`  | Hours         |
| `d`  | Days          |
| `w`  | Weeks         |
| `mo` | Months        |
| `y`  | Years         |
| `p`  | Permanent     |
| `c`  | Community ban |

**Examples:** `30m`, `2h`, `7d`, `2w`, `1mo`, `1y`, `p`, `c`


# How to use it ?

Madonn'Admin is divided into three main interfaces, each serving a specific purpose in your day-to-day server management.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FURx2kZqrY3mZ9m0mtMz8%2Fimage.png?alt=media&amp;token=ea7ace1c-3339-40f0-a856-2973b3293017" alt=""><figcaption></figcaption></figure>

***

## 🖥️ In-Game Dashboard

The in-game administration panel, accessible by pressing `F10` (default), is the primary tool for staff members actively moderating the server. When activated, your character automatically enters god mode (invisible) and an indicator appears above your head showing your nickname as `[ACTIVE STAFF] Your nickname`.

The in-game dashboard gives you access to:

* A **home interface** with connected staff, recent announcements, and player flag graphs
* A **player list** with full profiles, sanction history, and direct action buttons
* **Server logs** with filterable categories
* A **report management panel** to handle player reports in real time
* A **settings panel** to delete props, vehicles, and toggle god mode or underwater mode

***

## 🌐 Web Dashboard

The web platform is the central hub for server administrators. It provides a complete overview of server activity, player management, staff performance tracking, and advanced moderation tools — all accessible from any browser without being in-game.

***

## 💬 Discord Bot

The Discord integration extends Madonn'Admin's capabilities directly into your community Discord. Staff members can look up player profiles, apply sanctions, and monitor server status without ever opening the game.


# Web Dashboard

Madonn'Admin Web is a web platform designed to give FiveM server administrators complete visibility and control over server activity. It centralizes logs, player management, staff performance tracking, sanction management, and more — all accessible from any browser.

***

### Interface Overview

#### Left panel

The left panel contains your **community name** (clicking it returns you to the main dashboard) and the **main navigation menu** with access to all sections: Dashboard, Servers, Players, Staff, Appeals, and Logs.

At the bottom left you will find the Madonn'Admin logo, the current platform version, and a link to the MadonneStudio website.

#### Top bar

The top bar includes:

* A **player search bar** — search by nickname, Discord ID, Steam ID, or Xbox ID

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeDlcn1y4OqdRAMmUs28U4jK_LgUzPZMU7u-Rj6v0IPmRqyHaZNnxeDBS4Q6FUHG1VFHWkjEgdOp1wjJkovqwepfdX4uObkIA7StSY0OZrumHQE7wcLbAk41-bRgCBgBSBzysiv8A?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

* A **light/dark mode toggle**
* A **notification bell** — centralizes alerts and announcements (admin rank and above)
* Your **profile icon** — opens a dropdown with Settings (Community Token, password change) and Logout

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-8ea918deefdaa0bebe8bee77db04f9799a46eb1a%2Fimage%20(4)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

### Pages

* [📊 Main Page](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/main-page)
* [🖥️ Servers](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/servers)
* [👥 Players](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/players)
* [👮 Staffs](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/staffs)
* [⚖️ Appeals](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/appeals)
* [📋 Logs](/paid-scripts/madonnadmin/how-to-use-it/web-dashboard/logs)


# Main Page

The Dashboard is the main landing page of Madonn'Admin Web. It is structured around three axes, each providing a different category of information.

***

## Dashboard

An overview of the server's activity over the **last 7 days**:

* Number of players currently connected
* Number of new players who joined in the last 7 days
* Number of staff members currently online
* Summary of staff actions in the last 7 days (warns, kicks, bans)

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-726952480c7584afc05d8cdedf1d8e8e86490a60%2Fimage%20(9)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Online Staff

A detailed view of currently active team members:

* Total number of staff members online
* Server they are connected to
* Rank (admin, moderator, etc.)
* Status — moderation mode or roleplay mode

By default up to 10 staff members are displayed, expandable to 100.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-67ec8465bdad8c6c0b708d9025645f56183b1b3a%2Fimage%20(10)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Additional Information

Announcements and supplementary data for the staff team:

* Latest internal communications and updates from server managers
* **Player flag activity** — a visual indicator of potentially problematic behavior among currently connected players, based on sanction history and frequency

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-1c15ed64c92afe40671a9707d8306e520402f9c6%2Fimage%20(11)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>


# Servers

The Servers section allows you to select and manage a specific server linked to your Madonn'Admin account. Once a server is selected, all data and tools on the page are scoped to that server.

***

## Server Overview

At the top of the page, a summary block displays real-time statistics for the selected server:

* Total number of players currently connected
* Number of staff members online
* Staff action counts over the current period (warns, kicks, bans)

Data refreshes each time you reload the page.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-62cedf11bd4fb5f832c5f313d5417f82d0489025%2Fimage%20(12)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Online Players

A detailed list of players currently connected to the server, with the following columns:

| Column                | Description                                                             |
| --------------------- | ----------------------------------------------------------------------- |
| **Player Name**       | In-game nickname — click to open the player's full Madonn'Admin profile |
| **In-Game ID**        | Current server ID                                                       |
| **Game Time**         | Total cumulative playtime on the server                                 |
| **First Connection**  | Date of the player's first connection                                   |
| **Status**            | Online or offline                                                       |
| **Warn / Kick / Ban** | Sanction summary                                                        |

All columns are sortable. A search bar in the top right corner lets you filter by nickname or in-game ID. Default display: 10 players, expandable to 100.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeYrx5dR8myiCKiMg_zMCQSxxnBO8ze2Y1ZH-L2zcqtzsS015bht-650O3KQMVv1492IOmQMRqcHBL78uo0ofn31Z9XjrwAUGkPWnTFPb2vHUXsPoTEgzvdH_prBGEcxDfQOb4Frw?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Additional Information

* **Admin chat** — view and send messages to the in-game admin chat directly from the web. Messages sent here appear in-game in real time.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-c6413e720239ac4cd2f8406f0357aefd351c4dea%2Fimage%20(13)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Player flags** — a list of flags for currently connected players, generated from their sanction history and playing time. Empty when no players are connected.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdpUpS6NT8yzVv5IAApNg0y_Z33rtqwQT0f3K-cGM11I03efUxt6Hr1dZ8nlrjnXqhI1NA7YuJBKSQLUKNDKTjRnfEw5Yu99JjDUIPn_7PNbczpaoQlwXYMg-n1PhGs9BBCrHdtZw?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Broadcast Message

Send a global message to all connected players, visible in the in-game chat in the format `Your server name: [Your message]`. Default color: blue (customizable).

Pre-configured buttons allow quick broadcast of frequently used messages (report command reminder, rules reminder, Discord link, restart times, etc.). All pre-configured messages are fully customizable.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-5d905bcad3cd5b724f1caf8e5d63913d17750b92%2Fimage%20(14)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Admin-Only Section

Accessible to administrator rank and above, this section shows:

* **Open Appeals** — a summary of pending ban lift or sanction removal requests, with request ID, type, and current status
* **Pending Sanctions** — sanctions proposed by lower-ranked staff awaiting admin approval, with a green button to validate and a red button to reject

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdnmOolsn8VdlqSX0V2dqPTl9S9luG8SFZmrTd2lQuqMVfVFW-fTWE7agLyF5E82fVoibyO8QPLhlF63eVAVpsAbO37LvnoNhTSFpCbY15N6DVn_Atw3lefDnl455L1iVMdYElr?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>


# Players

The Players section offers two subsections for managing and looking up player profiles.

***

## Search for a Player

Search for a specific player's Madonn'Admin profile using:

* **Username** — as it appears on the server
* **GTA 5 License**
* **Discord ID**
* **Steam ID**
* **Xbox ID / Live ID**

By default the search uses the GTA 5 license as the identifier, but this can be changed from the dropdown in the search interface.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc6-IRq0k9aTWVWX7UyQpY3B8Fz7V9mgqsvNDzsXHdPSdDjCuDo91ycC517TbIxCKD1hKFrAKjSdO980SmSlOiz9KmAmjLDYPwtnGvxo4oodGipgPVlcuTjxNynFRlhSD6uP2oj-g?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Show All Players

A complete list of all players registered or active on the server, with the following columns:

| Column                | Description                                      |
| --------------------- | ------------------------------------------------ |
| **Player Name**       | Nickname — click to open the full player profile |
| **Playing Time**      | Total cumulative time spent on the server        |
| **First Connection**  | Date of the player's first connection            |
| **Last Connection**   | Date of the player's most recent connection      |
| **Status**            | Online or offline                                |
| **Warn / Kick / Ban** | Sanction summary                                 |

All columns are sortable. A search bar in the top right allows filtering by nickname. Default display: 10 players, expandable to 100.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FbjOeh4KmtbYqUjvpcH4I%2Fimage.png?alt=media&amp;token=cc9f3e56-b322-4e41-bc76-61819d747d6c" alt=""><figcaption></figcaption></figure>

***

## Player Profile

A player's profile is divided into several sections.

**Identifiers** — all accounts linked to the player: Discord, Steam, FiveM license, Xbox ID, and any other associated platforms.

**Statistics** — displayed on the right side of the profile:

* Current status (online / offline)
* First and last connection dates
* Total playtime
* **Trust score** — calculated from playtime and sanction history. A higher score indicates reliable behavior; a lower score reflects a significant sanction history.
* **Flags** — reliability indicators based on behavior and history

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F347eGiyvC8ZFK9ICWtr4%2Fimage.png?alt=media&amp;token=1a02e567-4d24-420d-a6c2-eca322c772bf" alt=""><figcaption></figcaption></figure>

**Direct Message** — send a private message directly to the player. The message appears in their in-game chat and is visible only to them.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FixHvsAZGWpM1mHhh4qRL%2Fimage.png?alt=media&amp;token=c8914cf3-67fb-4331-90d4-71b998bbcfc6" alt=""><figcaption></figcaption></figure>

**Sanction History** — complete list of sanctions applied to the player: notes, recommendations, warns, kicks, and bans.

**Appeals** — accessible to administrators and above. Includes a clipboard button to copy a direct link to the player's Madonn'Admin page, which can be sent to the player so they can submit an appeal themselves.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZFrOUQYclG-TcBhNplzfnU2XlV87TzxG8wwEsq8CMt0F8qgLajKq417d6OniE25iwzvqlxq4-DUu8mc5cIgqDzPX8W-9KOuvY4rBLM0lWFfwoq7PX3esKcKLBt4mbk6r_SpFZ?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

**Logs** — all actions performed by the player on the server, with date/time, action type, and additional context. Default display: 10 logs, expandable to 100.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FdARgCiueI3hTD3xYxhSr%2Fimage.png?alt=media&amp;token=f62f9d9a-6464-4e3f-b8e6-3e0c8f5b5a69" alt=""><figcaption></figcaption></figure>

**Apply a Sanction** — directly from the profile:

* **Note** — add a personal annotation to the player's profile
* **Recommendation** — adds a positive note that influences the player's trust score
* **Kick** — apply an expulsion with a reason
* **Warn** — apply a warning with a reason
* **Ban** — apply a ban with a configurable duration (from minutes to permanent/community ban) and a reason

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeMaHjKKEMb9ufI3WEi3Azmclu2Mn0YPY6dXQeC5pg_o-8Ps-lVD3Zx1dbJn8oqPY1lRfgb_dBs69-IRm2EX3SIQnz04SqeXzALtyydaoWT0xa8zYMZwp9S016aPEaqquHXSPDX?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>


# Staffs

The Staffs section provides a complete overview of moderation activity and staff performance, divided into two subsections.

***

## Staff Actions

A detailed table of all sanctions applied by staff members across the server. Columns include:

| Column          | Description                                              |
| --------------- | -------------------------------------------------------- |
| **Date**        | Exact date the sanction was applied                      |
| **Server Name** | Server on which the sanction was applied                 |
| **Sanction**    | Type of sanction (Note, Recommendation, Warn, Kick, Ban) |
| **Player**      | Nickname of the sanctioned player                        |
| **Staff**       | Nickname of the staff member who applied the sanction    |
| **Reason**      | Reason for the sanction                                  |

You can filter the displayed sanctions by type: All, Notes, Recommendations, Warns, Kicks, or Bans.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FJ50lk5gV9m28SU6y2mr9%2Fimage.png?alt=media&amp;token=10b53c6b-48ce-4686-baeb-3121a3336dbf" alt=""><figcaption></figcaption></figure>

***

## Staff Statistics

Performance and activity analysis for all staff members, divided into two views.

**Last 7 days** — a condensed view of moderation actions carried out over the past week, useful for quick weekly reviews.

**Global statistics** — all actions since the beginning of the staff member's activity on the server, providing a long-term view of performance and contribution.

Both views use the same columns:

| Column              | Description                                 |
| ------------------- | ------------------------------------------- |
| **Staff**           | Nickname of the staff member                |
| **All Sanctions**   | Total sanctions applied, all types combined |
| **Notes**           | Number of notes added                       |
| **Recommendations** | Number of recommendations issued            |
| **Warn**            | Number of warnings given                    |
| **Kick**            | Number of expulsions carried out            |
| **Ban**             | Number of bans applied                      |

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FS3pdOU4hAlWxaIG4tqzo%2Fimage.png?alt=media&amp;token=bce774a1-b11d-4f1a-a027-040ec279f2d7" alt=""><figcaption></figcaption></figure>

***

## Reports Statistics

The web dashboard provides server administrators with a **complete overview of all reports** submitted on the server. This statistics panel is designed to help staff teams monitor their activity, identify trends, and optimize their response efficiency.

***

### Accessing the Dashboard

The statistics panel is accessible from the **web administration dashboard**. Navigate to the **Staff Management** section, then open the **Report Statistics** tab.

The page is divided into **four main sections**: Global Statistics, Complete Statistics, Last Week Statistics, and a Recent Tickets log.

***

### Global Statistics

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FBsPFIrru1yh2hjd6QwZb%2Fimage.png?alt=media&amp;token=7b14003c-abd6-4d30-81fb-05f71e603fc8" alt=""><figcaption></figcaption></figure>

The **Global Statistics** table gives a high-level overview per server. Each row represents a server and displays the following columns:

| Column               | Description                                                         |
| -------------------- | ------------------------------------------------------------------- |
| **Servers**          | The name of the server                                              |
| **T. / Month**       | Average number of reports per month                                 |
| **T. / Week**        | Average number of reports per week                                  |
| **T. / Day**         | Average number of reports per day                                   |
| **T. / Staff**       | Average number of reports handled per staff member                  |
| **Average Duration** | Average time a report stays open before being closed                |
| **Reaction Time**    | Average time before a staff member takes charge of a report         |
| **% Quick Reports**  | Percentage of reports submitted as quick reports vs. custom reports |

> 💡 This table is **sortable by column** and includes a search field to filter results.

***

### Complete Statistics

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F5PUlsRpcXmUxzkpUKUUl%2Fimage.png?alt=media&amp;token=e9339450-bd1d-4e8f-b680-06eda771c31a" alt=""><figcaption></figcaption></figure>

The **Complete Statistics** table breaks down report activity **per staff member** across all time. Each row represents a staff member and includes:

| Column               | Description                                                 |
| -------------------- | ----------------------------------------------------------- |
| **Staff**            | Staff member's username                                     |
| **T. Completed**     | Total number of reports handled since the beginning         |
| **T. / Month**       | Average reports handled per month                           |
| **T. / Week**        | Average reports handled per week                            |
| **T. / Day**         | Average reports handled per day                             |
| **T. / Day Present** | Average reports handled per day the staff member was active |
| **Average Duration** | Average time spent per report                               |
| **Reaction Time**    | Average time before taking charge of a report               |

> 💡 This table is **sortable by column** and includes a search field. It supports **pagination** to browse through all staff members.

***

### Last Week Statistics

The **Last Week Statistics** table focuses on the **previous week's activity** per staff member. It uses the same columns as the Complete Statistics table but is scoped to last week only, making it ideal for **weekly team reviews**.

***

### Weekly History

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FKOCadO9Ka0t4RjnqBaVK%2Fimage.png?alt=media&amp;token=fdbf0361-4189-4349-89bf-9d4489da686c" alt=""><figcaption></figcaption></figure>

Below the last week table, the **Weekly History** table displays a **week-by-week breakdown** of each staff member's report activity. Each column represents a date range (e.g. `23/03/2026 → 05/04/2026`) and shows the number of reports handled that week.

The evolution indicators use **color-coded arrows** to highlight trends:

| Indicator | Meaning                                  |
| --------- | ---------------------------------------- |
| 🟢 `↑ +X` | Increase compared to the previous period |
| 🔴 `↓ -X` | Decrease compared to the previous period |
| —         | No activity or no change                 |

> 💡 This view is particularly useful for identifying **inactive periods** or **sudden spikes** in a staff member's activity over time.

***

### Recent Tickets

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F5oWVlCxksUGWrWOrBVkO%2Fimage.png?alt=media&amp;token=c8c9e018-1a3a-48d9-ad88-cab6cdfc7e6f" alt=""><figcaption></figcaption></figure>

At the bottom of the page, the **Recent Tickets** table lists the latest reports submitted across all servers, ordered from most recent to oldest. For each ticket, the following information is displayed:

| Column                 | Description                                                     |
| ---------------------- | --------------------------------------------------------------- |
| **#**                  | Unique report ID (auto-incremented)                             |
| **Name**               | The message or subject of the report as submitted by the player |
| **Date / Time**        | Exact timestamp of when the report was submitted                |
| **Opened By**          | The player who submitted the report                             |
| **Taken In Charge By** | The staff member who picked up the report                       |
| **Closed By**          | The staff member who closed the report                          |
| **Duration**           | Total time the report was open                                  |

> 💡 This table supports **pagination** and a **search field** to quickly find a specific report by name, player, or staff member.

***

> 💡 **Tip:** Use the **Weekly History** table combined with the **Global Statistics** to generate accurate weekly reports for your moderation team and identify which servers or staff members need attention.

***


# Appeals

The Appeals section is accessible to **administrators and above** only. It centralizes requests from players seeking to challenge or lift a sanction (ban lift, warning removal, etc.).

***

## Open Appeals

A table of all pending appeals, with the following columns:

| Column             | Description                                             |
| ------------------ | ------------------------------------------------------- |
| **Request ID**     | Unique identifier for the appeal                        |
| **Player Name**    | Nickname of the player who submitted the request        |
| **Sanction Type**  | Nature of the sanction being contested                  |
| **Request Status** | New (awaiting handling) or In Progress (being reviewed) |
| **Request Date**   | Date and time the appeal was submitted                  |

Players can submit an appeal by clicking the appeal icon on their sanction in their Madonn'Admin player locker. By default, an appeal can only be submitted **2 months** after the sanction was applied (configurable in Madonn'Admin settings).

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FjiwrN0YVllx71JIaU2oy%2Fimage.png?alt=media&amp;token=656e1e51-f48e-4414-9fc7-bdd401b0aa5c" alt=""><figcaption></figcaption></figure>

***

## Appeal Detail Page

Clicking on an appeal opens a dedicated page organized into five blocks.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FP737WGLqiEzHanYi5KvA%2Fimage.png?alt=media&amp;token=67f56e21-7ad1-49be-845a-29260b6790b8" alt=""><figcaption></figcaption></figure>

**Player Information** — identifying data (nickname, Discord, Steam, FiveM license, Xbox ID) and general statistics (first login, last login, total playtime).

**Sanction Information** — type of sanction, expiration date if applicable, time remaining before the ban expires, the staff member who applied it, and the reason.

**Appeal Information** — the type of appeal chosen by the player, current status, and their detailed written argument.

**Player Records** — full sanction history: notes, recommendations, warns, kicks, and bans. Administrators can also see the player's previous appeals.

**Conclusion** — two buttons to finalize the decision:

* ✅ **Accept** — validate the appeal and lift or reduce the sanction
* ❌ **Refuse** — reject the appeal

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeVYfyRUJMVyY3E38tn8A8fm1T5_cDjFd7n-Ax2nqJjuhlgcpW-Cqa11RctYFssmiUHDyJXOjLpJVcre9tgUF99VTqv9UvKKStmyB91jVdusgSa867ISIvQlxXCs23UBl8z5tt2MA?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Closed Appeals

A historical archive of all processed appeals, with the following columns:

| Column              | Description                     |
| ------------------- | ------------------------------- |
| **Request ID**      | Unique identifier               |
| **Player Name**     | Nickname of the player          |
| **Sanction Type**   | Nature of the original sanction |
| **Status**          | Accepted or Refused             |
| **Resolution Date** | Date the appeal was finalized   |

The table is sortable alphabetically, by request type, or by resolution date. Clicking on a row opens the full appeal detail page for reference.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FxIKpmfWsIpgEpA4cGYNC%2Fimage.png?alt=media&amp;token=9e0549e2-c388-4dbf-a6d4-80cbe88bf168" alt=""><figcaption></figcaption></figure>


# Logs

The logs interface provides a global view of all player activity across the server, presented as a structured table. Unlike player profile logs which are scoped to a single user, this section covers **all players** at once.

***

## Table Structure

| Column              | Description                                                                          |
| ------------------- | ------------------------------------------------------------------------------------ |
| **Date / Time**     | Exact timestamp of the action                                                        |
| **Player Nickname** | The player who performed or was involved in the action                               |
| **Player Action**   | Description of the event (connection, death, injury, etc.)                           |
| **Details**         | Additional context — for example, the nickname of another player involved in a fight |

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FtX2ZykHitxusFZ1grUVT%2Fimage.png?alt=media&amp;token=9403cdda-8f3c-4b5e-a967-90f4f40b7fb4" alt=""><figcaption></figcaption></figure>

***

## Sorting & Filtering

* Sort data by any column in ascending or descending order
* Filter by event type to narrow down specific categories of actions
* Search by player nickname for targeted investigations

This makes it straightforward to spot anomalies, track a specific player's activity timeline, or analyze behavior patterns across the server.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcAg4yRzD--ppQT-CnMWLDUFQAavHoxZU4iud0twqJRM_Kx5S2jKfKkZ6L7iBhIS3vPPYvAOi_fQB2sfZhYAsOhCEjA64n_ejmQqMTaG1v6w9VxkHnnSgnaRdrqJulLSoIt7yNDDA?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>


# In Game Dashboard

When you want to activate your moderation mode in-game, press `F10` (default key, configurable in settings). Once pressed, you are immediately redirected to the moderation interface. Your character is automatically placed in **god mode** (invisible), and an indicator appears above your head displaying `[ACTIVE STAFF] Your nickname` so other staff members can identify you.

The rank management system enforces a strict hierarchy: lower-ranked members such as moderators cannot access data, tools, or actions reserved for administrators or higher ranks.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf_YC9G4g7m3NvVNquWJI_hM3GtwuVFoAQbTVUgiMewWup6uhYS2AonufSmqXCHq37YXq9ZoL5-4Zbvv1fmCxvwQ4Hgd3TZ5DoBBzTHSXnEpViBlNtahgF_nivKmTQq-ryh72pjjg?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Sidebar Navigation

The left sidebar contains a set of icons giving quick access to all major sections of the dashboard.

| Icon        | Section                                                                      |
| ----------- | ---------------------------------------------------------------------------- |
| 🏠 House    | **Home** — default landing page, connected staff list, recent announcements  |
| 👥 Players  | **Player list** — all connected players, profiles, and direct action buttons |
| 📋 Logs     | **Server logs** — filterable history of server events                        |
| 🎫 Reports  | **Report system** — manage player reports in real time                       |
| ⚙️ Settings | **Settings** — delete props/vehicles, toggle god mode and underwater mode    |
| 🔄 Reload   | **Reload** — refresh the current page data                                   |

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeU6021fO6P9nKnqZKeOD0hNaLhd8f2ZiTklfZ8cfwwIQ7qTeKtL78gS3r7FqedN-ZmsrYlX-7bzu8DElXj9oocaF08l5qyudFcQQ47LaaU5iy2NUEDptCiq_R8ZNqsIeEfju09qQ?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Pages

* [🏠 Home Interface](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/home-interface)
* [👥 Players List](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/players-list)
* [📋 Logs](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/logs)
* [🎫 Report System](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/report-system)
* [⌨️ In-Game Commands](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/in-game-commands)
* [⚙️ Settings](/paid-scripts/madonnadmin/how-to-use-it/in-game-dashboard/settings)


# Home interface

When you activate the menu to take your shift as a moderator, the first page that appears is a detailed dashboard providing an overview of essential information. This page centralizes three key elements.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-36676282583031e93665f6e13c64115b930f8407%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Connected Staff

A complete list of staff members currently connected to the server, presented in a clear table with the following columns:

* **Nickname** — quick identification of each staff member
* **Rank** — moderator, administrator, or any other defined role
* **Status** — whether they are in active moderation mode or in roleplay mode

***

## Latest Announcements

A section dedicated to the latest announcements posted by managers or team leaders. These can include reminders, procedure updates, or specific guidelines to follow.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddujk1lx5BpxVc3g3Ukki3LsNTLbH28tihP-D0sGcIHSjzMbtEA2dpLyWgTENNBi0xsXBjxE6Ox5f0ld1pdDT1PJfRHAnKhLLHC8PVoRsReRx-ojmMjuroWYkLwvkExCd4qGLuZA?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

## Player Flag Graph

An interactive visual graph compiling the **flags of players currently connected to the server**. This graph provides an immediate overview of player behavior, highlighting potential problematic situations or notable infractions. Staff members can use it to prioritize their interventions based on severity.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcdc9dbJbJ5dWxdQ9YkDnjRpWPeMaag6C3-2aUrWYo7AscNkjXfppAFjs-4nD8pA9k2yG5WuSZkw7AM8MWtLV_kboOxydRIU2VFEoCqXpEzZ7cMspTaxt_cafdfIIrRQ8x7d7M-sQ?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>


# Players list

The player list interface displays all players currently connected to the server in a detailed table. For each player you can see their nickname, in-game ID, cumulative playtime, first connection date, and a summary of their sanctions (warns, kicks, bans).

Clicking on a player's nickname opens their **Madonn'Admin profile** directly within the in-game menu, where you can view detailed statistics, connection history, and past sanctions.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-17e215ce461347c7737e75e0ed49c70bb497f722%2Fimage%20(6)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Direct Action Buttons

Each player profile includes a series of **action buttons** for common moderation interventions, executable in one click without typing any command.

The following actions are available by default and can be fully customized in the resource configuration files:

| Button              | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| 🚀 **Goto**         | Teleport to the player's position                            |
| 🚗 **Goto Vehicle** | Teleport to the player's vehicle                             |
| 🔄 **Bring**        | Teleport the player to your position                         |
| ↩️ **Return**       | Send the player back to their original position              |
| 💊 **Heal**         | Fully restore the player's health                            |
| 💉 **Revive**       | Revive the player                                            |
| 💀 **Kill**         | Kill the player                                              |
| 🧊 **Freeze**       | Freeze or unfreeze the player in place                       |
| *(+ custom)*        | Any additional action configured by the server administrator |

> 🔧 All quick action buttons are configurable — administrators can add, remove, or modify them freely in the resource configuration files, including the label, the associated action, and the required permission level.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-7c5a5f832fb3d3e601768827dc6b35575f487dcf%2Fimage%20(7)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Sanctions

The player profile also includes a detailed view of their **sanction history** (warns, kicks, bans). Administrators can apply new sanctions directly from this in-game panel, using the same options available on the web dashboard.


# Logs

The logs interface provides a detailed and organized view of server events, structured similarly to the web version of Madonn'Admin. The information is presented in a table with the following columns:

| Column              | Description                                 |
| ------------------- | ------------------------------------------- |
| **Date / Time**     | Exact timestamp of when the action occurred |
| **Player Nickname** | The player involved in the event            |
| **Player Action**   | Description of the event or interaction     |
| **Details**         | Additional context or circumstances         |

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-7bacff168bbc9ac96cab44b62d63e58f52ee4c11%2Fimage%20(8)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Filtering

You can filter logs by specific categories to narrow down what you are looking for:

* Connections
* Chat messages
* Weapon shots
* Injuries (received or inflicted)
* Player deaths
* Explosions

This filtering system makes it straightforward to track specific incidents, assess player behavior, or detect suspicious activity.


# Report System

The in-game report system allows players to quickly contact the staff team directly from the game, without leaving their session. Staff members are instantly notified and can manage reports through the in-game administration panel.

***

## How to Submit a Report

Any player can open the report interface at any time by using the following command:

```
/report
```

The report flow works in the following steps:

**1. Type selection** — A first window opens asking the player to choose the type of report (quick report or custom report).

**2. Screenshot** — Once the type is selected, a **screenshot of the player's current view is automatically captured** and attached to the report.

**3. Report content** — The report window then opens, displaying the screenshot alongside the report content.

**4. Floating notification** — When the player **closes the report window**, a **floating notification widget appears on the left side of the screen**, keeping them informed of any updates in real time.

***

## Report Types

Players can choose between two types of reports depending on their situation:

### Quick Reports

Quick reports are **pre-configured short messages** defined by the server administrators in the configuration files. They allow players to send a report in just one click, without typing anything.

> Quick reports are fully customizable — server administrators can add, edit, or remove them freely in the config.

### Custom Reports

Custom reports allow players to **type a detailed message** to describe their issue precisely. This is the recommended option for complex situations requiring context.

***

## What Happens After Submitting?

Once the report is submitted and the window is closed:

* 🔲 A **floating notification widget appears on the left side of the screen**, keeping the player updated without interrupting gameplay
* 🔔 Staff members are **notified in-game** and can see the new report in the administration panel
* 💬 The player will be **updated in real time** through the floating widget whenever:
  * Their report is **taken in charge** by a staff member
  * A staff member **sends a message** in response

***

## Communication with Staff

The report system includes a **built-in messaging system** between the player and the staff member handling the report. Both parties can exchange messages directly within the report interface, without needing to use any external tool.

***

## Report Status

Each report goes through the following status lifecycle:

| Status             | Description                                                                |
| ------------------ | -------------------------------------------------------------------------- |
| 🟡 **New**         | The report has been submitted and is waiting for a staff member to take it |
| 🔵 **In Progress** | A staff member has taken charge of the report and is handling it           |
| 🟢 **Closed**      | The report has been resolved and closed by the staff                       |

Players are notified at each status change via the **floating notification widget** on the left side of the screen.

***

## Staff Side

Staff members receive a **real-time in-game notification** when a new report is submitted. They can then:

* View the report details including the **automatic screenshot**
* Read the player's message
* **Change the report status** (Pending → In Progress → Closed)
* **Reply directly** to the player through the messaging system
* **Execute quick actions** on the reported player directly from the report panel
* Manage all active reports from the **in-game administration panel**

### Quick Action Buttons

Staff members have access to **configurable quick action buttons** directly within the report panel. These allow them to apply common moderation actions on a player in one click, without having to type any command.

The following actions are available by default and can be fully customized in the resource configuration files:

| Button         | Description                                                  |
| -------------- | ------------------------------------------------------------ |
| 🚀 **Goto**    | Teleports the staff member to the reported player            |
| 🔄 **Bring**   | Teleports the reported player to the staff member            |
| ↩️ **Return**  | Sends the reported player back to their original position    |
| 🧊 **Freeze**  | Freezes or unfreezes the reported player in place            |
| 💊 **Heal**    | Fully restores the reported player's health                  |
| 💀 **Kill**    | Kills the reported player                                    |
| 🔧 **Fix VCL** | Repairs the reported player's current vehicle                |
| *(+ custom)*   | Any additional action configured by the server administrator |

> 🔧 **All quick action buttons are configurable** — server administrators can add, remove, or modify them freely in the resource configuration files, including the button label, the associated action, and the required permission level to use them.

***

> 💡 **Tip for players:** Always use a **custom report** if your issue requires explanation. The automatic screenshot will help staff understand your situation immediately


# In Game Commands

In addition to the dashboard interface, several chat commands are available for quick in-game interventions.

***

## `/goto [ID]`

Teleports you directly to a specific player. Replace `[ID]` with the player's in-game ID.

```
/goto 5
```

***

## `/bring [ID]`

Teleports a player to your current position. You can bring multiple players at once by separating their IDs with spaces.

```
/bring 10
/bring 10 20 30
```

***

## `/return [ID]`

Returns a player to their position before they were teleported. Useful for sending a player back after a moderation conversation without leaving them disoriented.

```
/return 10
/return 10 20 30
```


# Settings

The settings panel gives access to tools for cleaning the server environment and managing your moderation state.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeChNFWLVoF5lcukWURTIcLo_7YhOtfGciQ4tB6rvjrpXQEXmlCXD1QtNoUC_BPJweKkvnxsd28YGcef5iWE1uAZ9YRJMGrtphveDY44mgOLdIFGQ65x_l52ssx-fG6uIqRkDVDNg?key=fT9iLy8cgk4ZyBMLYLd8yr47" alt=""><figcaption></figcaption></figure>

***

### Props & Vehicles Deletion

Define a **radius** around your position and delete all props or vehicles within that area in one click.

* **Objects** — all prop-type objects generated on the server, whether dropped by players or spawned by scripts
* **Vehicles** — player vehicles and NPC-generated or abandoned vehicles

Once the radius is configured, click the arrow in the purple frame to apply the deletion. This is particularly useful during events or specific interventions requiring localized cleanup.

***

### Moderation State Options

Two additional options are available depending on your permission level:

* **Underwater mode** — hides your presence as active staff from players
* **God mode** — toggle god mode on or off (enabled by default when switching to active staff)


# Discord Functionalities

## 💬 Available Commands

Once installed, the bot registers the following slash commands on your Discord server:

### `/infojoueur`

Retrieves information about a specific player from your Madonn'Admin community. The bot returns a detailed embed including:

* FiveM username
* Total playtime
* Join date and last connection date
* License identifiers
* A direct link to their **Madonn'Admin profile**
* A **sanction preview** button
* An **Apply a sanction** button for quick moderation actions directly from Discord

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FzTGaKFZn1vBLRnk09649%2Fimage.png?alt=media&amp;token=47dfa5f5-db22-43da-8908-f191467754a5" alt="" width="240"><figcaption></figcaption></figure>

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FICLornmzQxrS5D0pvwmC%2Fimage.png?alt=media&amp;token=5ea0110c-af57-4042-b79c-579bf5f3580a" alt="" width="327"><figcaption></figcaption></figure>

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F8l86sgMjCPdtlvkdti9u%2Fimage.png?alt=media&amp;token=da37d3e3-815f-4d3d-95c4-ac979b3b1ab0" alt="" width="367"><figcaption></figcaption></figure>

### `/profil`

Displays your own Madonn'Admin profile — your linked player information, rank, and community association.

### `/statut embed`

Sends a **permanent status embed** in the current channel. This embed automatically updates to reflect the live status of your FiveM servers, showing:

* Server name
* Online / Offline status
* Number of connected players
* The F8 connection command (`connect xxx`)
* Last update timestamp and resource version

> 💡 This command is ideal for a dedicated `#server-status` channel. The embed updates automatically — no need to resend it.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FgNfsP1ME0raO73kpjBhQ%2Fimage.png?alt=media&amp;token=6d681cbb-874c-4c50-a66b-5f3fe10a4f2a" alt=""><figcaption></figcaption></figure>

### `/statut obtenir`

Retrieves the current status of your servers on demand, without posting a permanent embed. Useful for quickly checking server status in any channel.


# Exports & Events

Madonn'Admin exposes client-side and server-side exports, as well as a server-side HTTP API and custom log events for integration with other resources.

***

## 🖥️ Client-side Exports

### GetStaffRank

Returns the staff rank ID of the local player.

```lua
local rank = exports['MS_MadonnAdmin']:GetStaffRank()
-- Returns: number
-- -1 = Super Admin
--  0 = Not a staff member
--  1+ = Staff rank (lower number = higher authority)
```

#### Example

```lua
local rank = exports['MS_MadonnAdmin']:GetStaffRank()
if rank ~= 0 and rank ~= nil then
    print("This player is a staff member (rank " .. rank .. ")")
end
```

> This export is used by other MadonneStudio resources (e.g. MS\_Delete\_Gun with `MADONNADMIN = "auto"`) to detect whether the local player has staff access.

***

### IsPlayerTrusted

Returns whether the local player is considered trusted by the Madonn'Admin trust system.

```lua
local trusted = exports['MS_MadonnAdmin']:IsPlayerTrusted()
-- Returns: boolean
```

A player is considered **untrusted** if they have any of the following flags active:

* `flag_last_chance`
* `flag_sanction_lover`
* `flag_untrusted_plus`
* `flag_untrusted`

#### Example

```lua
local trusted = exports['MS_MadonnAdmin']:IsPlayerTrusted()
if not trusted then
    -- Apply restrictions for untrusted players
end
```

***

## 🌐 Server-side Exports

### GetStaffLevelServerSide

Returns the staff rank ID of a given player by their server ID.

```lua
local rank = exports['MS_MadonnAdmin']:GetStaffLevelServerSide(source)
-- Returns: number (same scale as GetStaffRank)
-- Returns 0 if the player is not a staff member or not found
```

#### Example

```lua
AddEventHandler("playerConnecting", function(name, setReason, deferrals)
    local rank = exports['MS_MadonnAdmin']:GetStaffLevelServerSide(source)
    if rank ~= 0 then
        print(name .. " is connecting as a staff member (rank " .. rank .. ")")
    end
end)
```

***

### GetStaffStatus

Returns whether a given player is currently in **active moderation mode** (i.e. they have activated their staff mode in-game).

```lua
local active = exports['MS_MadonnAdmin']:GetStaffStatus(source)
-- Returns: boolean
```

#### Example

```lua
-- Check if a staff member is actively moderating before assigning them a task
local isActive = exports['MS_MadonnAdmin']:GetStaffStatus(source)
if isActive then
    print("Staff member is currently in active moderation mode")
end
```

***

## 📡 Custom Log Event

Madonn'Admin exposes a custom log event that allows any resource to push entries into the Madonn'Admin log system, including Discord webhook delivery and automatic screenshots.

```lua
TriggerEvent('MadonnAdmin:SimpleLog', type, playerA, detail, playerB, text, colorEmbed, screenshot, webhookAddress)
```

| Parameter        | Type              | Description                                                                                                     |
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------- |
| `type`           | `number`          | Log type. Use `8` for custom logs                                                                               |
| `playerA`        | `number`          | Server ID of the primary player                                                                                 |
| `detail`         | `string`          | Detail text of the log                                                                                          |
| `playerB`        | `number` \| `nil` | Server ID of a second player (e.g. the attacker), or `nil`                                                      |
| `text`           | `string` \| `nil` | Custom action label to display in the embed                                                                     |
| `colorEmbed`     | `number`          | Discord embed color in hex (e.g. `0xFF0000`)                                                                    |
| `screenshot`     | `boolean`         | If `true`, automatically captures a screenshot of `playerB` (or `playerA`) and attaches it to the Discord embed |
| `webhookAddress` | `string`          | Discord webhook URL to send the log to                                                                          |

#### Example

```lua
-- Log a custom event with a screenshot
TriggerEvent(
    'MadonnAdmin:SimpleLog',
    8,                          -- type 8 = custom log
    source,                     -- playerA
    "Used a forbidden item",    -- detail
    nil,                        -- no playerB
    "Custom Action",            -- action label
    0x662d91,                   -- embed color (purple)
    true,                       -- take screenshot
    "https://discord.com/api/webhooks/your-webhook-here"
)
```

***

## 🔔 Custom Notification Handler

When `NotificationSystem` is set to `"custom"` in `config/cfg_main.lua`, edit `client/custom/cl_functions.lua` to implement your own notification:

```lua
function CustomNotify(text)
    -- Your custom notification code here
    -- Example with okokNotify:
    exports['okokNotify']:Alert("MadonneStudio", text, 5000, 'info', true)
end
```

***

## 📋 Custom Log Handler

To add your own persistent log logic, edit the provided custom log files:

**Client-side** — `client/custom/cl_logs.lua`:

```lua
if LOGS.LogsEnabled.Other then
    CreateThread(function()
        -- Your custom client-side log code here
    end)
end
```

**Server-side** — `server/custom/sv_logs.lua`:

```lua
if LOGS.LogsEnabled.Other then
    CreateThread(function()
        -- Your custom server-side log code here
        -- Use TriggerEvent('MadonnAdmin:SimpleLog', 8, ...) to push to Discord
    end)
end
```


# Common Errors

## 🔴 You lack the required entitlement to use MS\_MadonnAdmin

This message indicates that your server does not have the necessary entitlement to start the resource. This is related to FiveM's **Escrow** protection system.

Check the following points one by one:

* ✅ The **CFX Portal key** listed in your `server.cfg` does not contain any typing error
* ✅ The CFX Portal key belongs to the **FiveM account that was used to purchase or claim** the resource
* ✅ The resource has been **successfully claimed** on the [CFX Portal](https://portal.cfx.re/)
* ✅ The CFX Portal key linked to your server **belongs to you**, and not to your hosting provider

> ⚠️ Some hosting providers include a shared CFX Portal key as part of their offers. A key that does not belong to you will block the use of **any Escrow-protected resource**, without exception. Always use your own personal key.

***

## 🔴 Error 0xA01 — Failed to initialize Madonn'Admin

```
[ERROR - #0xA01] An error has occured during the loading of MadonnAdmin. Please check your Server Token in the config.lua
```

**Cause:** The Madonn'Admin platform could not be reached, or the Server Token is invalid.

**Fix:**

* Verify that `Server_Token` in `config/cfg_main.lua` matches exactly the token shown in your community settings on `madonnadmin.com`
* Make sure your FiveM server has outbound internet access to `madonnadmin.com`
* If the platform is temporarily unavailable, the resource will retry automatically every 5 seconds

***

## 🔴 Error 0xA02 — Community not found or subscription inactive

```
[ERROR - #0xA02] An error has occured during the loading of MadonnAdmin. Please check your Server Token in the config.lua
```

**Cause:** The Server Token is recognized but the associated community cannot be loaded. This usually means the subscription is inactive or the community has been deleted.

**Fix:**

* Check that your subscription is active on `madonnadmin.com`
* Verify that the server is correctly configured in your community dashboard with the right IP address
* If your IP has changed, update it in the Madonn'Admin dashboard

***

## 🔴 Error 0xC01 — Player blocked from connecting

```
[ERROR - #0xC01] Player X is not verified through Madonn'Admin and will not be connected
```

**Cause:** Madonn'Admin is offline or unreachable, and `Failure_Override` is set to `false` in `config/cfg_main.lua`, so players are blocked from joining.

**Fix:** Set `Failure_Override = true` to allow players to connect even when Madonn'Admin is temporarily unavailable:

```lua
Failure_Override = true,
```

> 💡 When `Failure_Override` is `true`, players will see a brief warning message but will still be able to connect. Bans and permission checks will be suspended until the connection is restored.

***

## 🔴 Error 0xC02 — No response from Madonn'Admin when loading permissions

```
[ERROR - #0xC02] No response received from Madonn'Admin
```

**Cause:** The platform did not respond when loading a player's permissions after they connected.

**Fix:** This is usually a temporary network issue. It resolves itself automatically on the next connection attempt. If it happens persistently, check that your server has stable outbound internet access.

***

## 🔴 The admin menu does not open

**Cause 1:** The player does not have a staff rank assigned in Madonn'Admin.

**Fix:** Go to **Team Staffs → Manage Staffs** in the dashboard, select the correct server, and assign a role to the player.

**Cause 2:** The player has a rank assigned but has not connected since the assignment.

**Fix:** Have the player disconnect and reconnect to the server so their permissions are reloaded.

**Cause 3:** The key binding is conflicting with another resource.

**Fix:** Check the FiveM key bindings in **Settings → Key Bindings → FiveM** and look for the **"Open Admin Menu"** entry. Reset it to the configured key (`F10` by default).

***

## 🔴 Staff member has no permissions after being added

**Cause:** The player was added to the community but has not yet been assigned a role, or the role has no permissions enabled.

**Fix:**

* Go to **Team Staffs → Manage Staffs**, select the server, and assign the correct role to the player
* In **Roles**, verify that the role has the necessary permission toggles enabled (teleportations, spectate, god mode, etc.)
* Have the player reconnect to reload their permissions

***

## 🔴 Screenshots are not working

**Cause 1:** `screenshot-basic` is not installed or not started before `MS_MadonnAdmin`.

**Fix:** Install `screenshot-basic` and make sure it is ensured before `MS_MadonnAdmin` in your `server.cfg`:

```cfg
ensure screenshot-basic
ensure MS_MadonnAdmin
```

**Cause 2:** The Discord webhook in `config/module/cfg_screenshots.lua` is invalid or missing.

**Fix:** Replace the webhook URL with a valid one from your Discord server:

```lua
SCREENSHOTS = {
    ScreenshotBasicName = "screenshot-basic",
    DiscordWebhookToSaveScreenshots = "https://discord.com/api/webhooks/...",
}
```

***

## 🔴 Logs are not appearing in Discord

**Cause:** The Discord webhook URLs in `config/module/cfg_logs.lua` are set to `false` or are invalid.

**Fix:** Set valid webhook URLs for the log types you want to receive:

```lua
LOGS = {
    DiscordWebhook = {
        Connections = "https://discord.com/api/webhooks/...",
        Chat        = "https://discord.com/api/webhooks/...",
        Shots       = "https://discord.com/api/webhooks/...",
        -- etc.
    }
}
```

Set any entry to `false` to disable that log type's webhook.

***

## 🔴 Anti-cheat is not running *(Silver & Gold only)*

**Cause 1:** `ModuleAnticheat` is set to `false` in `config/cfg_main.lua`.

**Fix:** Set it to `true`:

```lua
ModuleAnticheat = true,
```

**Cause 2:** Your subscription tier is **Bronze**. The anti-cheat module requires **Silver or Gold**.

**Fix:** Upgrade your subscription at `madonnadmin.com`.

***

## 🔴 Sanction returns "Error 0xS14" or "Error 0xS18"

```
[ERROR - #0xS14] An error occured while applying sanction to X
```

**Cause:** The Madonn'Admin API returned an error when applying the sanction. This can happen if the targeted player's profile is not yet fully synchronized.

**Fix:**

* Make sure the target player has connected at least once and their profile exists on `madonnadmin.com`
* If the error persists, contact support with the full error message

***

## 🔴 Ban screen not showing to a banned player

**Cause:** The `Failure_Override` option allowed the player through before the ban check completed, or the player's identifiers changed.

**Fix:**

* Check that the player's ban is correctly registered on `madonnadmin.com` under their profile
* Verify that the player is connecting with the same identifiers (Steam, FiveM, etc.) that were used when the ban was applied

***

## 💬 Still having issues?

If you are still experiencing problems after following the steps above, feel free to reach out to us:

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Madonne DOJ

Welcome to the complete documentation for **Madonne DOJ**, a comprehensive judicial and police management system for FiveM servers.

<figure><img src="https://github.com/DylanPageot/DocumentationAddonsScripts/blob/main/paid-scripts/madonnedoj/.gitbook/assets/banner.png" alt=""><figcaption></figcaption></figure>

## About Madonne DOJ

**Madonne DOJ** is a complete FiveM script that enables the management of investigation folders, documents, warrants, examinations, citizen records, and violations for police and justice services.

### Main Features

* 📁 **Complete investigation folder management** - Create, organize, and track investigation cases
* 📄 **Document creation and modification** - Generate and manage all types of legal documents
* ⚖️ **Arrest and search warrant system** - Issue warrants with proper judicial oversight
* 🎤 **Examination management** - Record interrogations of suspects and witnesses
* 📋 **Citizen criminal records** - Maintain comprehensive criminal history database
* 🚨 **Violations catalog** - Manage and categorize criminal offenses
* 👥 **Multi-service management** - Support for multiple agencies (LSPD, LSSD, FIB, DOJ, etc.)
* 🔐 **Advanced role-based permissions** - Granular access control using bitmask system
* 🌐 **Multilingual interface** - French and English included, easily extensible
* 📊 **User-personalized dashboard** - Each officer has their own customized view

***

## Quick Links

* [Installation Guide](/paid-scripts/madonnedoj/installation) - Get started with Madonne DOJ
* [Configuration](/paid-scripts/madonnedoj/configuration) - Configure the script for your server
* [Permissions System](/paid-scripts/madonnedoj/configuration/permissions-system) - Understand and configure permissions
* [Internationalization](/paid-scripts/madonnedoj/configuration/adding-a-new-language) - Add new languages to the interface
* [Usage Guide](/paid-scripts/madonnedoj/usage) - Learn how to use the tablet interface
* [Support](/paid-scripts/madonnedoj/support) - Get help when you need it

***

**Madonne DOJ v1.0.0**

*Developed by M\_g for MadonneStudio © 2025 - All rights reserved*

[Discord](https://discord.gg/madonne) • [Website](https://madonnestudio.com) • [Email](mailto:contact@madonnestudio.com)


# Installation

This guide will walk you through the installation process of **Madonne DOJ** on your FiveM server.

## Prerequisites

Before installing Madonne DOJ, make sure you have:

* ✅ A **FiveM Server** up and running
* ✅ A **MySQL Database** configured

## Installation Steps

Follow these steps to install Madonne DOJ on your server:

### Step 1: Download the Resource

Download the `MS_MaodonneDOJ` resource and place it in your server's `resources` folder.

```
resources/
  └── MS_MaodonneDOJ/
```

### Step 2: Import the Database

Execute the SQL file to create the necessary database tables:

```sql
-- Execute the db.sql file in your MySQL database
```

You can import it using:

* **phpMyAdmin**: Import the `db.sql` file
* **MySQL Command Line**:

  ```bash
  mysql -u username -p database_name < db.sql
  ```
* **HeidiSQL** or any other database management tool

### Step 3: Configure the Script

Open the `config.lua` file and configure it according to your server's needs.

At minimum, you should configure:

```lua
CONFIG_MADONNE_DOJ = {
  OpenTabletCmd = "tablet", -- Command to open the tablet
  DebugMode = false, -- Set to true only for debugging
  LocaleUi = "en", -- "fr" or "en"
  
  Services = {
    -- Configure your police and justice services here
  },
  
  Webhooks = {
    WarrantView = "YOUR_DISCORD_WEBHOOK_URL_HERE"
  }
}
```

For detailed configuration options, see the [Configuration Guide](/paid-scripts/madonnedoj/configuration).

### Step 4: Add to Server Configuration

Add the resource to your `server.cfg` file:

```cfg
ensure MS_MaodonneDOJ
```

Make sure it's placed **after** your framework (ESX/QBCore) in the load order.

**Example:**

```cfg
ensure es_extended
ensure oxmysql
ensure MS_MaodonneDOJ
```

### Step 5: Restart Your Server

Restart your FiveM server to load the resource:

```bash
restart MS_MaodonneDOJ
```

Or restart the entire server if you prefer.

## Verification

To verify the installation was successful:

1. **Check the server console** for any errors
2. **Join your server** as a player
3. **Type the command** `/tablet` (or the command you configured)
4. The tablet interface should open successfully

## Troubleshooting

### The tablet won't open

* ✅ Check that you have the necessary permissions in your job/service
* ✅ Verify the command in `config.lua` matches what you're typing
* ✅ Check the server console for errors

### Database errors

* ✅ Ensure `db.sql` was imported correctly
* ✅ Check your database credentials
* ✅ Verify all tables were created

### Configuration errors

* ✅ Make sure your `config.lua` syntax is correct
* ✅ Verify all required fields are filled
* ✅ Enable `DebugMode = true` to see detailed logs

## Next Steps

Now that Madonne DOJ is installed, you should:

1. [**Configure your services**](/paid-scripts/madonnedoj/configuration/services-configuration) - Set up your police and justice departments
2. [**Learn how to use it**](/paid-scripts/madonnedoj/usage) - Understand the tablet interface
3. [**Set up language**](https://github.com/DylanPageot/DocumentationAddonsScripts/blob/main/paid-scripts/madonnedoj/broken-reference/README.md) - Configure your preferred language

***

Need help? Check our [Support page](/paid-scripts/madonnedoj/support) or join our [Discord](https://discord.gg/madonne).


# Usage Guide

This guide will help you understand how to use the Madonne DOJ tablet interface effectively.

## Opening the Tablet

To open the DOJ tablet, use the command configured in your `config.lua`:

```
/tablet
```

By default, this is `/tablet`, but your server administrator may have changed it.

{% hint style="info" %}
**Note:** Only players with assigned police or justice services can access the tablet.
{% endhint %}

## Interface Overview

The tablet interface is divided into two main parts:

### Login or Register ?

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-821ef2f91e6d67e53034e4fce1f549df2eb30ee9%2Fimage.png?alt=media" alt="Screenshot of the account creation screen"><figcaption><p>Account creation screen</p></figcaption></figure>

The first screen you will encounter is the account creation screen.

* Enter your role-play information (surname, first name, date of birth) and the department you wish to join.
* Click on ‘Submit profile’ and a request will be sent to the managers of the requested service.

> Administrators can also use the "Connect as a server admin" button to access their view.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-2b4a3ba9ab131c186bb5231f2944bb2c695848bb%2Fimage.png?alt=media" alt="Screenshot of the login screen"><figcaption><p>Login screen</p></figcaption></figure>

Once your request has been accepted, you will be able to log in to your profile. Simply select it and click on ‘Login’.

You also have the option to create other profiles (they are all linked to your Discord ID).

### Sidebar Menu (Left)

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-5f52cd49eafa9abc47acf917c652dca82b979fa9%2Fimage.png?alt=media" alt="Sidebar screenshot"><figcaption><p>Sidebar</p></figcaption></figure>

The sidebar contains navigation icons for all available sections:

* 📊 **Dashboard** - Your personal overview
* ⚙️ **Services** - Service administration
* 📁 **Investigations** - Case management
* ⚖️ **Warrants** - Warrant system
* 👤 **Records** - Criminal records
* 🚨 **Violations** - Offense catalog
* 🗄️**Archives** - Archived case viewing

{% hint style="info" %}
Click on your name to log out.
{% endhint %}

### Main Content Area (Right)

The main area displays the content for the selected section.

## Features by Section

### 📊 Dashboard

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-212df464fb2b7bb7fb708bcd1dd751f4645bb3f4%2Fimage.png?alt=media" alt="Dashboard screenshot"><figcaption><p>Dashboard</p></figcaption></figure>

Your personal dashboard shows:

* **My Investigations** - Cases you're assigned to
* **My Documents** - Documents you've created
* **My Examinations** - Interrogations you've conducted

**Quick Actions:**

* Click any item to open it
* See recent activity at a glance

***

### ⚙️ Services

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-450c3f10871abfdf52617277948f8996d866fcaf%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed vue of a service</p></figcaption></figure>

Manage service members and pending requests (Chiefs only).

**What you can do:**

* ✅ View service members
* ✅ Approve pending members
* ✅ Remove members from service
* ✅ Manage service roster

{% hint style="warning" %}
**Required Permission:** `MANAGE_SERVICES` (128)
{% endhint %}

**Service Management:**

1. View all current members
2. See pending join requests
3. Approve or deny requests
4. Remove officers from service

***

### 📁 Investigations

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-dce3f96fe4bcc6e4f01f9abb097ba93ca6f4177e%2Fimage.png?alt=media" alt="Screenshot of the main view of investigations tab"><figcaption><p>Investigations main view</p></figcaption></figure>

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-917f1fd67197fe94725ac88a8f552f897f5c1fa0%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed view of an investigation</p></figcaption></figure>

Manage investigation folders and cases.

**What you can do :**

* ✅ Create new investigation folders
* ✅ View all investigations (if you have access)
* ✅ Edit investigation details
* ✅ Assign officers to cases
* ✅ Assign services to investigations

{% hint style="warning" %}
**Required Permission:** `MANAGE_FOLDERS` (1)
{% endhint %}

{% hint style="info" %}

* The investigations you are responsible for appear in purple.
* You only have access to your own investigations or those of your department.
  {% endhint %}

**How to create an investigation:**

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-a6cc5c6e31363b73a73045bd8fc716fdf5930e16%2Fimage.png?alt=media" alt="Creating an investigation" width="563"><figcaption><p>Creating an investigation</p></figcaption></figure>

1. Click the **"+"** button
2. Enter investigation title
3. Add description
4. Assign officers in charge
5. Select services involved
6. Click **Save**

***

### ⚖️ Warrants

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-5c4d4cf88f56dceb8ea5b8767ca0932fe7c68236%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed view of a warrant</p></figcaption></figure>

Manage arrest warrants and search warrants.

**What you can do:**

* ✅ Create warrant requests (police)
* ✅ View warrants
* ✅ Edit pending warrants
* ✅ Sign/Issue warrants (justice only)
* ✅ Send warrants to Discord

{% hint style="warning" %}
**Required Permissions:**

* `MANAGE_WARRANTS` (4) - Create and edit warrants
* `ISSUE_WARRANTS` (8) - Sign and issue warrants (justice department only)
  {% endhint %}

**Warrant Types:**

* 🚔 **Arrest Warrant** - To arrest a suspect
* 🔍 **Search Warrant** - To search property

**Warrant Workflow:**

1. **Police Officer** creates warrant request
2. Fills in suspect information
3. Adds probable cause
4. Submits for approval
5. **Judge** reviews the warrant
6. Judge signs and issues if approved
7. Warrant becomes active
8. Notification sent to Discord (if configured)

**How to create a warrant:**

1. Click the **"+"** button
2. Select warrant type (Arrest/Search)
3. Select suspect from folder
4. Enter details and probable cause
5. Submit for approval

**How to issue a warrant (Justice only):**

1. Open pending warrant
2. Review details
3. Click **Issue Warrant**
4. Enter reason/notes
5. Confirm issuance
6. Warrant is now active

***

### 📄 Documents (only in investigation view)

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-b1cec53429ccbcd5173f3698c5475a8102e1f2c7%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed view of a document</p></figcaption></figure>

Create and manage documents related to investigations.

**What you can do:**

* ✅ Create new documents
* ✅ View documents (from your service or investigations you're assigned to)
* ✅ Edit existing documents
* ✅ Assign officers to documents
* ✅ Add suspects and witnesses

{% hint style="warning" %}
**Required Permission:** `MANAGE_DOCUMENTS` (2)
{% endhint %}

***

### 🎤 Examinations (only in investigation view)

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-35331b4e773e3b37dfd904e3a46a0368076526f0%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed view of an examination</p></figcaption></figure>

Record interrogations and witness statements.

**What you can do:**

* ✅ Create examination records
* ✅ Document interrogations
* ✅ Link to investigation folders
* ✅ Record suspect/witness statements
* ✅ Assign conducting officers

{% hint style="warning" %}
**Required Permission:** `MANAGE_EXAMINATIONS` (16)
{% endhint %}

**How to record an examination:**

1. Click the **"+"** button
2. Enter examination title
3. Select examinee (suspect/witness)
4. Add interrogation details/transcript
5. Assign officers present
6. Click **Save**

***

### 👤 Records

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-4635336467dcbb77af0bb7cf9fd7fe7af1b6b8b9%2Fimage.png?alt=media" alt=""><figcaption><p>Detailed view of a criminal record</p></figcaption></figure>

View and manage citizen criminal records.

**What you can do:**

* ✅ Search for citizens
* ✅ View criminal history
* ✅ See all related investigations
* ✅ Create new citizen records
* ✅ Update citizen information

{% hint style="warning" %}
**Required Permission:** `MANAGE_RECORDS` (64)
{% endhint %}

**How to search records:**

1. Use the search bar
2. Enter citizen name or ID
3. Click on result to view full record
4. See all investigations, warrants

**Record Information Includes:**

* Personal information
* Investigation history
* Active warrants

***

### 🚨 Violations

Manage the catalog of criminal offenses.

**What you can do:**

* ✅ View all violations
* ✅ Add new violation types
* ✅ Edit violation details
* ✅ Set fines and jail times
* ✅ Categorize offenses

{% hint style="warning" %}
**Required Permission:** `MANAGE_VIOLATIONS` (256)
{% endhint %}

**How to add a violation:**

1. Click the **"+"** button
2. Enter violation name
3. Add description
4. Set fine amount
5. Set jail time
6. Assign category
7. Click **Save**

**Violation Categories:**

* Traffic offenses
* Violent crimes
* Property crimes
* Drug offenses
* White collar crimes
* Custom categories

***

## Troubleshooting

### Can't see certain sections

**Cause:** You don't have permission\
**Solution:** Contact your supervisor or administrator

### Can't create items

**Cause:** Missing required permissions\
**Solution:** Check your role permissions

### Items not saving

**Cause:** Server connection issue\
**Solution:** Check console (F8), contact administrator

### Tablet won't open

**Cause:** Not assigned to a service or wrong command\
**Solution:** Verify you're employed and using correct command

## Permission Quick Reference

To use each section, you need:

| Section                | Required Permission  | Value |
| ---------------------- | -------------------- | ----- |
| Dashboard              | (Any permission)     | -     |
| Investigations         | MANAGE\_FOLDERS      | 1     |
| Documents              | MANAGE\_DOCUMENTS    | 2     |
| Warrants (Create)      | MANAGE\_WARRANTS     | 4     |
| Warrants (Issue)       | ISSUE\_WARRANTS      | 8     |
| Examinations           | MANAGE\_EXAMINATIONS | 16    |
| Requests               | MANAGE\_REQUESTS     | 32    |
| Records                | MANAGE\_RECORDS      | 64    |
| Services               | MANAGE\_SERVICES     | 128   |
| Violations             | MANAGE\_VIOLATIONS   | 256   |
| Archive investigations | ARCHIVE\_FOLDERS     | 512   |

For more on permissions, see:

* [Permissions System](/paid-scripts/madonnedoj/configuration/permissions-system)

## Getting Help

If you need assistance:

* 📖 Check this documentation
* 💬 Ask your supervisor or chief
* 🎫 Contact server administration
* 📧 Report bugs to development team


# Configuration

Madonne DOJ offers extensive configuration options to adapt the script to your server's specific needs. This section will guide you through all available configuration options.

## Configuration Files

The main configuration is located in:

```
config.lua
```

This file contains all the settings for:

* Basic options (commands, debug mode, language)
* Services configuration (police departments, justice services)
* Permissions settings
* Webhooks configuration

## Configuration Sections

Our configuration is divided into several main sections:

### 🔧 Main Configuration

General settings that affect the entire script's behavior.

* [Main Configuration](/paid-scripts/madonnedoj/configuration/main-configuration)

### 🏢 Services Configuration

Configure all your police and justice services, including their names, permissions, and roles.

* [Services Configuration](/paid-scripts/madonnedoj/configuration/services-configuration)

### 🔐 Permissions System

Understand and configure the advanced bitmask-based permissions system.

* [Permissions System](/paid-scripts/madonnedoj/configuration/permissions-system)

## Quick Start

For a quick setup, follow these steps:

1. **Set the tablet command** - Choose the command players will use to open the tablet
2. **Configure your language** - Select `"fr"` or `"en"` (or add your own)
3. **Set up your services** - Add your police departments and justice services
4. **Configure permissions** - Define what each role can do
5. **Add Discord webhook** (optional) - For warrant notifications

## Configuration Best Practices

✅ **Do:**

* Test configuration changes in a development environment first
* Keep a backup of your `config.lua` before making major changes
* Use meaningful names for your services
* Document custom permission values for your team

❌ **Don't:**

* Use duplicate service names
* Forget to configure permissions for each service
* Leave debug mode enabled in production
* Share your Discord webhooks publicly

## Need Help?

If you need assistance with configuration:

* 📖 Read the detailed configuration pages in this section
* 💬 Join our [Discord](https://discord.gg/madonne) for support
* 📧 Contact us at <contact@madonnestudio.com>

***

Let's dive into the specific configuration sections!


# Main Configuration

The main configuration section contains the general settings that affect the entire script's behavior.

## Basic Options

### Opening Command

```lua
OpenTabletCmd = "tablet"
```

This is the command players will use to open the tablet interface.

| Property        | Type     | Default    | Description                              |
| --------------- | -------- | ---------- | ---------------------------------------- |
| `OpenTabletCmd` | `string` | `"tablet"` | Command to open the tablet (without `/`) |

**Example:**

```lua
OpenTabletCmd = "doj" -- Players will use /doj
```

### Debug Mode

```lua
DebugMode = true
```

Enable or disable debug information in the console.

| Property    | Type      | Default | Description                          |
| ----------- | --------- | ------- | ------------------------------------ |
| `DebugMode` | `boolean` | `false` | Display debug information in console |

{% hint style="warning" %}
**Important:** Set `DebugMode = false` in production to avoid console spam.
{% endhint %}

**When to use Debug Mode:**

* ✅ During initial setup
* ✅ When troubleshooting issues
* ✅ When testing new configurations
* ❌ In production (regular use)

### User Interface Language

```lua
LocaleUi = "fr"
```

Set the default language for the user interface.

| Property   | Type     | Default | Options                   | Description                                       |
| ---------- | -------- | ------- | ------------------------- | ------------------------------------------------- |
| `LocaleUi` | `string` | `"fr"`  | `"fr"`, `"en"`, or custom | UI language (must match a file in `/ui/locales/`) |

**Available languages:**

* 🇫🇷 `"fr"` - French
* 🇬🇧 `"en"` - English
* 🌍 Custom - [Add your own language](/paid-scripts/madonnedoj/configuration/adding-a-new-language)

## Text Messages

Customize the messages displayed to players:

```lua
Strings = {
  no_permission = "You are not authorized to use this.",
}
```

| Key             | Default Value                           | Description                                                              |
| --------------- | --------------------------------------- | ------------------------------------------------------------------------ |
| `no_permission` | `"You are not authorized to use this."` | Message shown when a player tries to access something without permission |

You can add more custom messages here and reference them throughout your script.

## Webhooks Configuration

Configure Discord webhooks for notifications:

```lua
Webhooks = {
  WarrantView = "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL_HERE"
}
```

| Property      | Type     | Description                                   |
| ------------- | -------- | --------------------------------------------- |
| `WarrantView` | `string` | Discord webhook URL for warrant notifications |

**How to get a Discord webhook:**

1. Go to your Discord server
2. Select a channel → Edit Channel
3. Integrations → Webhooks → New Webhook
4. Copy the webhook URL
5. Paste it in the configuration

**What gets sent:**

* Warrant creation notifications
* Warrant issuance alerts
* Warrant details (suspect, type, issuing officer)

{% hint style="info" %}
**Optional:** You can leave the webhook empty if you don't want Discord notifications.
{% endhint %}

## Example Complete Configuration

Here's a complete example of the main configuration:

```lua
CONFIG_MADONNE_DOJ = {
  -- Basic Settings
  OpenTabletCmd = "tablet",
  DebugMode = false,
  LocaleUi = "en",
  
  -- Messages
  Strings = {
    no_permission = "You are not authorized to use this.",
  },
  
  -- Services will be configured in the next section
  Services = {
    -- See Services Configuration
  },
  
  -- Discord Integration
  Webhooks = {
    WarrantView = "https://discord.com/api/webhooks/1234567890/abcdefgh"
  }
}
```

## Next Steps

Now that you've configured the main settings, continue with:

* [Services Configuration](/paid-scripts/madonnedoj/configuration/services-configuration) - Set up your police and justice departments

***

Need help? Visit our [Support page](/paid-scripts/madonnedoj/support).


# Services Configuration

The Services section allows you to configure all police and justice services available on your server. Each service can have its own permissions and access levels.

## Service Structure

Each service in the configuration follows this structure:

```lua
{
  name = "LSPD",
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

### Properties

| Property    | Type      | Required | Description                                |
| ----------- | --------- | -------- | ------------------------------------------ |
| `name`      | `string`  | ✅ Yes    | **Unique** short name/code for the service |
| `fullName`  | `string`  | ✅ Yes    | Full display name of the service           |
| `isJustice` | `boolean` | ✅ Yes    | Whether this is a judicial service         |

{% hint style="danger" %}
**Important:** The `name` property must be **unique** across all services. It's used as the service identifier throughout the system.
{% endhint %}

## Police Services

Police services are standard law enforcement agencies. They have configurable permissions based on roles.

### Example: Police Department

```lua
{
  name = "LSPD", -- MUST BE UNIQUE
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

### Common Police Services

<details>

<summary><strong>Los Santos Police Department (LSPD)</strong></summary>

```lua
{
  name = "LSPD",
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

</details>

<details>

<summary><strong>Los Santos Sheriff's Department (LSSD)</strong></summary>

```lua
{
  name = "LSSD",
  fullName = "Los Santos Sheriff's Department",
  isJustice = false
}
```

</details>

<details>

<summary><strong>San Andreas Highway Patrol (SAHP)</strong></summary>

```lua
{
  name = "SAHP",
  fullName = "San Andreas Highway Patrol",
  isJustice = false
}
```

</details>

<details>

<summary><strong>Federal Investigation Bureau (FIB)</strong></summary>

```lua
{
  name = "FIB",
  fullName = "Federal Investigation Bureau",
  isJustice = false
}
```

</details>

## Justice Services

Justice services (`isJustice = true`) have special properties and automatically receive **all permissions**.

### Example: Department of Justice

```lua
{
  name = "DOJ",
  fullName = "Department of Justice",
  isJustice = true
}
```

### What Justice Services Can Do

Services with `isJustice = true` have unlimited access:

* ✅ **Access all folders** - View any investigation regardless of service
* ✅ **View all documents** - Read all case files across services
* ✅ **Issue warrants** - Create and sign arrest/search warrants
* ✅ **Sign warrants** - Approve warrants created by police
* ✅ **Manage all records** - Edit criminal records

## Complete Configuration Example

Here's a complete example with multiple services:

```lua
Services = {
  -- Police Services
  {
    name = "LSPD",
    fullName = "Los Santos Police Department",
    isJustice = false
  },
  {
    name = "LSSD",
    fullName = "Los Santos Sheriff's Department",
    isJustice = false
  },
  {
    name = "SAHP",
    fullName = "San Andreas Highway Patrol",
    isJustice = false
  },
  {
    name = "FIB",
    fullName = "Federal Investigation Bureau",
    isJustice = false
  },
  
  -- Justice Services
  {
    name = "DOJ",
    fullName = "Department of Justice",
    isJustice = true
  },
}
```

## Best Practices

✅ **Do:**

* Use clear, recognizable service codes (`LSPD`, `SAHP`, etc.)
* Have at least one justice service for warrant management
* Keep service names consistent with your server's departments

❌ **Don't:**

* Use duplicate service names
* Give `isJustice = true` to police services
* Use special characters in the `name` field
* Change service names after data has been created

## Adding a New Service

To add a new service to your server:

1. Copy an existing service block
2. Change the `name` to a unique identifier
3. Update the `fullName` to the full service name
4. Set appropriate permission values
5. Set `isJustice` to `true` or `false`
6. Add it to the `Services` table

**Example - Adding a Park Ranger service:**

```lua
{
  name = "PARK",
  fullName = "San Andreas Park Rangers",
  isJustice = false
}
```

***

Need help? Visit our [Support page](/paid-scripts/madonnedoj/support).


# Permissions System

## Overview

The mg-dojscript permission system allows granular access control for each service. It uses a **bit flags** system to optimize storage and permission checks.

## Accessing the Permissions Page

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-536c6ef69957e5b4340db7bcf1700fc7bef2463b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

The permissions management page is accessible via:

* Open your service page
* Click on role management button

## Available Permissions List

The system has **10 distinct permissions**:

| Permission            | Description                                     |
| --------------------- | ----------------------------------------------- |
| `MANAGE_FOLDERS`      | Create and edit investigations                  |
| `MANAGE_DOCUMENTS`    | Create and edit documents                       |
| `MANAGE_WARRANTS`     | Create and edit warrants                        |
| `ISSUE_WARRANTS`      | Issue/send warrants (Justice only)              |
| `MANAGE_EXAMINATIONS` | Create and edit examinations                    |
| `MANAGE_REQUESTS`     | Manage requests (currently disabled)            |
| `MANAGE_RECORDS`      | Edit criminal records                           |
| `MANAGE_SERVICES`     | Manage membership requests and service settings |
| `MANAGE_VIOLATIONS`   | Create and edit violations                      |
| `ARCHIVE_FOLDERS`     | Archive investigations (Justice only)           |

{% hint style="danger" %}
DON'T FORGET TO SAVE

<img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-1cb7f9654ec7cb0a6c774e8d5a833d20d8173b3e%2Fimage%20(47).png?alt=media" alt="" data-size="original">
{% endhint %}

## Management Interface

### Features

#### 1. Adding Roles

* Maximum **6 custom roles** per service
* The `USER` role is permanent and cannot be deleted
* Unique name validation

#### 2. Editing Roles

* Rename existing roles (except `USER`)
* Modify permissions via checkboxes
* Deletion possible (except `USER`)

#### 3. Permission Management

* Table interface with:
  * **Rows**: List of 10 permissions
  * **Columns**: Service roles
* Checkboxes to enable/disable each permission

#### 4. Smart Save

During save:

**a) Automatic User Synchronization**

* Users whose role was deleted are demoted to `USER` role
* Users keep their role if it still exists
* Automatic update of permission values if modified

**b) Service Chiefs Update**

* Chiefs automatically receive the **highest role** (highest permission value)
* Ensures chiefs always have maximum access

**c) Change Propagation**

* Changes are sent to the server
* Cascading update of service, users, and chiefs


# Adding a New Language

This guide will walk you through adding a new language translation to Madonne DOJ. Whether you want to add Spanish, German, Portuguese, or any other language, follow these steps.

## Overview

Adding a new language involves:

1. Creating translation files
2. Translating all text strings
3. Configuring the script to use your language

## Step-by-Step Guide

### Step 1: Choose Your Language Code

Use the standard ISO 639-1 two-letter language code:

| Language   | Code |
| ---------- | ---- |
| Spanish    | `es` |
| German     | `de` |
| Italian    | `it` |
| Portuguese | `pt` |
| Dutch      | `nl` |
| Polish     | `pl` |
| Russian    | `ru` |
| Turkish    | `tr` |

For this example, we'll add **Spanish** (`es`).

### Step 2: Create Translation Files

You need to create the translation file in the production folder:

```
/ui/locales/es.json
```

**How to create it:**

1. Navigate to `/ui/locales/`
2. Copy the existing `en.json` file
3. Rename the copy to `es.json` (or your language code)

{% hint style="info" %}
**Tip:** Start with `en.json` as it's usually more up-to-date than `fr.json`.
{% endhint %}

### Step 3: Translate the Content

Open your new `es.json` file and translate **only the values**, not the keys.

#### Translation Example

**Before (English):**

```json
{
  "COMPONENTS": {
    "DASHBOARD": {
      "NAME": "Dashboard",
      "MY_DOCUMENTS": "My documents",
      "MY_FOLDERS": "My investigations"
    }
  }
}
```

**After (Spanish):**

```json
{
  "COMPONENTS": {
    "DASHBOARD": {
      "NAME": "Panel de control",
      "MY_DOCUMENTS": "Mis documentos",
      "MY_FOLDERS": "Mis investigaciones"
    }
  }
}
```

{% hint style="danger" %}
**Important:** Never modify the keys (left side), only translate the values (right side)!
{% endhint %}

### Step 4: Full Translation Template

Here's a complete translation structure for reference:

<details>

<summary><strong>Complete JSON Structure (click to expand)</strong></summary>

```json
{
  "COMPONENTS": {
    "CREATOR": {
      "DOCUMENTS": "Documento",
      "EXAMINATIONS": "Interrogatorio",
      "FOLDERS": "Investigación",
      "INSERT_DESCRIPTION": "Insertar descripción...",
      "NAME": "nuevo elemento",
      "RECORDS": "ciudadano",
      "WARRANTS": "Orden judicial"
    },
    "DASHBOARD": {
      "MY_DOCUMENTS": "Mis documentos",
      "MY_EXAMINATIONS": "Mis interrogatorios",
      "MY_FOLDERS": "Mis investigaciones",
      "NAME": "Panel de control"
    },
    "DOCUMENTS": {
      "DATE": "Fecha",
      "DESCRIPTION": "Descripción",
      "EMPTY": "No hay documentos",
      "EMPTY_DESCRIPTION": "Sin descripción",
      "FOLDER": "Invest.",
      "IN_CHARGE": "Oficiales a cargo",
      "NAME": "Documentos",
      "TITLE": "Nombre"
    },
    "EXAMINATIONS": {
      "DATE": "Fecha",
      "DESCRIPTION": "Descripción",
      "EMPTY": "No hay interrogatorios",
      "EMPTY_DESCRIPTION": "Sin descripción",
      "FOLDER": "Invest.",
      "IN_CHARGE": "Oficiales a cargo",
      "NAME": "Interrogatorios",
      "TITLE": "Nombre"
    },
    "FOLDERS": {
      "DATE": "Fecha",
      "DESCRIPTION": "Descripción",
      "EMPTY": "No hay investigaciones",
      "EMPTY_DESCRIPTION": "Sin descripción",
      "IN_CHARGE": "Oficiales a cargo",
      "IN_CHARGE_SERVICES": "Servicios a cargo",
      "NAME": "Investigaciones",
      "SEARCH": {
        "NOT_FOUND": "¡No se encontraron resultados!",
        "PLACEHOLDER": "Buscar investigaciones..."
      },
      "TITLE": "Título"
    },
    "WARRANTS": {
      "DATE": "Fecha",
      "NAME": "Órdenes judiciales",
      "STATUS": "Estado",
      "TITLE": "Título",
      "TYPE": "Tipo"
    },
    "RECORDS": {
      "NAME": "Antecedentes",
      "SEARCH": "Buscar ciudadano..."
    },
    "VIOLATIONS": {
      "NAME": "Infracciones",
      "CATEGORY": "Categoría",
      "FINE": "Multa",
      "JAIL_TIME": "Tiempo de prisión"
    },
    "SERVICES": {
      "NAME": "Servicios",
      "MEMBERS": "Miembros",
      "PENDING": "Pendientes"
    }
  },
  "GENERIC": {
    "SAVE": "Guardar",
    "CANCEL": "Cancelar",
    "DELETE": "Eliminar",
    "EDIT": "Editar",
    "CREATE": "Crear",
    "SEARCH": "Buscar...",
    "LOADING": "Cargando...",
    "UNKNOWN_DATE": "Fecha desconocida",
    "CONFIRM": "Confirmar",
    "CLOSE": "Cerrar"
  },
  "DATE_FORMAT": "dd/MM/yyyy"
}
```

</details>

### Step 5: Configure Date Format

The `DATE_FORMAT` key controls how dates are displayed. Use the format that's common in your region:

| Region | Format       | Example    |
| ------ | ------------ | ---------- |
| Europe | `dd/MM/yyyy` | 25/12/2024 |
| USA    | `MM/dd/yyyy` | 12/25/2024 |
| ISO    | `yyyy-MM-dd` | 2024-12-25 |

**Spanish example:**

```json
{
  "DATE_FORMAT": "dd/MM/yyyy"
}
```

### Step 6: Configure in config.lua

Update your `config.lua` to use the new language:

```lua
CONFIG_MADONNE_DOJ = {
  LocaleUi = "es", -- Your new language code
  -- ... rest of config
}
```

### Step 7: Test Your Translation

1. **Restart the script:**

```
restart MS_MaodonneDOJ
```

2\. **Open the tablet:**

```
/tablet
```

3\. **Check all sections:**

* Dashboard
* Investigations
* Documents
* Warrants
* Examinations
* Records
* Violations
* Services

4. **Look for:**
   * Missing translations (English text appearing)
   * Truncated text (too long for buttons)
   * Special characters not displaying correctly
   * Context issues (wrong meaning)

## Translation Checklist

Use this checklist to ensure complete translation:

* [ ] All `COMPONENTS.*` sections translated
* [ ] All `GENERIC.*` actions translated
* [ ] `DATE_FORMAT` set appropriately
* [ ] Special characters display correctly
* [ ] Text fits in UI elements (not truncated)
* [ ] Context is correct (meanings are accurate)
* [ ] Empty state messages translated
* [ ] Error messages translated
* [ ] Tested all interface sections
* [ ] Config.lua updated with language code

## Common Translation Keys

Here are the most important keys to translate:

### User Actions

```json
{
  "GENERIC": {
    "SAVE": "...",
    "CANCEL": "...",
    "DELETE": "...",
    "EDIT": "...",
    "CREATE": "...",
    "CONFIRM": "..."
  }
}
```

### Section Names

```json
{
  "COMPONENTS": {
    "DASHBOARD": { "NAME": "..." },
    "FOLDERS": { "NAME": "..." },
    "DOCUMENTS": { "NAME": "..." },
    "WARRANTS": { "NAME": "..." },
    "EXAMINATIONS": { "NAME": "..." },
    "RECORDS": { "NAME": "..." },
    "VIOLATIONS": { "NAME": "..." },
    "SERVICES": { "NAME": "..." }
  }
}
```

### Empty States

```json
{
  "COMPONENTS": {
    "FOLDERS": { "EMPTY": "..." },
    "DOCUMENTS": { "EMPTY": "..." },
    "EXAMINATIONS": { "EMPTY": "..." }
  }
}
```

## Tips for Quality Translation

### Context Matters

Some words have different meanings in different contexts. View the interface to understand:

* Is "Record" a verb (to record) or noun (a record)?
* Is "File" a document or an action (to file)?
* Is "Warrant" singular or can it be plural?

### Keep It Concise

UI translations should be:

* ✅ Short and clear
* ✅ Easy to understand
* ✅ Consistent in terminology
* ❌ Not overly formal (unless appropriate)
* ❌ Not too long for buttons

### Test on Different Screen Sizes

Some languages are more verbose than others:

* German translations are typically 30% longer than English
* Spanish translations are typically 20-25% longer
* Make sure text doesn't overflow on smaller screens

## Sharing Your Translation

If you've created a translation for a new language:

1. **Test it thoroughly**
2. **Join our Discord** - <https://discord.gg/madonne>
3. **Share your translation** - We can include it in future releases!
4. **Get credited** - Your name in the documentation

## Troubleshooting

### Text appears in English instead of my language

* ✅ Check the file name matches your `LocaleUi` setting
* ✅ Verify the JSON syntax is valid (no missing commas, brackets)
* ✅ Ensure the file is in the correct folder (`/ui/locales/`)
* ✅ Restart the script

### Special characters don't display correctly

* ✅ Save the file with UTF-8 encoding
* ✅ Don't use HTML entities (use actual characters)
* ✅ Test with various special characters (é, ñ, ü, etc.)

### JSON syntax errors

* ✅ Use a JSON validator (like jsonlint.com)
* ✅ Check for missing commas between items
* ✅ Ensure all quotes are properly closed
* ✅ Watch for trailing commas (not allowed in JSON)

### Text is cut off in the UI

* ✅ Shorten the translation
* ✅ Use abbreviations where appropriate
* ✅ Check on different screen resolutions

## Example: Complete Spanish Translation

Here's a real working example for Spanish:

```json
{
  "COMPONENTS": {
    "CREATOR": {
      "DOCUMENTS": "Documento",
      "EXAMINATIONS": "Interrogatorio",
      "FOLDERS": "Investigación",
      "INSERT_DESCRIPTION": "Insertar descripción...",
      "NAME": "nuevo elemento",
      "RECORDS": "ciudadano",
      "WARRANTS": "Orden"
    },
    "DASHBOARD": {
      "MY_DOCUMENTS": "Mis documentos",
      "MY_EXAMINATIONS": "Mis interrogatorios",
      "MY_FOLDERS": "Mis investigaciones",
      "NAME": "Panel"
    }
  },
  "GENERIC": {
    "SAVE": "Guardar",
    "CANCEL": "Cancelar",
    "DELETE": "Eliminar",
    "EDIT": "Editar",
    "SEARCH": "Buscar..."
  },
  "DATE_FORMAT": "dd/MM/yyyy"
}
```

## Next Steps

After adding your language:

* [Configuration](/paid-scripts/madonnedoj/configuration) - Set up your server
* [Usage Guide](/paid-scripts/madonnedoj/usage) - Learn the interface
* [Support](/paid-scripts/madonnedoj/support) - Get help if needed

***

Created a translation? Share it with the community on our [Discord](https://discord.gg/madonne)!


# Need Help?

Having trouble with Madonne DOJ? We're here to help! This page provides various support resources and troubleshooting guidance.

## Before Requesting Support

Before reaching out for help, please try these steps:

### 1. Check the Documentation

* ✅ Read relevant documentation sections
* ✅ Search for your specific issue
* ✅ Review configuration examples

### 2. Enable Debug Mode

Enable debug mode to see detailed error messages:

```lua
CONFIG_MADONNE_DOJ = {
  DebugMode = true, -- Enable this
}
```

Then restart the script:

```
restart MS_MaodonneDOJ
```

### 3. Check Server Console

Press **F8** in-game to open the console and look for:

* ❌ Red error messages
* ⚠️ Yellow warnings
* 🔍 Debug information (if enabled)

### 4. Reproduce the Issue

Try to reproduce the problem:

1. Note the exact steps that cause the issue
2. Check if it happens every time
3. Test with different users/roles
4. Document what you were trying to do

***

## Common Issues

### Installation Issues

<details>

<summary><strong>Script won't start / Database errors</strong></summary>

**Symptoms:**

* Script fails to load
* SQL errors in console
* Missing tables

**Solutions:**

1. ✅ Verify `db.sql` was imported correctly
2. ✅ Check database credentials in your framework
3. ✅ Ensure all tables were created
4. ✅ Check for table name conflicts

</details>

<details>

<summary><strong>Tablet command doesn't work</strong></summary>

**Symptoms:**

* `/tablet` command doesn't respond
* No interface opens

**Solutions:**

1. ✅ Verify command in `config.lua`
2. ✅ Check if player is assigned to a service
3. ✅ Look for errors in console (F8)
4. ✅ Ensure script is started after framework

</details>

### Configuration Issues

<details>

<summary><strong>Permissions not working correctly</strong></summary>

**Symptoms:**

* Users have wrong permissions
* Sections not visible
* Can't perform actions

**Solutions:**

1. ✅ Recalculate permission values
2. ✅ Verify service configuration
3. ✅ Check role assignments

</details>

<details>

<summary><strong>Language not changing</strong></summary>

**Symptoms:**

* UI still in wrong language
* Translations not appearing

**Solutions:**

1. ✅ Check `LocaleUi` value in `config.lua`
2. ✅ Verify language file exists in `/ui/locales/`
3. ✅ Ensure JSON syntax is valid
4. ✅ Restart the script
5. ✅ Clear browser cache (Ctrl+F5)

</details>

### Usage Issues

<details>

<summary><strong>Can't create investigations/documents</strong></summary>

**Symptoms:**

* Create button not visible
* Nothing happens when clicking create
* Save fails

**Solutions:**

1. ✅ Check your permissions
2. ✅ Ensure you're assigned to a service
3. ✅ Fill all required fields
4. ✅ Check console for errors

</details>

<details>

<summary><strong>Warrants not being issued</strong></summary>

**Symptoms:**

* Can't sign warrants
* Issue button not available

**Solutions:**

1. ✅ Only justice services can issue warrants
2. ✅ Verify `isJustice = true` in config
3. ✅ Check if user has `ISSUE_WARRANTS` permission (or is justice)
4. ✅ Ensure warrant is properly filled out

</details>

<details>

<summary><strong>Discord webhook not working</strong></summary>

**Symptoms:**

* No notifications in Discord
* Webhook errors in console

**Solutions:**

1. ✅ Verify webhook URL is correct
2. ✅ Check Discord server settings
3. ✅ Ensure webhook wasn't deleted
4. ✅ Test with a simple message
5. ✅ Check firewall settings

</details>

### Performance Issues

<details>

<summary><strong>Tablet is slow/laggy</strong></summary>

**Symptoms:**

* Interface loads slowly
* Actions take long time
* Freezing

**Solutions:**

1. ✅ Check server performance
2. ✅ Optimize database queries
3. ✅ Reduce number of records
4. ✅ Check client-side performance
5. ✅ Clear browser cache

</details>

***

## FAQ

### Can I modify the script?

Depends on your license. Check your purchase agreement. Generally:

* ✅ You can modify for your server
* ❌ You cannot resell or redistribute
* ❌ You cannot share modifications publicly

### Can I use this with QBCore?

The script may need adaptation for QBCore. Check with support for compatibility.

### How many services can I add?

There's no hard limit, but practical considerations:

* Keep it reasonable (5-15 services typical)
* Too many services can clutter the interface
* Consider database performance with many services

### Can players change language individually?

No, language is server-wide. All players see the same language configured in `config.lua`.

### Do I need to know coding to use this?

Basic knowledge helps for configuration, but:

* Installation is straightforward
* Configuration uses simple Lua
* No coding needed for daily use
* Support available if you get stuck

### How often is the script updated?

Updates are released for:

* Bug fixes (as needed)
* New features (periodically)
* Security patches (immediately)
* Check Discord for announcements

***

**Thank you for using Madonne DOJ!**

We're committed to providing the best law enforcement management system for FiveM.

*Developed by M\_g for MadonneStudio © 2025 - All rights reserved*


# Madonne Seasons

Change the way weather and time are handled on your FiveM server. **Madonne Seasons** brings a fully dynamic, realistic, and configurable weather and time system — with seasonal cycles, per-zone weather, AI-powered forecasts, and much more.

{% embed url="<https://www.youtube.com/watch?v=geiYTJQoLEo>" %}

***

## 📖 About Madonne Seasons

Madonne Seasons replaces GTA V's default static weather system with a living, breathing environment. Weather evolves dynamically over time, follows realistic transition rules, and varies by geographic zone across the map. Days are longer in summer, shorter in winter, and the sun rises and sets accordingly.

## ✨ Main Features

* 🗓️ **Seasonal Cycle** — Four seasons (Spring, Summer, Autumn, Winter) with configurable real-time duration (days, weeks, months)
* 🌍 **Per-Zone Weather** — The map is divided into 7+ geographic zones, each with its own weather probabilities per season
* ⏱️ **Realistic Time System** — Day/night cycle with variable speed: days are longer or shorter depending on the current season
* ☀️ **Dynamic Sunrise & Sunset** — Sunrise and sunset hours shift throughout the year based on seasonal progression
* 🌤️ **Dynamic Weather Transitions** — Weather changes follow realistic transition rules (e.g. RAIN → THUNDER → CLEARING)
* 📻 **Weather Forecast System** — Players can request tomorrow's weather forecast via a command, delivered as an audio broadcast
* 🤖 **AI-Powered Forecasts** — Optional OpenAI integration generates unique, voiced weather bulletins in any language using GPT-4o-mini and TTS
* 🔐 **Flexible Permission System** — Supports ACE, Steam, MadonnAdmin, or a fully custom permission handler
* 🔔 **Notification System** — Compatible with `default`, `chat`, `MS_Madonne_Notify`, or a custom handler
* 📱 **LB Phone Compatibility** — Native integration with the LB Phone weather app for consistent time, temperature, forecasts, precipitation, and sun times
* 🧩 **Developer Exports** — `GetZonePredictions` and `GetSunTimes` exports for integration with other resources

***

## 🔗 Quick Links

* [📥 Installation](/paid-scripts/madonne-seasons/installation)
* [⚙️ Configuration](/paid-scripts/madonne-seasons/configuration)
* [💻 Commands](/paid-scripts/madonne-seasons/commands)
* [🧩 Exports & Events](/paid-scripts/madonne-seasons/exports-and-events)
* [📱 Compatibility](/paid-scripts/madonne-seasons/compatibility)
* [❓ Common Errors](/paid-scripts/madonne-seasons/common-errors)


# Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* *(Optional)* `MS_Madonne_Notify` for enhanced notifications
* *(Optional)* An **OpenAI API key** if using AI-powered forecast generation
* *(Optional)* `lb-phone` if using the LB Phone weather app integration

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Madonne\_Seasons** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the account used to purchase the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Madonne_Seasons` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Madonne_Seasons/
        ├── client/
        ├── server/
        │   └── custom/
        ├── ui/
        ├── config.lua
        └── fxmanifest.lua
```

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`:

```cfg
ensure MS_Madonne_Seasons
```

If you plan to use **AI-powered forecasts**, also add your OpenAI API key:

```cfg
set openai_key "sk-your-openai-api-key-here"
```

> ⚠️ Make sure `MS_Madonne_Seasons` is started **after** any notification resource it depends on (`MS_Madonne_Notify`, etc.).

***

## ⚙️ Step 4 — Configure the resource

Open `config.lua` and configure the resource to match your server setup.

Refer to the [⚙️ Configuration](/paid-scripts/madonne-seasons/configuration) page for a full breakdown of every option.

***

## 🔄 Step 5 — Restart your server

Restart your server or run the following command in the console:

```
restart MS_Madonne_Seasons
```

Madonne Seasons is now active! ✅

***

## 📱 Step 6 — LB Phone integration *(optional)*

If you use **lb-phone** and want the weather app to reflect Madonne Seasons data, refer to the [📱 Compatibility](/paid-scripts/madonne-seasons/compatibility) page for the two files to edit.


# Configuration

All configuration is done in `config.lua`, which is not escrowed and can be freely edited.

***

## 🔐 Permission System

```lua
PERMISSION_SYSTEM = "none",
```

| Value           | Description                                                              |
| --------------- | ------------------------------------------------------------------------ |
| `"none"`        | All players can use admin commands. Recommended only for testing.        |
| `"ace"`         | Uses FiveM's ACE permission system with configurable permission nodes    |
| `"steam"`       | Restricts access to a list of Steam identifiers defined in `ADMIN_USERS` |
| `"madonnadmin"` | Uses MadonnAdmin staff rank detection                                    |
| `"custom"`      | Uses your own logic defined in `server/custom/sv_permission.lua`         |

**ACE permission nodes** (when `PERMISSION_SYSTEM = "ace"`):

```lua
ACE_PERMISSION = {
    ["DynamicWeather"] = "madonne.dynweather",
    ["ChangeWeather"]  = "madonne.changeweather",
    ["NextWeather"]    = "madonne.nextweather",
    ["FreezeTime"]     = "madonne.freezetime",
    ["ChangeTime"]     = "madonne.changetime",
},
```

Grant them in your `server.cfg`:

```cfg
add_ace group.admin madonne.dynweather allow
add_ace group.admin madonne.changeweather allow
add_ace group.admin madonne.nextweather allow
add_ace group.admin madonne.freezetime allow
add_ace group.admin madonne.changetime allow
```

**Steam whitelist** (when `PERMISSION_SYSTEM = "steam"`):

```lua
ADMIN_USERS = {
    ["steam:1100001000056ba"] = true,
},
```

***

## 🔔 Notification System

```lua
NOTIFICATION_SYSTEM = "default",
```

| Value       | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| `"default"` | Uses the native GTA V notification                               |
| `"chat"`    | Sends notifications as a chat message                            |
| `"madonne"` | Uses MS\_Madonne\_Notify                                         |
| `"custom"`  | Uses your custom handler in `server/custom/sv_notifications.lua` |

***

## 🗓️ Seasons

```lua
SEASONS_NAMES = {
    SPRING = "Spring",
    SUMMER = "Summer",
    AUTUMN = "Autumn",
    WINTER = "Winter",
},
```

Customize the display names of each season. These names are used in the `/season` command response and in AI-generated forecasts.

***

## ⏱️ Time & Season Length

| Option        | Example values          | Description                                                                                        |
| ------------- | ----------------------- | -------------------------------------------------------------------------------------------------- |
| `YEAR_LENGTH` | `"2w"`, `"1mo"`, `"3d"` | Real-time duration of a full four-season cycle. Accepts days (`d`), weeks (`w`), or months (`mo`). |
| `DAY_LENGTH`  | `"48m"`, `"1h"`         | Real-time duration of a full in-game day. Accepts minutes (`m`) or hours (`h`). Default: `"48m"`.  |

> 💡 A `YEAR_LENGTH` of `"2w"` means one full year (all four seasons) passes in 2 real-world weeks.

***

## 🌤️ Dynamic Weather

```lua
DYNAMIC_WEATHER = true,
WEATHER_DELAY = 10,
```

| Option            | Type      | Description                                                                                      |
| ----------------- | --------- | ------------------------------------------------------------------------------------------------ |
| `DYNAMIC_WEATHER` | `boolean` | Enable or disable automatic weather changes. Can also be toggled in-game with `/dynamicweather`. |
| `WEATHER_DELAY`   | `number`  | Time in **minutes** between each automatic weather change.                                       |

***

## 📻 Forecast System

| Option                   | Type      | Description                                                                                                          |
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `FORCAST_ENABLED`        | `boolean` | Enable the `/forcast` command and forecast system                                                                    |
| `FORCAST_OPENAI`         | `boolean` | Use OpenAI to generate a unique AI-voiced weather bulletin. Requires `openai_key` in `server.cfg`.                   |
| `FORCAST_OPENAI_ALL_MAP` | `boolean` | If `true`, the AI bulletin also covers all other zones of the map, not just the player's zone                        |
| `FORCAST_OPENAI_VOICE`   | `string`  | OpenAI TTS voice to use. Available: `alloy`, `fable`, `onyx`, `nova`. Preview at [openai.fm](https://www.openai.fm/) |
| `FORCAST_LANGUAGE`       | `string`  | Language folder to use for pre-recorded forecasts (e.g. `"FR"`, `"EN"`). Only used when `FORCAST_OPENAI` is `false`. |
| `FORCAST_VOLUME`         | `number`  | Playback volume of the forecast audio (`0.0` to `1.0`)                                                               |

> ⚠️ AI forecast generation costs approximately **$0.001 per forecast** via the OpenAI API. This is not a MadonneStudio cost — it is billed directly to your OpenAI account.

**Pre-recorded forecasts** are available for the following weather types, in both `FR` and `EN`:

`BLIZZARD` · `CLEAR` · `CLEARING` · `CLOUDS` · `EXTRASUNNY` · `FOGGY` · `NEUTRAL` · `OVERCAST` · `RAIN` · `SMOG` · `SNOW` · `SNOWLIGHT` · `THUNDER`

> 💡 You can add new language folders by placing `.ogg` files in `ui/forcasts/YOUR_LANGUAGE/` and registering them in `fxmanifest.lua`.

***

## 🌍 Weather Zones

The map is divided into named zones, each with its own set of weather probabilities for each season. Each zone is identified by a list of GTA V **zone codes** (`ZoneCodes`).

```lua
WEATHER_ZONES = {
    ["Los Santos"] = {
        ZoneCodes = { ["DOWNT"] = true, ["HAWICK"] = true, ... },
        SpringWeather = { ["CLEAR"] = 20, ["RAIN"] = 10, ... },
        SummerWeather = { ["CLEAR"] = 30, ["EXTRASUNNY"] = 30, ... },
        AutumnWeather = { ... },
        WinterWeather = { ... },
    },
    ...
    ["Default"] = { ... }
}
```

**Included zones out of the box:**

| Zone                  | Description                                           |
| --------------------- | ----------------------------------------------------- |
| `Los Santos`          | The entire city of Los Santos and its surroundings    |
| `Costal Beaches`      | Coastal and beach areas south of Los Santos           |
| `Los Santos Hills`    | Hilly areas around Vinewood and Tongva Valley         |
| `Grand Senora Desert` | The desert region around Sandy Shores                 |
| `Northern Moutains`   | Mount Gordo, Mount Chiliad, and surrounding highlands |
| `Zancudo`             | Fort Zancudo area and Lago Zancudo                    |
| `Paleto Bay`          | The northern coastal town and surrounding forests     |
| `Default`             | Fallback zone for any area not matched by the above   |

**Weather probabilities** are defined as weights — the higher the number, the more likely that weather type is to appear. They do not need to sum to 100.

***

## ☁️ Cloud Opacity

```lua
CLOUD_OPACITY = {
    ["CLEAR"]      = 0.0,
    ["RAIN"]       = 1.0,
    ["EXTRASUNNY"] = 0.5,
    ...
}
```

Controls the cloud layer opacity for each weather type. Values range from `0.0` (no clouds) to `1.0` (full cloud cover). These are applied automatically when weather changes.

***

## 💬 Commands & Text

All command names and notification texts can be customized in `config.lua`:

```lua
COMMANDS = {
    DynamicWeather = "dynamicweather",
    FreezeTime     = "freezetime",
    Forcast        = "forcast",
    ChangeWeather  = "changeweather",
    ChangeTime     = "changetime",
    NextWeather    = "nextweather",
    Season         = "season",
    ...
}

TEXT = {
    Enabled              = "ENABLED !",
    Disabled             = "DISABLED !",
    NoPermission         = "You do not have permission to do that !",
    WeatherChangedTo     = "Weather is successfully changed to : ",
    TimeChangedTo        = "Time is successfully changed to : ",
    Season               = "We are actually in ",
    WaitForForcast       = "You will receive your weather forcast in few seconds. Please wait...",
    ...
}
```

***

## 🔧 Custom Handlers

**Custom permissions** — `server/custom/sv_permission.lua`:

```lua
function IsAllowedToAccessStaffCommandFromCustomMethod(source)
    -- Return true to grant access, false to deny
end
```

**Custom notifications** — `server/custom/sv_notifications.lua`:

```lua
function CustomNotify(type, message, source)
    -- type can be: "error", "info", "success"
end
```


# Commands

All command names can be customized in the `COMMANDS` table in `config.lua`.

***

## 🌤️ Weather Commands

### /changeweather `<weather>`

Forces the weather to a specific type in the player's current zone.

```
/changeweather RAIN
/changeweather EXTRASUNNY
/changeweather THUNDER
```

**Available weather types:**

| Type         | Available                                                                      |
| ------------ | ------------------------------------------------------------------------------ |
| `BLIZZARD`   | ✅                                                                              |
| `CLEAR`      | ✅                                                                              |
| `CLEARING`   | ✅                                                                              |
| `CLOUDS`     | ✅                                                                              |
| `EXTRASUNNY` | ✅                                                                              |
| `FOGGY`      | ✅                                                                              |
| `NEUTRAL`    | ✅                                                                              |
| `OVERCAST`   | ✅                                                                              |
| `RAIN`       | ✅                                                                              |
| `SMOG`       | ✅                                                                              |
| `THUNDER`    | ✅                                                                              |
| `SNOW`       | ❌ *(disabled by default — edit `WeatherUsableInCommands` in config to enable)* |
| `SNOWLIGHT`  | ❌                                                                              |
| `XMAS`       | ❌                                                                              |

> 🔐 Requires the `ChangeWeather` permission.

***

### /nextweather

Forces an immediate transition to the next weather in the current prediction cycle, skipping the current `WEATHER_DELAY` timer.

> 🔐 Requires the `NextWeather` permission.

***

### /dynamicweather

Toggles automatic weather changes on or off. When disabled, weather remains static until manually changed.

> 🔐 Requires the `DynamicWeather` permission.

***

## ⏱️ Time Commands

### /freezetime

Toggles time progression. When frozen, the in-game clock stops advancing.

> 🔐 Requires the `FreezeTime` permission.

***

### /changetime `<HH:MM>`

Sets the in-game time to a specific hour and minute.

```
/changetime 08:30
/changetime 22:00
```

> 🔐 Requires the `ChangeTime` permission.

***

## 📋 Information Commands

### /season

Displays the current in-game season (Spring, Summer, Autumn, or Winter) as configured in `SEASONS_NAMES`.

> 🔓 Available to all players.

***

### /forcast

Requests a weather forecast for the player's current zone. The forecast covers the next 24 hours and is delivered as an **audio broadcast**.

* If `FORCAST_OPENAI` is enabled, a unique AI-generated voice bulletin is produced in the configured language.
* If disabled, a pre-recorded `.ogg` file is played based on the predicted weather type.

> 🔓 Available to all players. Requires `FORCAST_ENABLED = true` in config.

***

## 🔐 Permission Reference

| Command           | Permission key    |
| ----------------- | ----------------- |
| `/dynamicweather` | `DynamicWeather`  |
| `/changeweather`  | `ChangeWeather`   |
| `/nextweather`    | `NextWeather`     |
| `/freezetime`     | `FreezeTime`      |
| `/changetime`     | `ChangeTime`      |
| `/season`         | *(none — public)* |
| `/forcast`        | *(none — public)* |


# Exports & Events

Madonne Seasons exposes client-side exports and NetEvents to allow other resources to integrate with its weather and time data.

***

## 📤 GetZonePredictions *(client-side)*

Returns the weather prediction list for a given GTA V zone code.

```lua
local predictions = exports['MS_Madonne_Seasons']:GetZonePredictions(zone)
```

| Parameter | Type     | Description                                               |
| --------- | -------- | --------------------------------------------------------- |
| `zone`    | `string` | A GTA V zone code (e.g. `"DOWNT"`, `"SANDY"`, `"PALETO"`) |

**Returns:** A table of upcoming weather types in order, indexed from `1` to N (where N = number of weather slots for the day).

### Example

```lua
local playerCoords = GetEntityCoords(PlayerPedId())
local zone = GetNameOfZone(playerCoords.x, playerCoords.y, playerCoords.z)
local predictions = exports['MS_Madonne_Seasons']:GetZonePredictions(zone)

for i, weather in ipairs(predictions) do
    print("Slot " .. i .. ": " .. weather)
end
```

***

## ☀️ GetSunTimes *(client-side)*

Returns the current sunrise and sunset hours, which vary dynamically with the season.

```lua
local sunTimes = exports['MS_Madonne_Seasons']:GetSunTimes()
-- Returns: { sunrise = 6.5, sunset = 20.3 }
```

**Returns:** A table with two keys:

| Key       | Type     | Description                       |
| --------- | -------- | --------------------------------- |
| `sunrise` | `number` | Sunrise hour (e.g. `6.5` = 6h30)  |
| `sunset`  | `number` | Sunset hour (e.g. `20.3` = 20h18) |

### Example

```lua
local sunTimes = exports['MS_Madonne_Seasons']:GetSunTimes()
print("Sunrise at " .. sunTimes.sunrise .. "h")
print("Sunset at " .. sunTimes.sunset .. "h")
```

***

## 📡 NetEvents

### MadonneSeasons:SyncWeathers *(client)*

Fired when weather data is synced to the client (on spawn and on each weather change).

```lua
RegisterNetEvent("MadonneSeasons:SyncWeathers")
AddEventHandler("MadonneSeasons:SyncWeathers", function(data)
    -- data = { ["Los Santos"] = "CLEAR", ["Grand Senora Desert"] = "EXTRASUNNY", ... }
end)
```

***

### MadonneSeasons:SyncPredictions *(client)*

Fired alongside `SyncWeathers`, providing the full prediction table and sun times.

```lua
RegisterNetEvent("MadonneSeasons:SyncPredictions")
AddEventHandler("MadonneSeasons:SyncPredictions", function(predictions, sunrise, sunset)
    -- predictions = { ["Los Santos"] = { "CLEAR", "CLOUDS", "RAIN" }, ... }
    -- sunrise = 6.5, sunset = 20.3
end)
```

***

### MadonneSeasons:SyncTime *(client)*

Fired when time data is synced to the client.

```lua
RegisterNetEvent("MadonneSeasons:SyncTime")
AddEventHandler("MadonneSeasons:SyncTime", function(offset, base, daySpeed, nightSpeed, freeze)
    -- offset     = time offset in minutes
    -- base       = base time counter
    -- daySpeed   = ticks per minute during daytime
    -- nightSpeed = ticks per minute during nighttime
    -- freeze     = boolean, whether time is frozen
end)
```


# Compatibility

## LB Phone — Weather App

Madonne Seasons is fully compatible with the **LB Phone** weather application. With the integration enabled, the phone's weather app will automatically reflect all data driven by Madonne Seasons in real time:

* 🌡️ **Temperature** — Coherent with the current weather type and season
* 🌦️ **Current weather** — Matches the weather currently active in the player's zone
* 📅 **Upcoming forecasts** — Displays the next weather predictions for the player's zone
* 🌧️ **Precipitation** — Updated based on the active weather
* 🌅 **Sunrise & sunset times** — Dynamically computed based on the current season and year progression

***

### 🛠️ How to Set Up the Integration

Two files need to be edited inside the **lb-phone** resource. Both are located in the apps folder of the LB Phone resource.

***

#### 📄 File 1 — `weather.lua`

**Location:** `lb-phone > client > apps > default > weather.lua`

This file handles the Lua-side logic that feeds weather data into the LB Phone app. Replace its content with the version provided below, which queries Madonne Seasons exports to retrieve the current weather, predictions, and sun times for the player's zone.

> ⚠️ The exact implementation may vary depending on your version of lb-phone. Refer to the existing file to understand how data is passed to the NUI layer, and adapt accordingly.

***

#### 📄 File 2 — `Weather-xxxx.js`

**Location:** `lb-phone > ui > dist > assets > Weather-xxxx.js`

> 💡 The `xxxx` part of the filename is a hash that changes with each LB Phone update. Look for the file starting with `Weather-` in the assets folder.

This file is the compiled JavaScript that handles the weather app's display logic. It needs to be updated to read the data provided by the modified `weather.lua`, including weather type mapping, temperature logic based on season, and precipitation values.

> ⚠️ **This file is minified.** Editing it requires care. We recommend using your browser's developer tools or a code formatter to make the content readable before editing.

The key parts to update are:

* The **weather type mapping** — so that GTA weather names (`EXTRASUNNY`, `RAIN`, etc.) correctly display the right icons and labels in the app UI
* The **temperature calculation** — to return values coherent with the current season and weather type (e.g. warmer in summer, colder in winter with snow)
* The **forecast rendering** — to display the `predictions` array from Madonne Seasons instead of the default LB Phone forecast data

***

### ⚠️ Important Notes

* These changes need to be **reapplied after each LB Phone update**, as the compiled JS file is regenerated.
* The `weather.lua` file may also be overwritten by updates to lb-phone. Keep a backup of your modified version.
* If you need help adapting the integration to your specific version of lb-phone, feel free to reach out on our Discord.

***

## 💬 Need Help?

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Common Errors

## 🔴 You lack the required entitlement to use MS\_Madonne\_Seasons

This message indicates that your server does not have the necessary entitlement to start the resource. This is related to FiveM's **Escrow** protection system.

Check the following points one by one:

* ✅ The **CFX Portal key** listed in your `server.cfg` does not contain any typing error
* ✅ The CFX Portal key belongs to the **FiveM account that was used to purchase or claim** the resource
* ✅ The resource has been **successfully claimed** on the [CFX Portal](https://portal.cfx.re/)
* ✅ The CFX Portal key linked to your server **belongs to you**, and not to your hosting provider

> ⚠️ Some hosting providers include a shared CFX Portal key as part of their offers. A key that does not belong to you will block the use of **any Escrow-protected resource**, without exception. Always use your own personal key.

***

## 🔴 Weather is the same for all players / not changing

**Cause 1:** `DYNAMIC_WEATHER` is set to `false` in `config.lua`.

**Fix:** Set it to `true`, or toggle it in-game with `/dynamicweather`.

**Cause 2:** `WEATHER_DELAY` is set to a very high value.

**Fix:** Lower `WEATHER_DELAY` (in minutes) to make weather change more frequently.

**Cause 3:** A player used `/dynamicweather` to disable automatic weather changes.

**Fix:** Use `/dynamicweather` again in-game to re-enable it, or restrict access to the command via the permission system.

***

## 🔴 All players are in the same zone / per-zone weather isn't working

**Cause:** Zone codes in `WEATHER_ZONES` don't match the actual GTA V zone codes for those areas.

**Fix:** Verify zone codes using the `GetNameOfZone` native. You can test it in-game by printing the zone name in a script and checking which code is returned at your current position.

***

## 🔴 The `/forcast` command plays no audio

**Cause 1:** `FORCAST_ENABLED` is set to `false`.

**Fix:** Set `FORCAST_ENABLED = true` in `config.lua`.

**Cause 2 (OpenAI):** The `openai_key` convar is missing or incorrect in `server.cfg`.

**Fix:** Add or correct the following line in your `server.cfg`:

```cfg
set openai_key "sk-your-openai-key-here"
```

**Cause 3 (OpenAI):** Your OpenAI account has no credits.

**Fix:** Add credits to your OpenAI account at [platform.openai.com](https://platform.openai.com/).

**Cause 4 (pre-recorded):** The `.ogg` file for the predicted weather type is missing in the selected language folder.

**Fix:** Make sure all weather `.ogg` files exist under `ui/forcasts/YOUR_LANGUAGE/`. The required files are named after each weather type: `CLEAR.ogg`, `RAIN.ogg`, `THUNDER.ogg`, etc.

***

## 🔴 Time is not synced between players

**Cause:** The `playerSpawned` event is not firing, preventing the sync request from being sent.

**Fix:** Make sure no other resource is blocking or replacing the `playerSpawned` event. You can also try increasing the timeout in `cl_time.lua` if your server takes longer to spawn players.

***

## 🔴 Admin commands return "You do not have permission"

**Cause:** The permission system is not configured correctly for your setup.

**Fix:** Check your `PERMISSION_SYSTEM` setting and verify accordingly:

* **ACE:** Confirm `add_ace` entries are in `server.cfg` and the player is in the correct group
* **Steam:** Confirm the player's Steam hex ID is listed in `ADMIN_USERS`
* **MadonnAdmin:** Confirm `MS_MadonnAdmin` is running and the player has a staff rank
* **Custom:** Verify your `IsAllowedToAccessStaffCommandFromCustomMethod` function returns `true` for the player

***

## 🔴 Server console shows ERROR 0x01A or 0x01B

These are configuration parsing errors:

| Code    | Cause                           | Fix                                                          |
| ------- | ------------------------------- | ------------------------------------------------------------ |
| `0x01A` | `YEAR_LENGTH` format is invalid | Use `"Nd"`, `"Nw"`, or `"Nmo"` format (e.g. `"2w"`, `"1mo"`) |
| `0x01B` | `DAY_LENGTH` format is invalid  | Use `"Nm"` or `"Nh"` format (e.g. `"48m"`, `"1h"`)           |

***

## 💬 Still having issues?

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Wearable Weapon

Are you fed up with your shootouts always ending badly as weapons spawn in your player's hands when they come out of anywhere ?

**MadonneStudio has the solution for you !**

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F5l1wj9M9TJJoC2w9aelM%2Ff31447e22baee501352c47c3ef79dc70389e1a6b.jpg?alt=media&amp;token=d51b9a44-99f3-4c43-b302-44ff5a8e29db" alt=""><figcaption></figcaption></figure>

Thanks to our script, you can limit the use of heavy weapons, but also add a feature that will allow your players to carry their weapons on their chest or on their back.

The script therefore mainly allows you to force your players to retrieve an heavy weapon from the trunk of a vehicle before being able to use it.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FmMvRZh2Jn4cZZqLKZrkQ%2Fc31fd34e91448748cc37ff9b9e4da97e619e619c.jpg?alt=media&amp;token=7fd5308d-4b4e-4d49-add1-e2156e2e0adc" alt=""><figcaption></figcaption></figure>

### How to use it ?

As you approch a vehicle, use the weapon wheel to select a heavy weapon.

To redeposit th eweapon in a vehicle, equip yourself with the weapon, approach a vehicle again and equip yourself with a handgun or your fists.

To store your weapon on your chest or on your back, just equip a handgun or your fists, while being away from a vehicle.

To take the heavy weapon back in your hands, simply select it again in the weapon selection wheel.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FBXLuklHj1Jf9tYr2sFm9%2F32997b276270690b1d6f673617bcd0f2f3ec8a8b.jpg?alt=media&amp;token=122c8004-4ea4-4c9f-a566-8507d2c31b39" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If one of your moderation team members goes invisible (NoClip for example), the weapon hanging on the body will disappear while the person is invisible to other players.

On the death of a player, if a weapon is attached to him, this last will fall to the ground before disappearing, but will not be recoverable by other players.
{% endhint %}


# Installation

1. After purchasing the resource on our store, log in to Fivem's KeyMaster site (<https://keymaster.fivem.net/>).
2. In the menu on the left, go to **Granted Assets** located in the **Server Owners** section.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FjM6oL53eHMEFrtH0DiUO%2FSans%20titre.png?alt=media&amp;token=1de01fb5-ca37-40c6-aa67-6a74fa7d5d3e" alt=""><figcaption></figcaption></figure>

3. In the list of resources, select the Download button corresponding to Wearable Weapon. This will download you a .zip file.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FaBggCA0UPRJoHVKcYAu6%2FSans%20titre2.png?alt=media&amp;token=a45d18ae-e9d8-47ed-8e9e-800aed401ccb" alt=""><figcaption></figcaption></figure>

4. Open the archive you just downloaded. There you will find a folder named **MS\_Wearable\_Weapons**.
5. Drag this folder into your server's resources folder.
6. Since the resource is already configured and ready to use, all you have to do is edit your server's configuration file (often caller *server.cfg*) and ad ensure *MS\_Wearable\_Weapons* at the bottom of it.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FEL4HnjZZwHVgLcsvkFzj%2FSans%20titre3.png?alt=media&amp;token=12b3132b-e653-4505-93a0-b1ea3b1e701a" alt=""><figcaption></figcaption></figure>

7. Start your server and enjoy your new script !


# Configuration

The configuration file (named config.lua) allows you to modify all the different parameters taken into account within our script. In case of problems with the scripts, first check that you have correctly edited this document

<details>

<summary><em><strong>Content of the configuration file by default</strong></em></summary>

```lua
CONFIG_WEARABLE_WEAPONS = {
    framework = "none", -- Accepted values : esx | none
    inventory = "none", -- Only if framework is not none. Accepted values : ox | none

    -- This option, if set to true, will force your players to retrieve the whitelist weapons from the trunk of a vehicle.
    heavyWeaponsFromCar = true, -- Accepted values : false | true
    UseNearestDoor = true, -- Only if HeavyWeaponsFromCar is TRUE. Accepted values : false | true
    PlayAnimation = true, -- Only if UserNearestDoor is TRUE. Accepted values : false | true

    -- This option allows you to list the different weapons that can be influenced by the script. Please follow the template below to add new weapons.
    weaponsAccepted = {
        -- Example : ["file_name"] = "WEAPON_ID",                                                                                 
        ["w_ar_carbinerifle"] = "WEAPON_CARBINERIFLE",                                                 
        ["w_ar_assaultrifle"] = "WEAPON_ASSAULTRIFLE",                                                         
        ["w_ar_bullpuprifle"] = "WEAPON_BULLPUPRIFLE",                                                              
        ["w_ar_advancedrifle"] = "WEAPON_ADVANCEDRIFLE",                                                            
                                                                                                                                                                                                        
        ["w_sb_assaultsmg"] = "WEAPON_ASSAULTSMG",                                                                  
        ["w_sb_smg"] = "WEAPON_SMG",                                                                                
        ["w_sb_smgmk2"] = "WEAPON_SMGMk2",                                                                          
        ["w_sb_gusenberg"] = "WEAPON_GUSENBERG",                                                                    
        ["w_mg_combatmg"] = "WEAPON_COMBATMG",       
        ["w_sb_microsmg"] = "WEAPON_MICROSMG",                          
                                                                                                                                                                                                                    
        ["w_sr_sniperrifle"] = "WEAPON_SNIPERRIFLE",                                                                
        ["w_sr_marksmanrifle"] = "WEAPON_MARKSMANRIFLE",                                                            
        ["w_sr_heavysniper"] = "WEAPON_HEAVYSNIPER",                                                                
                                                                                                                                                                                                                
        ["w_sg_assaultshotgun"] = "WEAPON_ASSAULTSHOTGUN",                                                          
        ["w_sg_bullpupshotgun"] = "WEAPON_BULLPUPSHOTGUN",                                                          
        ["w_sg_pumpshotgun"] = "WEAPON_PUMPSHOTGUN",		
        ["w_ar_musket"] = "WEAPON_MUSKET",                                                                          
        ["w_sg_heavyshotgun"] = "WEAPON_HEAVYSHOTGUN",

        ["w_ar_carbineriflemk2"] = "WEAPON_CARBINERIFLE_MK2",
        ["w_ar_specialcarbine"] = "WEAPON_SPECIALCARBINE"
    },

	-- back_bone : 11816 = back | 24816 = front | 51826 = side
	attachedBones = { -- 
		back_bone = { 11816 ,24816,     24816,    24816,    11816,    11816,    51826,	  24816},
		x = {		  -0.35 ,0.28,      -0.02,    -0.090,   -0.22,    -0.070,   0.15,     -0.05},
		y = {		  0.18  ,-0.15,     -0.05,    -0.15,    0.17,     0.16,     0.07,     -0.16},
		z = {		  -0.05 ,0.02,      0.05,     -0.080,   -0.020,   -0.030,   0.11,     -0.14},
		x_rotation = {360.0 ,0.0,       -4.0,     -180.0,   183.0,    -183.0,   -89.0,    0},
		y_rotation = {-40.0 ,165.0,     47.0,     -515.0,   -538.0,   -505.0,   -540.0,   -15},
		z_rotation = {1.0	,0.0,		-534.3,   -5.0,     0,        4.0,      2.0,      -7}
	},

    -- This option determines whether the weapon should be worn on the chest or on the back by default.
    default_position = 2, -- Accepted values : 1 (Chest) | 2 (Back)

    bags_can_contain_weapons = true,
    bags_eup = {41,45}

    -- Select whether or not the player can choose himself between placing his weapon on his back and placing his weapon on the chest. (Command to use : /weaponposition)
    playerCanChangePosition = true, -- Accepted values : false | true

    -- Here you can change the name of the command used to allow the player to choose the location of the weapon they will carry. (Default : weaponposition) (Used if playerCanChangePosition = true)
    commandUsedToChangePosition = "weaponposition", -- Accepted values : text (without the / )

	-- Here you can change all settings about Drop Command and the ability to your player to drop a weapon at ground
    enableDropCommand = true,
    commandUsedToDropWeapon = "drop",
    msg_suggDrop = "Drop the weapon you are currently holding",
    dropAnimDict = "random@domestic",
    dropAnimName = "pickup_low",

    -- This command will allow you to debug your players in case of problems with the script. This will reset the state of the weapon port.
    commandUsedToDebugWeaponWearing = "debugweapon", -- Accepted values : text (without the / )

    -- This prefix corresponds to the name that will be entered at the start of the notifications, related to this script, which will be displayed in the game.
    globalPrefix = "~r~[MyServer] ~c~", -- Accepted values : text
    globalPrefixBis = "MyServer", -- Accepted values : text

    -- Position of notifications.
    notifPos = "notification", -- Accepted values : notification | chat | other | none
    -- Notification : In bottom left corner, just on the map
    -- Chat : In the chat
    -- Other : Use a custom notifications system (see notif.lua)
    -- None : Desactivate notifications

    -- Change color of notification in case of notifPos = "chat"
    notifChatColor = {255,0,0}, -- Accepted values = RGB Color code = {R,G,B},

    -- Message indicating to the player that he must be in front of a vehicle to be able to equip himself with the weapon he has selected. (Used if heavyWeaponsFromCar = true)
    msg_needCar = "You must be in front of a vehicle to take out this weapon.", -- Accepted values : text

    -- Message indicating to the player that he must drop the weapon he has on him before he can get a new one out of the car. (Used if heavyWeaponsFromCar = true)
    msg_alreadyWeared = "You must put down your gun before picking up a new one.", -- Accepted values : text

    -- Message indicating to the player that his attached weapon was just deleted from his inventory.
    msg_weaponDeleted = "You no longer have the attached weapon in your inventory.", -- Accepted values : text

    -- One of these two notifications will be displayed when the player changes the position of their weapon. (Used if playerCanChangePosition = true)
    msg_emptyargs = "You must specify which position you want",
    msg_changingPosTo = "You will now carry your weapon on this position : ", -- Accepted values : text
    msg_dontexist = "Position don't exist, please check your command's args.",

    -- This sentence will be displayed when the command to change the position of the weapon is suggested. (Used if playerCanChangePosition = true)
    msg_suggChangePosition = "Allows you to change the position of the weapon (chest or back).", -- Accepted values : text

    -- This sentence will be displayed when the command to debug the weapon port is suggested.
    msg_suggDebug = "Command to use in case of problems with carrying a weapon. This will reset the latter to its default state.", -- Accepted values : text

}

CONFIG_HOLSTER = {
    weapon = { 
        'WEAPON_PISTOL',
        'WEAPON_COMBATPISTOL',
        'WEAPON_APPISTOL',
        'WEAPON_PISTOL50',
        'WEAPON_SNSPISTOL',
        'WEAPON_HEAVYPISTOL',
        'WEAPON_PISTOLXM3',
        'WEAPON_SNSPISTOL_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_REVOLVER_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_DOUBLEACTION',
        'WEAPON_VINTAGEPISTOL',
        'WEAPON_GADGETPISTOL',
        'WEAPON_FLAREGUN',
        'WEAPON_NAVYREVOLVER',
        'WEAPON_MARKSMANPISTOL',
        'WEAPON_REVOLVER',
        'WEAPON_PISTOL_MK2',
    },

    -- Which position of holster must be used by default : side | back | front | leg
    DefaultHolsterAnimation = "front",

    -- For each groups of components, as this examples, you must provide depanding of your EUP : ped, component, drawable.

    -- Components used as holster
    SideHolsterComponents = {
        --{"mp_m_freemode_01",{{7,{1,3,6,5,8,2,42,43,110,111,119,120}},{8,{16,18}}}}
    },

    -- Components used as holster
    BackHolsterComponents = {

    },

    -- Components used as holster
    FrontHolsterComponents = {

    },

    -- Components used as holster
    SideLegHolsterAnimation = {

    },

    -- This command will allow you to change the holster animation. You can also change all differents texts for this functionnality.
    commandUsedToChangeHolsterAnim = "changeHolsterAnim", -- Accepted values : text (without the / )
    msg_changingAnim = "Animation changed to : ",
    msg_suggChangeAnim = "Change your default animation when you try to get a pistol from your holster.",
    msg_AnimType = "Available animation type.",
    msg_error = "An error has occured. Please try again."
}

CONFIG_AIM = {
    WEAPONS = {
        'WEAPON_PISTOL',
        'WEAPON_COMBATPISTOL',
        'WEAPON_APPISTOL',
        'WEAPON_PISTOL50',
        'WEAPON_SNSPISTOL',
        'WEAPON_HEAVYPISTOL',
        'WEAPON_PISTOLXM3',
        'WEAPON_SNSPISTOL_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_REVOLVER_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_DOUBLEACTION',
        'WEAPON_VINTAGEPISTOL',
        'WEAPON_GADGETPISTOL',
        'WEAPON_FLAREGUN',
        'WEAPON_NAVYREVOLVER',
        'WEAPON_MARKSMANPISTOL',
        'WEAPON_REVOLVER',
        'WEAPON_PISTOL_MK2',
    },

    DefaultAnim = "Default", -- Default - GangsterAS - HillbillAS
    commandUsedToChangeAimAnim = "changeAimAnim",
    msg_changingAnim = "The aim animation has been changed to : ",
    msg_suggChangeAnim = "Change your default aiming animation.",
    msg_AnimType = "Available animation type."
}
```

</details>

<details>

<summary><em><strong>Main Wearable Weapons configuration</strong></em></summary>

Select here your framework and your inventory system.

```lua
framework = "none", -- Accepted values : esx | none
inventory = "none", -- Only if framework is not none. Accepted values : ox | none
```

This option, if set to true, will force your players to retrieve the whitelist weapons from the trunk of a vehicle. If UseNearestDoor is set to true, you will always use the nearest door of the vehicle to take your weapon.

```lua
heavyWeaponsFromCar = true,
UseNearestDoor = true, -- Only if HeavyWeaponsFromCar is TRUE. Accepted values : false | true
PlayAnimation = true, -- Only if UserNearestDoor is TRUE. Accepted values : false | true
```

This option allows you to list the different weapons that can be influenced by the script. The weapons present in this list must be taken out from a trunk of a vehicle.

```lua
weaponsAccepted = {
        -- Example : ["file_name"] = "WEAPON_ID",
        ["w_ar_carbinerifle"] = "WEAPON_CARBINERIFLE",
        ["w_ar_carbineriflemk2"] = "WEAPON_CARBINERIFLE_MK2",
        ["w_ar_assaultrifle"] = "WEAPON_ASSAULTRIFLE",
        ["w_ar_specialcarbine"] = "WEAPON_SPECIALCARBINE",
        ["w_ar_bullpuprifle"] = "WEAPON_BULLPUPRIFLE",
        ["w_ar_advancedrifle"] = "WEAPON_ADVANCEDRIFLE",

        ["w_sb_assaultsmg"] = "WEAPON_ASSAULTSMG",
        ["w_sb_smg"] = "WEAPON_SMG",
        ["w_sb_smgmk2"] = "WEAPON_SMGMk2",
        ["w_sb_gusenberg"] = "WEAPON_GUSENBERG",
        ["w_mg_combatmg"] = "WEAPON_COMBATMG",
        ["w_sb_microsmg"] = "WEAPON_MICROSMG",

        ["w_sr_sniperrifle"] = "WEAPON_SNIPERRIFLE",
        ["w_sr_marksmanrifle"] = "WEAPON_MARKSMANRIFLE",
        ["w_sr_heavysniper"] = "WEAPON_HEAVYSNIPER",

        ["w_sg_assaultshotgun"] = "WEAPON_ASSAULTSHOTGUN",
        ["w_sg_bullpupshotgun"] = "WEAPON_BULLPUPSHOTGUN",
        ["w_sg_pumpshotgun"] = "WEAPON_PUMPSHOTGUN",
        ["w_ar_musket"] = "WEAPON_MUSKET",
        ["w_sg_heavyshotgun"] = "WEAPON_HEAVYSHOTGUN",

        ["w_ar_carbineriflemk2"] = "WEAPON_CARBINERIFLE_MK2",
        ["w_ar_specialcarbine"] = "WEAPON_SPECIALCARBINE"
    },
```

This option determines all differents possibles positions to wear your weapon on your player. You can also determine wheter the weapon should be worn on the chest or on the back of the player by default.

```lua
attachedBones = { -- 
		back_bone = { 11816 ,24816,     24816,    24816,    11816,    11816,    51826,	  24816},
		x = {		  -0.35 ,0.28,      -0.02,    -0.090,   -0.22,    -0.070,   0.15,     -0.05},
		y = {		  0.18  ,-0.15,     -0.05,    -0.15,    0.17,     0.16,     0.07,     -0.16},
		z = {		  -0.05 ,0.02,      0.05,     -0.080,   -0.020,   -0.030,   0.11,     -0.14},
		x_rotation = {360.0 ,0.0,       -4.0,     -180.0,   183.0,    -183.0,   -89.0,    0},
		y_rotation = {-40.0 ,165.0,     47.0,     -515.0,   -538.0,   -505.0,   -540.0,   -15},
		z_rotation = {1.0	,0.0,		-534.3,   -5.0,     0,        4.0,      2.0,      -7}
},

default_position = 2,
```

Select if you want to let the possibility to your players to get weapons from bag, and if yes, in which bags

```
bags_can_contain_weapons = true,
bags_eup = {41,45}
```

Select whether or not the player can choose himself between placing his weapon on his back and placing his weapon on the chest. (Command by default : /weaponposition)

```lua
 playerCanChangePosition = true,
```

Here you can change the name of commands and enable (or disable) the weapon drop functionnality. The first one is used to allow the player to choose the location of the weapon they will carry. The second one will allow a player to be debugged in case of problems with the script. This will reset the state of the weapon port.

```lua
commandUsedToChangePosition = "weaponposition",
enableDropCommand = true,
commandUsedToDropWeapon = "drop",
msg_suggDrop = "Drop the weapon you are currently holding",
dropAnimDict = "random@domestic",
dropAnimName = "pickup_low",
commandUsedToDebugWeaponWearing = "debugweapon",
```

This prefixs correspond to the name that will be entered at the start of the notifications, related to this script, which will be displayed in the game.

```lua
globalPrefix = "~r~[MyServer] ~c~",
globalPrefixBis = "MyServer",
```

This is will allow you to move the position of notificatinos between : the classic GTA notification system, the chat, a custom notification system or simply desactivate notifications.

```lua
notifPos = "notification",
```

In the case where you want to show notifications in the chat, you can edit the chat color message (RGB code is used).

```lua
notifChatColor = {255,0,0},
```

All further lines give you the opportunity to edit (or translate) sentences sent by the script.&#x20;

```lua
msg_needCar = "You must be in front of a vehicle to take out this weapon.",
msg_alreadyWeared = "You must put down your gun before picking up a new one.",
msg_changingPosTo1 = "You will now carry your weapon on your chest.",
msg_changingPosTo2 = "You will now carry your weapon on your back.",
msg_suggChangePosition = "Allows you to change the position of the weapon (chest or back).",
msg_suggDebug = "Command to use in case of problems with carrying a weapon. This will reset the latter to its default state.",
```

</details>

<details>

<summary><em><strong>Holster system configuration</strong></em></summary>

This option allows you to list the different weapons that can be influenced by the scripts. The weapons present in this list will be animated by the holster system.

```lua
    weapon = { 
        'WEAPON_PISTOL',
        'WEAPON_COMBATPISTOL',
        'WEAPON_APPISTOL',
        'WEAPON_PISTOL50',
        'WEAPON_SNSPISTOL',
        'WEAPON_HEAVYPISTOL',
        'WEAPON_PISTOLXM3',
        'WEAPON_SNSPISTOL_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_REVOLVER_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_DOUBLEACTION',
        'WEAPON_VINTAGEPISTOL',
        'WEAPON_GADGETPISTOL',
        'WEAPON_FLAREGUN',
        'WEAPON_NAVYREVOLVER',
        'WEAPON_MARKSMANPISTOL',
        'WEAPON_REVOLVER',
        'WEAPON_PISTOL_MK2',
    },
```

With this option, you will can edit which animation is used to get a pistol from a holster.

```lua
    DefaultHolsterAnimation = "front",
```

This part is a little more complicated and allows you to specify which animation should be used and under what circumstances. You must enter the different accessories available on your server (via EUP in particular) for each of the peds that can carry them.

```lua

    SideHolsterComponents = {
        {"mp_m_freemode_01",{{7,{1,3,6,5,8,2,42,43,110,111,119,120}},{8,{16,18}}}}
    },

    BackHolsterComponents = {

    },

    FrontHolsterComponents = {

    },
    
    SideLegHolsterAnimation = {

    }
```

For each ped, you need to enter the model of the ped, and each accessories for each categories. If you need help to configure this part, don't hesitate to ask us on our Discord.

This command will allow you to change the holster animation. You can also change all differents texts for this functionnality.

````lua
```
    commandUsedToChangeHolsterAnim = "changeHolsterAnim", -- Accepted values : text (without the / )
    msg_changingAnim = "Animation changed to : ",
    msg_suggChangeAnim = "Change your default animation when you try to get a pistol from your holster.",
    msg_AnimType = "Available animation type.",
    msg_error = "An error has occured. Please try again."
```
````

</details>

<details>

<summary>Aim animation configuration</summary>

This option allows you to list the different weapons that can be influenced by the scripts. The weapons present in this list will be animated by the aiming animation system.

```
    weapon = { 
        'WEAPON_PISTOL',
        'WEAPON_COMBATPISTOL',
        'WEAPON_APPISTOL',
        'WEAPON_PISTOL50',
        'WEAPON_SNSPISTOL',
        'WEAPON_HEAVYPISTOL',
        'WEAPON_PISTOLXM3',
        'WEAPON_SNSPISTOL_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_REVOLVER_MK2',
        'WEAPON_RAYPISTOL',
        'WEAPON_DOUBLEACTION',
        'WEAPON_VINTAGEPISTOL',
        'WEAPON_GADGETPISTOL',
        'WEAPON_FLAREGUN',
        'WEAPON_NAVYREVOLVER',
        'WEAPON_MARKSMANPISTOL',
        'WEAPON_REVOLVER',
        'WEAPON_PISTOL_MK2',
    },
```

With this option, you will can edit which animation is used to aim.

```lua
    DefaultAnim = "Default", -- Default - GangsterAS - HillbillAS
```

This command will allow you to change the aiming animation. You can also change all differents texts for this functionnality.

```lua
    commandUsedToChangeAimAnim = "changeAimAnim",
    msg_changingAnim = "The aim animation has been changed to : ",
    msg_suggChangeAnim = "Change your default aiming animation.",
    msg_AnimType = "Available animation type."
```

</details>


# Common Errors

<details>

<summary>You lack the required entitlement to use MS_WearableWeapon</summary>

<img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgvr8FERP0njAan9CNSy1%2Fimage_2023-05-23_053137681.png?alt=media&amp;token=018b15c6-c821-4121-b3ad-9254a2933c3a" alt="" data-size="original">

This message indicates that you do not have permission to launch the Wearable Weapons resource.

The causes can be multiple. We therefore advise you to check these different points :

* The Patreon key listed in your server.cfg does not contain a typing error.
* The Patreon key listed in your server.cfg belongs to the FiveM account that was used to purchase our resource.
* The resource has been successfully purchased in our shop.
* The Patreon key linked to my server belongs to me and does not belong to the host of my server.

However, we would like to warn you about this last point. Hosts offering Patreons keys in their offers are rarely trustworthy. This will also block the use of any resource protected by FiveM's Escrow system, without exception. We can only strongly advise you to use your own Patreon keys.

</details>


# Madonne PVP

Many players come to roleplay servers with the intention of harming the experience of other players, including by shooting twists and turns. MadonnePVP allows you to limit access to PVP by asking players to answer a completely personalizable quiz, using questions that you will have previously filled in.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-9e57a1c7bac96261a75b26343fa0e172cbd3c211%2Fimage%20(2)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Upon successful completion of the quiz, the player will gain access to PvP features. It is still possible for people authorized to do so, to engage the passive mode, thus disabling any damage on the entire server.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fgit-blob-4db34647550e7341f5e0067c98d3b43215a75fa8%2Fimage%20(3)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

### Showcase Video

{% embed url="<https://youtu.be/Sp6UPCP3-6M>" %}


# Installation

1. After purchasing the resource on our store, log in to Fivem's KeyMaster site (<https://keymaster.fivem.net/>).
2. In the menu on the left, go to **Granted Assets** located in the **Server Owners** section.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FjM6oL53eHMEFrtH0DiUO%2FSans%20titre.png?alt=media&amp;token=1de01fb5-ca37-40c6-aa67-6a74fa7d5d3e" alt=""><figcaption></figcaption></figure>

3. In the list of resources, select the Download button corresponding to MadonnePVP. This will download you a .zip file.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FnKt1aPO3cvGyWmdUGYX5%2Fimage.png?alt=media&amp;token=c68fac13-0860-4fd8-a301-623c253e0ef0" alt=""><figcaption></figcaption></figure>

4. Open the archive you just downloaded. There you will find two folders named **MS\_Madonne\_PVP** and **oxmysql**.
5. Drag this folders into your server's resources folder.
6. Since the resource is already configured and ready to use, all you have to do is edit your server's configuration file (often caller *server.cfg*) and add ensure *ensure oxmysql* and *MS\_Madonne\_PVP* at the bottom of it.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F9AqGLJVWd1IhVVuYiNqc%2FSans%20titre.png?alt=media&amp;token=55b9cf56-6ade-45f6-92ab-00e437177310" alt=""><figcaption></figcaption></figure>

7. If it's not already done, add this line at the top of your server.cfg, and replace each XXX by your database server informations.

```properties
set mysql_connection_string "server=XXX;port=XXX;userid=XXX;password=XXX;database=XXX"
```

8. Start your server and enjoy your new script !


# Configuration

<details>

<summary><em><strong>Content of the configuration file by default</strong></em></summary>

```lua
CONFIG_MADONNE_PVP = {

    -- Amount of time a player must wait if they fail all three tries. In days.
    ResetOfTestsEvery = 1,

    PeacetimeStateByDefault = false,

    PeacetimeEnabled = "ATTENTION : Le mode passif a été activé. Vous êtes donc à l'abri de tous dégâts.",
    PeacetimeDisabled = "ATTENTION : Le mode passif a été désactivé. Retour à la normale de la situation.",
    QuizUiIsLoading = "Chargement de l'interface d'accès au PVP...",
    AlreadyHavePvp = "Vous disposez déjà des accès PVP.",
    
    NoTryRemaining = "Il ne t'en reste plus.",
    OneTryRemaining = "Il t'en reste 1.",
    TwoTryRemaining = "Il t'en reste 2.",
    ThreeTryRemaining = "Il t'en reste 3.",

    NOTIFICATION_TYPE = "notification",
    notifChatColor = {255,255,255},
    globalPrefixBis = "MadonneStudio",

}

```

</details>

<details>

<summary><em><strong>Main Madonne PVP configuration</strong></em></summary>

Number of days required for the test counter to reset.

```lua
ResetOfTestsEvery = 1,
```

Default state of passive mode.

```lua
PeacetimeStateByDefault = false,
```

Translations of the various phrases used in the script.

```lua
PeacetimeEnabled = "ATTENTION : Le mode passif a été activé. Vous êtes donc à l'abri de tous dégâts.",
PeacetimeDisabled = "ATTENTION : Le mode passif a été désactivé. Retour à la normale de la situation.",
QuizUiIsLoading = "Chargement de l'interface d'accès au PVP...",
AlreadyHavePvp = "Vous disposez déjà des accès PVP.",
    
NoTryRemaining = "Il ne t'en reste plus.",
OneTryRemaining = "Il t'en reste 1.",
TwoTryRemaining = "Il t'en reste 2.",
ThreeTryRemaining = "Il t'en reste 3.",
```

Changing notification preferences.

```lua
NOTIFICATION_TYPE = "notification",
notifChatColor = {255,255,255},
globalPrefixBis = "MadonneStudio",
```

</details>

<details>

<summary><em>Questions configuration</em></summary>

In the questions.lua, you can edit each questions you want to ask to your players in the quiz. He is pretty simple to edit.

```lua
QuestionsFromCFG = {
    {
        question = "Un joueur roule tranquillement, en voiture civil. Je me décide de l'arrêter pour le contrôler. Ce dernier m'indique qu'il ne veut pas particier à l'action.",
        answerA = "Je comprends sa décision et repart patrouiller. ",
        answerB = "J'insiste en disant que s'il coopère pas, il sera envoyé en garde à vue.",
        answerC = "J'ignore ce qu'il dit et continue mon contrôle.",
        answerD = "Je contacte un membre du staff avec la commande /report.",
        goodAnswer = "A",
    },
    {
        question = "Pendant un braquage de banque, je me fais tuer alors que j'effectuais un assaut pour appréhender les ravisseurs.",
        answerA = "Je reviens en me téléportant pour continuer la scène avec mes collègues.",
        answerB = "Je reviens sur la scène, en voiture, afin de la continuer avec mes collègues.",
        answerC = "J'attends que l'action soit terminée avant de retourner sur place.",
        answerD = "Je crie au freekill et insulte la personne qui m'a tué.",
        goodAnswer = "C",
    },
    {
        question = "Dans le chat HRP, vous pouvez lire qu'un joueur à dit qu'il avait tué quelqu'un.",
        answerA = "Je cherche le joueur sur la map pour l'interpeller, il a quand même tuer quelqu'un !",
        answerB = "Je venge la personne qu'il a tué.",
        answerC = "Je ne prends pas compte de ce message dans mon roleplay.",
        answerD = "Je vais voir d'autres policiers pour leur faire passer l'information.",
        goodAnswer = "C",
    },
    {
        question = "Etant actuellement un civil, je croise un policier en voiture.",
        answerA = "Je fais demi-tour, m'arrête à son niveau et klaxonne pour le provoquer.",
        answerB = "Je lui tire dessus pour qu'il se mette à me poursuivre.",
        answerC = "Je lui propose une course-poursuite pour tester mes compétences de conduite.",
        answerD = "Je continue ma route comme tout bon citoyen lambda.",
        goodAnswer = "D",
    },
    {
        question = "En tant que civil, je souhaite réaliser une attaque terroriste sur le serveur.",
        answerA = "Je me lance directement et tire sur le premier joueur qui passe.",
        answerB = "Je demande à un staff si c'est possible de le faire et la réalise où je le souhaite.",
        answerC = "Je demande à un staff si c'est possible de le faire et la réalise à l'endroit qu'il m'indique.",
        answerD = "Je fais juste un /ano pour prévenir et me met à tirer sur tout le monde.",
        goodAnswer = "C",
    },
    {
        question = "Lequel de ces quatre pseudos est interdit sur le serveur ?",
        answerA = "Jean Neymar",
        answerB = "Jean Culetamer",
        answerC = "François Hollande",
        answerD = "Xx-KillerDu33-xX",
        goodAnswer = "B",
    },
}

-- DON'T TOUCHE BELOW THIS LINE --

function GetQuestionsFromCfg()
   return questionsFromCFG
end

```

</details>


# Common Errors

<details>

<summary>You lack the required entitlement to use MS_Madonne_PVP</summary>

This message indicates that you do not have permission to launch the MadonnePVP resource.

The causes can be multiple. We therefore advise you to check these different points :&#x20;

* The Patreon key listed in your server.cfg does not contain a typing error.
* The Patreon key listed in your server.cfg belongs to the FiveM account that was used to purchase our resource.
* The resource has been successfully purchased in our shop.
* The Patreon key linked to my server belongs to me and does not belong to the host of my server.

However, we would like to warn you about this last point. Hosts offering Patreons keys in their offers are rarely trustworthy. This will also block the use of any resource protected by FiveM's Escrow system, without exception. We can only strongly advise you to use your own Patreon keys.

</details>


# Madonne Car Spawner

Spawn your vehicles the right way! **Madonne Car Spawner** gives your players an intuitive and fully configurable vehicle spawning interface, with realistic NPC delivery, parking slot detection, department restrictions, and permission-based limits.

{% embed url="<https://www.youtube.com/watch?v=SFFCjfyGqb8>" %}

***

## 📖 About Madonne Car Spawner

Madonne Car Spawner allows players to browse and spawn their vehicles through a clean NUI interface — **without relying on ESX, QBCore, or any other framework**. Vehicles are delivered to one of the **11,000+ pre-listed parking slots** present in the game. If no slot is available nearby, a configurable **NPC mechanic** will drive the vehicle directly to the player.

Server owners can define **spawn areas** with markers and NPCs, restrict vehicles by **department**, configure **per-player vehicle limits** with VIP tier overrides, and fully customize categories, vehicle lists, and parking zones. A **badge system** allows locked vehicles to remain visible in the interface with a visual indicator.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2F4CKaptlltZm5IXJo55mx%2Fvlcsnap-2023-09-04-10h32m51s297.png?alt=media&amp;token=f69b9c0f-ba70-48d4-901e-a721757118b4" alt=""><figcaption></figcaption></figure>

***

## ✨ Main Features

* 🖥️ **Intuitive NUI Interface** — Players browse vehicles by category with photos, names, and livery previews
* 🅿️ **Smart Parking Detection** — Vehicles spawn on the nearest available slot out of 11,000+ pre-listed locations
* 🚶 **NPC Delivery System** — If no slot is found nearby, a configurable NPC mechanic brings the vehicle to the player
* 📍 **Spawn Areas** — Restrict menu access to defined map zones, with optional markers and NPC attendants
* 🏢 **Department Restrictions** — Each area can be limited to specific departments (LSPD, LSSD, SAFR…)
* 🔒 **Vehicle & Category Whitelisting** — Vehicles and categories can be locked behind a permission code
* 🏅 **Badge System** — Locked vehicles can remain visible in the interface with a custom badge (icon, color, label)
* 🚗 **Vehicle Limit per Player** — Configurable default limit with VIP-tier overrides
* 🎨 **Livery, Extras & Colors** — Define livery index, extras to enable/disable, and primary/secondary colors per vehicle
* ⚙️ **Framework Support** — Works standalone or with **ESX** (job-based permissions via `Framework = "esx"`)
* 🌍 **Full Translation Support** — All in-game strings are editable in a dedicated `TRANSLATIONS` table

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FAyrZjlqEZISfuBUrNiU4%2Fvlcsnap-2023-09-04-10h36m51s851.png?alt=media&amp;token=db6d7f39-d5f9-4b17-a2ee-26e8b13375ce" alt=""><figcaption></figcaption></figure>

***

## 🔗 Quick Links

* [📥 Installation](/paid-scripts/madonne-car-spawner/installation)
* [⚙️ Configuration](/paid-scripts/madonne-car-spawner/configuration)
* [❓ Common Errors](/paid-scripts/madonne-car-spawner/common-errors)


# Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* *(Optional)* `MS_Madonne_Notify` for enhanced notifications
* *(Optional)* `es_extended` if using `Framework = "esx"`

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Madonne\_CarSpawner** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the FiveM account used to purchase the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Madonne_CarSpawner` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Madonne_CarSpawner/
        ├── cfg/
        │   ├── config.lua
        │   ├── categories.lua
        │   ├── vehicles.lua
        │   └── parkings.lua
        ├── framework/
        │   └── esx.lua
        ├── ui/
        ├── client.lua
        ├── permissions.lua
        └── fxmanifest.lua
```

> ⚠️ The folder name must remain exactly `MS_Madonne_CarSpawner`. Renaming it will break the resource.

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`:

```cfg
ensure MS_Madonne_Notify   # optional, if using it for notifications
ensure MS_Madonne_CarSpawner
```

> ⚠️ If you use `MS_Madonne_Notify`, make sure it is started **before** `MS_Madonne_CarSpawner`.

***

## ⚙️ Step 4 — Configure the resource

Open the files inside the `cfg/` folder and configure them to match your server setup.

Refer to the [⚙️ Configuration](/paid-scripts/madonne-car-spawner/configuration) page for a full breakdown of every option.

***

## 🔄 Step 5 — Restart your server

Restart your server or run the following command in the console:

<pre><code><strong>refresh
</strong><strong>ensure MS_Madonne_CarSpawner
</strong></code></pre>

Madonne Car Spawner is now ready to use! ✅

Players can open the vehicle menu by pressing **`F7`** (default), using the **`/vehicle`** command, or by walking into a configured spawn area.


# Configuration

## Default configuration file (config.lua)

### General settings

Set delays before initialization and before the menu opens, to ensure all data is received in time.

```lua
Delay_Before_Init = 1000, -- ms
Delay_Before_Opening_Menu = 200, -- ms
```

Select the framework your server uses. Set to `"esx"` to enable job-based permissions — the ESX job name is then used as `permissionCode` in your categories and vehicles.

```lua
Framework = "standalone", -- "standalone" or "esx"
```

Configure the available ways to open the vehicle menu.

```lua
Enable_Command_To_Debug_Shipping = true,
Command_To_Debug_Shipping = "debug", -- Without '/'
Enable_Command_To_Open = true,
Command_To_Open = "vehicle", -- Without '/'
Enable_Keybind_To_Open = true,
Keybind_To_Open = 'F7',
```

> 💡 The debug command lets staff manually unstick a vehicle delivery blocked in the "en route" state.

Select whether players must stand inside a defined zone to open the menu. Markers and NPC attendants can be added per area.

```lua
Player_Must_Be_In_Area_To_Open = true,
Set_A_Marker_In_Area = true,
Set_A_NPC_In_Area = false,
```

Configure how the script behaves when no parking slot is found within detection range.

```lua
Ship_Vehicle_If_Zero_Slot_Available = true, -- if false, spawn is cancelled and a notification is sent
ParkingSlotDectionRange = 200,
```

> ⚠️ Avoid setting `ParkingSlotDectionRange` to very large values — it may cause performance issues on busy servers.

***

### Areas

Define each spawn area with its world coordinates, detection radius, marker appearance, optional NPC model, and department restrictions.

```lua
Areas = {
    [1] = {
        x = -802.311, y = 175.056, z = 72.8446, h = 0.0,
        radius = 5.0,
        marker_type = 36, -- https://docs.fivem.net/docs/game-references/markers/
        marker_color = {r = 255, g = 255, b = 255, a = 255},
        marker_rotation = true,
        NPC_Model = "s_m_y_cop_01",
        departments = {"LSPD","LSSD"}, -- set to {} or false to allow all departments
    },
},
```

| Parameter          | Description                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| `x`, `y`, `z`, `h` | World coordinates and heading of the area center                                                     |
| `radius`           | Detection radius in units to trigger menu access                                                     |
| `marker_type`      | Marker type ID — see [FiveM markers reference](https://docs.fivem.net/docs/game-references/markers/) |
| `marker_color`     | RGBA color of the marker                                                                             |
| `marker_rotation`  | Whether the marker rotates                                                                           |
| `NPC_Model`        | Ped model for the NPC attendant (`Set_A_NPC_In_Area` must be `true`)                                 |
| `departments`      | List of department names to restrict access; `{}` or `false` to allow all                            |

***

### Vehicle blips & ejection

Configure whether a minimap blip appears when a vehicle is delivered, and whether unauthorized drivers are ejected.

```lua
EjectDriverIfCantDrive = true,

Add_Blip_To_Vehicle = true,
Blip_Sprite = 56,
Blip_Colour = 57,
```

Blip sprite and colour IDs are available at [docs.fivem.net](https://docs.fivem.net/docs/game-references/blips/).

***

### NPC mechanic per vehicle type

When no nearby parking slot is found, an NPC drives the vehicle to the player. Configure the ped model used per vehicle type.

```lua
Mechano_Ped = {
    { vehicle_type = 1,         ped = "s_m_y_cop_01" },       -- Police
    { vehicle_type = 2,         ped = "s_m_y_fireman_01" },   -- Fire department
    { vehicle_type = 3,         ped = "s_m_m_paramedic_01" }, -- EMS
    { vehicle_type = 4,         ped = "s_m_y_armymech_01" },  -- Military
    { vehicle_type = "default", ped = "mp_m_waremech_01" },   -- Default / civilian
},
```

Vehicle type IDs are defined in `vehicles.lua`.

***

### Player vehicle limits

Limit how many vehicles a player can have spawned simultaneously. Permission tiers can raise the limit above the default.

```lua
Cars_Limit_By_Player = true,
Default_Cars_Limit = 3,
Permissions_Codes_For_Limits = {
    { name = "VIP OR",     limit = 6 },
    { name = "VIP ARGENT", limit = 5 },
    { name = "VIP BRONZE", limit = 4 },
},
```

> 💡 Permission codes must exactly match those assigned by your permission system.

***

### Notifications

Accepted values: `"notification"` (default FiveM notification), `"chat"` (chat message), or `"other"` (fires the `MS_CarSpawner_Notification` client event for a custom handler).

```lua
Notifications_Type = "notification",
Notifications_Chat_Color = {255, 255, 255},
```

***

### Badges

Badges display on locked vehicles in the interface. Each badge is associated with a permission code and shows a custom icon, color, and label. Icons use names from [Remix Icon](https://remixicon.com/).

```lua
Badges = {
    ["VIP OR"] = {
        label = "VIP OR",
        icon_badge = "verified-badge-fill", -- icon name from remixicon.com (without ri- prefix)
        color_badge = "#c7a635",
        display_if_locked = true,
    },
},
```

| Parameter             | Description                                                                                              |
| --------------------- | -------------------------------------------------------------------------------------------------------- |
| Key (e.g. `"VIP OR"`) | Must match the `permissionCode` set on the vehicle or category                                           |
| `label`               | Text displayed next to the icon                                                                          |
| `icon_badge`          | Remix Icon name, without the `ri-` prefix                                                                |
| `color_badge`         | Hex color of the badge                                                                                   |
| `display_if_locked`   | If `true`, the vehicle stays visible in the menu with a lock overlay when the player doesn't have access |

***

### Translations

All in-game messages are editable in the `TRANSLATIONS` table at the bottom of `config.lua`.

```lua
TRANSLATIONS = {
    Vehicle_Already_Coming             = "...",
    Shipping_In_Progress               = "...",
    Vehicle_On_Nearest_Slot            = "...",
    Vehicle_Arrived                    = "...",
    CantDrive                          = "...",
    OpenDashboard                      = "Press ~INPUT_SELECT_CHARACTER_TREVOR~ to access the Car Spawner",
    OpenKeySettings                    = "Open Car Spawner",
    NotPossibleToOpenDashboardFromHere = "...",
    OpenCommandDescription             = "...",
    DebugCommandDescription            = "...",
    NoParkingSlotAvailable             = "...",
    Shipping_Debugged                  = "...",
}
```

***

## File : categories.lua

Define each category visible in the spawn menu. The variable must be named `VEHICLES_CATEGORIES`.

```lua
VEHICLES_CATEGORIES = {
    {
        name = "LSPD",
        logo = "https://cdn.discordapp.com/attachments/.../logo.png",
        whitelist = false,
        permissionCode = "",
    },
}
```

| Parameter        | Description                                                                              |
| ---------------- | ---------------------------------------------------------------------------------------- |
| `name`           | Category name shown in the interface — must match the `category` field in `vehicles.lua` |
| `logo`           | URL of the category logo image                                                           |
| `whitelist`      | `true` to restrict access to players with the permission code                            |
| `permissionCode` | Required permission code. Can be a `string` or a table of strings                        |

> 💡 When using `Framework = "esx"`, set `permissionCode` to the ESX job name (e.g. `"police"`).

The default file includes 12 pre-configured categories: LSPD, LSPP, LSSD, BCSO, SAHP, SASP, FIB, USMS, NOOSE, SAMR, SAFR, USARMY.

***

## File : vehicles.lua

Add each vehicle to the menu. The variable must be named `VEHICLES`.

```lua
VEHICLES = {
    {
        type = 1,
        category = "LSPD",
        name = "2011 Ford CVPI - Rotatif",
        model = "mst11vic",
        spawnIn = false,
        livery = 0,
        photo = "https://cdn.discordapp.com/.../photo.jpg",
        whitelist = false,
        permissionCode = "",
        extraToEnable = {1, 4},
        extraToDisable = {2, 3, 5, 6, 7},
        primaryColor = 0,
        secondaryColor = 0,
    },
}
```

| Parameter        | Description                                                                                           |
| ---------------- | ----------------------------------------------------------------------------------------------------- |
| `type`           | Vehicle type: `0` civilian, `1` police, `2` fire department, `3` EMS, `4` military                    |
| `category`       | Must exactly match a `name` value in `categories.lua`                                                 |
| `name`           | Display name shown in the interface                                                                   |
| `model`          | In-game spawn name of the vehicle                                                                     |
| `spawnIn`        | `true` to teleport the player inside the vehicle on spawn                                             |
| `livery`         | Livery index (`0` = default)                                                                          |
| `photo`          | URL of the vehicle preview image                                                                      |
| `whitelist`      | `true` to restrict to a permission code                                                               |
| `permissionCode` | Required permission code. Can be a `string` or a table of strings                                     |
| `extraToEnable`  | List of extra IDs to enable on the vehicle                                                            |
| `extraToDisable` | List of extra IDs to disable on the vehicle                                                           |
| `primaryColor`   | Primary vehicle color ID — see [color reference](https://wiki.rage.mp/index.php?title=Vehicle_Colors) |
| `secondaryColor` | Secondary vehicle color ID                                                                            |

***

## File : parkings.lua

Contains all pre-listed parking slots used for vehicle delivery. The variable must be named `PARKING_SLOTS`.

```lua
PARKING_SLOTS = {
    -- vehicle_type, X, Y, Z, heading
    {0, 1110.62, -1506.04, 34.03, 268.66},
}
```

A `vehicle_type` of `0` makes the slot available for all types. Use a specific type ID to restrict a slot to one category.

> 💡 The default file includes **11,000+ parking slots** mapped across the entire GTA V map. Only edit this file if you want to add custom spots or restrict available locations.

***

## File : permissions.lua

This server-side file handles permission assignment. By default it grants the `STAFF` permission to players with the `madonne.vclstaff` ace permission.

```lua
RegisterNetEvent("MS_CS_CheckPermissions")
AddEventHandler("MS_CS_CheckPermissions", function()
    local src = source
    if IsPlayerAceAllowed(source, "madonne.vclstaff") then
        TriggerClientEvent("MS_CS_AddPermissionCode", src, "STAFF")
    else
        -- Add your own permission logic here
        -- TriggerClientEvent("MS_CS_AddPermissionCode", src, "YOUR_CODE")
    end
end)
```

> 💡 You can call `TriggerClientEvent("MS_CS_AddPermissionCode", src, "...")` multiple times to assign several permission codes to a player at once.


# Common Errors

## ❌ The resource does not start / is not found

**Error message:** `Couldn't start resource MS_Madonne_CarSpawner` or similar.

**Possible causes:**

* The resource folder is not named exactly `MS_Madonne_CarSpawner`
* The `ensure MS_Madonne_CarSpawner` line is missing from your `server.cfg`
* The resource was placed in a sub-folder not scanned by FiveM

**Fix:** Verify the folder name matches exactly, check your `server.cfg`, then restart your server.

***

## ❌ CFX Portal entitlement error — resource refuses to start

**Error message:** `Couldn't load resource MS_Madonne_CarSpawner` or `Escrow: invalid entitlement`.

This error means the FiveM account linked to your server's license key does not have access to this resource.

Please verify the following:

* The CFX key in your `server.cfg` contains no typo
* The key belongs to the FiveM account used to purchase the resource
* The resource has been successfully purchased on our store
* The key belongs to you and not to your hosting provider

> ⚠️ Hosts offering shared CFX keys in their packages prevent the use of any resource protected by FiveM's Escrow system, without exception.

***

## ❌ Menu opens but no vehicles are displayed

**Possible causes:**

* `vehicles.lua` is empty or contains a syntax error
* The `category` field in a vehicle entry does not match any `name` in `categories.lua`
* The player's department doesn't match the restrictions set in the area's `departments` table

**Fix:** Check that category names match exactly between `vehicles.lua` and `categories.lua`. Enable `DEBUG = true` in `config.lua` to print loaded permission codes in the console.

***

## ❌ Vehicle delivery is stuck "en route"

The NPC was spawned but the vehicle never arrives and the status stays blocked.

**Fix:** Use the debug command (default `/debug`) to manually reset the delivery. If this happens frequently, check that:

* `ParkingSlotDectionRange` is not set too high
* No other resource is deleting NPC-driven vehicles before they arrive
* The NPC ped model defined in `Mechano_Ped` is valid and loadable

***

## ❌ Vehicle spawns far from the player / NPC delivery triggered unexpectedly

**Possible causes:**

* No parking slot was found within `ParkingSlotDectionRange`, so the NPC delivery fallback was triggered (expected behavior when `Ship_Vehicle_If_Zero_Slot_Available = true`)

**Fix:** If you want vehicles to always spawn nearby, add custom parking slots near your most-used areas in `parkings.lua`, or increase `ParkingSlotDectionRange` slightly.

***

## ❌ Players can access vehicles they should not

**Possible causes:**

* `whitelist = false` is set on a vehicle or category that should be restricted
* `permissionCode` does not exactly match the code returned by your permission system
* The `departments` table in the area config is set to `{}` instead of a specific list, allowing all departments

**Fix:** Review the `whitelist` and `permissionCode` values in `vehicles.lua` and `categories.lua`. Check `permissions.lua` to confirm the codes being assigned to players match what you expect.

***

## ❌ Notifications are not displayed

**Possible causes:**

* `Notifications_Type` is set to an unrecognized value — valid values are `"notification"`, `"chat"`, and `"other"`
* The `MS_Madonne_Notify` resource is not started before `MS_Madonne_CarSpawner` in `server.cfg`

**Fix:** Set `Notifications_Type = "notification"` to use native FiveM notifications, or ensure `MS_Madonne_Notify` is ensured first in your `server.cfg`.

***

## ❌ ESX jobs are not recognized as permission codes

**Possible causes:**

* `Framework` is still set to `"standalone"` in `config.lua`
* The `permissionCode` in categories or vehicles doesn't exactly match the ESX job name

**Fix:** Set `Framework = "esx"` in `config.lua`, then set `permissionCode` to the ESX job name (e.g. `"police"`). The ESX integration is handled automatically via `framework/esx.lua`.

***

## 💬 Need further help?

Join our support server on Discord: [discord.gg/madonne](https://discord.gg/madonne)


# Madonne EUP Menu

Dress your players the right way. **Madonne EUP Menu** gives your FiveM server a clean, fully configurable outfit equipping interface — with department restrictions, spawn areas, permission-based access, and gender filtering.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Fb65LWDrA7FNAh8WfBHZz%2Fimage_2024-08-20_141149736.png?alt=media&amp;token=cdb35084-7bf1-4c09-9a3a-58d85722c3f4" alt=""><figcaption></figcaption></figure>

***

## 📖 About Madonne EUP Menu

Madonne EUP Menu allows players to browse and equip outfits through a simple NUI interface — **without any framework dependency**. Outfits are organized by category (department), each with its own logo and optional whitelist. Players can only see outfits matching their ped gender.

Server owners can define **spawn areas** with markers and optional NPC attendants, restrict outfit access by **department**, and fully control permissions via a dedicated `permissions.lua` file or any custom system.

***

## ✨ Main Features

* 🖥️ **Intuitive NUI Interface** — Players browse outfits by category with photos and names
* 🏢 **Department Restrictions** — Each spawn area can be limited to specific departments
* 🔒 **Outfit & Category Whitelisting** — Lock outfits or entire categories behind a permission code
* 👨👩 **Gender Filtering** — Outfits are automatically filtered by the player's ped gender (MP male / MP female)
* 📍 **Spawn Areas** — Restrict menu access to defined map zones with optional markers and NPC attendants
* 🎨 **Full Outfit Customization** — Configure every ped component (top, pants, shoes, hat, glasses, accessories…) and props per outfit
* 🔔 **Notification System** — Compatible with `notification`, `chat`, and custom handlers
* 🌍 **Full Translation Support** — All in-game strings are editable in a dedicated `TRANSLATIONS` table

***

## 🔗 Quick Links

* [📥 Installation](/paid-scripts/madonne-eup-menu/installation)
* [⚙️ Configuration](/paid-scripts/madonne-eup-menu/configuration)
* [❓ Common Errors](/paid-scripts/madonne-eup-menu/common-errors)


# Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* An **EUP** pack installed on your server (ped components and props must exist server-side)

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Madonne\_EUPMenu** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the FiveM account used to purchase the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Madonne_EUPMenu` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Madonne_EUPMenu/
        ├── client/
        │   ├── core/
        │   └── custom/
        │       └── notifications.lua
        ├── server/
        │   ├── core/
        │   └── custom/
        │       └── permissions.lua
        ├── config/
        │   ├── config.lua
        │   ├── categories.lua
        │   └── outfits.lua
        ├── ui/
        └── fxmanifest.lua
```

> ⚠️ The folder name must remain exactly `MS_Madonne_EUPMenu`. Renaming it will break the resource.

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`:

<pre class="language-cfg"><code class="lang-cfg"><strong>ensure MS_Madonne_EUPMenu
</strong></code></pre>

***

## ⚙️ Step 4 — Configure the resource

Open the files inside the `config/` folder and configure them to match your server setup.

Refer to the [⚙️ Configuration](/paid-scripts/madonne-eup-menu/configuration) page for a full breakdown of every option.

***

## 🔄 Step 5 — Restart your server

Restart your server or run the following command in the console:

```
refresh
ensure MS_Madonne_EUPMenu
```

Madonne EUP Menu is now ready to use! ✅

Players can open the outfit menu by pressing **`F7`** (default), using the **`/eup`** command, or by walking into a configured spawn area.

> ⚠️ Players must be using an **MP freemode ped** (`mp_m_freemode_01` or `mp_f_freemode_01`) to access the menu. The resource will display a notification if the player's ped is not compatible.


# Configuration

## Default configuration file (config.lua)

### General settings

Set a delay before the script initializes, to ensure all data is received before allowing players to open the menu.

```lua
Delay_Before_Init = 1000, -- ms
```

Configure the available ways to open the outfit menu.

```lua
Enable_Command_To_Open = true,
Command_To_Open = "eup", -- Without '/'
Enable_Keybind_To_Open = true,
Keybind_To_Open = 'F7',
```

Select whether players must stand inside a defined zone to open the menu. Markers and NPC attendants can be added per area.

```lua
Player_Must_Be_In_Area_To_Open = true,
Set_A_Marker_In_Area = true,
Set_A_NPC_In_Area = false,
```

***

### Areas

Define each spawn area with its world coordinates, detection radius, marker appearance, optional NPC model, and department restrictions.

```lua
Areas = {
    [1] = {
        x = -802.311, y = 175.056, z = 72.8446, h = 0.0,
        radius = 5.0,
        marker_type = 21, -- https://docs.fivem.net/docs/game-references/markers/
        marker_color = {r = 255, g = 255, b = 255, a = 255},
        marker_rotation = true,
        NPC_Model = "s_m_y_cop_01",
        departments = {"LSPD"}, -- set to {} or false to show all departments
    },
},
```

| Parameter          | Description                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| `x`, `y`, `z`, `h` | World coordinates and heading of the area center                                                     |
| `radius`           | Detection radius in units to trigger menu access                                                     |
| `marker_type`      | Marker type ID — see [FiveM markers reference](https://docs.fivem.net/docs/game-references/markers/) |
| `marker_color`     | RGBA color of the marker                                                                             |
| `marker_rotation`  | Whether the marker rotates                                                                           |
| `NPC_Model`        | Ped model for the NPC attendant (`Set_A_NPC_In_Area` must be `true`)                                 |
| `departments`      | List of department names to restrict access; `{}` or `false` to allow all                            |

***

### Notifications

Accepted values: `"notification"` (default FiveM notification), `"chat"` (chat message), or `"other"` (fires the `MS_EUPMenu_Notification` client event for a custom handler).

```lua
Notifications_Type = "notification",
Notifications_Chat_Color = {255, 255, 255},
```

To use a custom notification script, edit `client/custom/notifications.lua`:

```lua
RegisterNetEvent("MS_EUPMenu_Notification")
AddEventHandler("MS_EUPMenu_Notification", function(text)
    -- Example with okokNotify:
    exports['okokNotify']:Alert("MadonneStudio", text, 5000, 'info', true)
end)
```

***

### Translations

All in-game messages are editable in the `TRANSLATIONS` table at the bottom of `config.lua`.

```lua
TRANSLATIONS = {
    OpenCommandDescription             = "Open EUP Menu",
    OpenKeySettings                    = "Open EUP Menu",
    OpenDashboard                      = "Press ~INPUT_SELECT_CHARACTER_TREVOR~ to access the EUP Menu",
    NotPossibleToOpenDashboardFromHere = "It's not possible to open the EUP menu from here.",
    NeedToBeAMPPed                     = "You need to be a MP ped to use the EUP menu.",
}
```

***

## File : categories.lua

Define each outfit category visible in the menu. The variable must be named `OUTFITS_CATEGORIES`.

```lua
OUTFITS_CATEGORIES = {
    {
        name = "LSPD",
        logo = "https://cdn.discordapp.com/attachments/.../logo.png",
        whitelist = false,
        permissionCode = "",
    },
}
```

| Parameter        | Description                                                                             |
| ---------------- | --------------------------------------------------------------------------------------- |
| `name`           | Category name shown in the interface — must match the `category` field in `outfits.lua` |
| `logo`           | URL of the category logo image                                                          |
| `whitelist`      | `true` to restrict access to players with the permission code                           |
| `permissionCode` | Required permission code. Can be a `string`                                             |

***

## File : outfits.lua

Add each outfit to the menu. The variable must be named `OUTFITS`.

Each outfit defines every ped component and prop using the format `"drawableId:textureId"` (both 1-indexed).

```lua
OUTFITS = {
    {
        category = "LSPD",
        name = "Classe A",
        image = "https://cdn.discordapp.com/.../photo.jpg",
        gender = "M", -- "M" or "F"
        whitelist = false,
        permissionCode = "",
        ----------------------------
        mask       = "1:1",
        upperskin  = "7:1",
        pants      = "36:1",
        parachute  = "33:2",
        shoes      = "62:1",
        accessories = "237:1",
        undercoat  = "225:1",
        armor      = "201:1",
        decal      = "1:1",
        top        = "201:9",
        hat        = "1:1",
        glasses    = "1:1",
        ear        = "1:1",
        watch      = "1:1",
    },
}
```

| Parameter        | Description                                                                |
| ---------------- | -------------------------------------------------------------------------- |
| `category`       | Must exactly match a `name` value in `categories.lua`                      |
| `name`           | Display name shown in the interface                                        |
| `image`          | URL of the outfit preview image                                            |
| `gender`         | `"M"` for MP male ped, `"F"` for MP female ped                             |
| `whitelist`      | `true` to restrict to a permission code                                    |
| `permissionCode` | Required permission code                                                   |
| `mask` … `watch` | Ped component or prop value in `"drawableId:textureId"` format (1-indexed) |

**Component reference:**

| Field         | Ped component slot          |
| ------------- | --------------------------- |
| `mask`        | Component 1                 |
| `upperskin`   | Component 3                 |
| `pants`       | Component 4                 |
| `parachute`   | Component 5 (bag/parachute) |
| `shoes`       | Component 6                 |
| `accessories` | Component 7                 |
| `undercoat`   | Component 8                 |
| `armor`       | Component 9                 |
| `decal`       | Component 10                |
| `top`         | Component 11                |
| `hat`         | Prop 0                      |
| `glasses`     | Prop 1                      |
| `ear`         | Prop 2                      |
| `watch`       | Prop 6                      |

> 💡 Set a component to `"1:1"` to apply drawable index 0 / texture 0 (the first available). For props, `"1:1"` will **clear** the prop slot entirely.

***

## File : permissions.lua

This server-side file handles permission assignment. By default it grants the `STAFF` permission to players with the `madonne.staffoutfit` ace permission.

```lua
RegisterNetEvent("MS_EM_CheckPermissions")
AddEventHandler("MS_EM_CheckPermissions", function()
    local src = source
    if IsPlayerAceAllowed(source, "madonne.staffoutfit") then
        TriggerClientEvent("MS_CS_AddPermissionCode", src, "STAFF")
    else
        -- Add your own permission logic here
        -- TriggerClientEvent("MS_CS_AddPermissionCode", src, "YOUR_CODE")
    end
end)
```

> 💡 You can call `TriggerClientEvent("MS_CS_AddPermissionCode", src, "...")` multiple times to assign several permission codes to a player at once.


# Common Errors

## ❌ The resource does not start / is not found

**Error message:** `Couldn't start resource MS_Madonne_EUPMenu` or similar.

**Possible causes:**

* The resource folder is not named exactly `MS_Madonne_EUPMenu`
* The `ensure MS_Madonne_EUPMenu` line is missing from your `server.cfg`
* The resource was placed in a sub-folder not scanned by FiveM

**Fix:** Verify the folder name matches exactly, check your `server.cfg`, then restart your server.

***

## ❌ CFX Portal entitlement error — resource refuses to start

**Error message:** `Couldn't load resource MS_Madonne_EUPMenu` or `Escrow: invalid entitlement`.

This error means the FiveM account linked to your server's license key does not have access to this resource.

Please verify the following:

* The CFX key in your `server.cfg` contains no typo
* The key belongs to the FiveM account used to purchase the resource
* The resource has been successfully purchased on our store
* The key belongs to you and not to your hosting provider

> ⚠️ Hosts offering shared CFX keys in their packages prevent the use of any resource protected by FiveM's Escrow system, without exception.

***

## ❌ "You need to be a MP ped" notification appears

The menu refuses to open because the player is not using a freemode ped.

**Fix:** The resource only works with `mp_m_freemode_01` (MP male) and `mp_f_freemode_01` (MP female). Make sure your players spawn with one of these ped models. Custom ped models are not supported.

***

## ❌ Menu opens but no outfits are displayed

**Possible causes:**

* `outfits.lua` is empty or contains a syntax error
* The `category` field in an outfit entry does not match any `name` in `categories.lua`
* The `gender` field does not match the player's current ped model
* The `departments` restriction in the area config is set to a list that doesn't include the player's department

**Fix:** Check that category names match exactly between `outfits.lua` and `categories.lua`. Verify the `gender` field (`"M"` or `"F"`) matches the ped the player is using.

***

## ❌ Outfit is equipped incorrectly / wrong component applied

**Possible causes:**

* A component value uses the wrong format — the expected format is `"drawableId:textureId"` with both values **1-indexed** (so `"1:1"` = drawable 0, texture 0)
* A drawable or texture index doesn't exist in your EUP pack

**Fix:** Double-check all component values in `outfits.lua`. Remember that `"1:1"` corresponds to index 0 in-game. For props (`hat`, `glasses`, `ear`, `watch`), setting `"1:1"` clears the prop slot.

***

## ❌ Menu cannot be opened from the configured area

**Possible causes:**

* `Player_Must_Be_In_Area_To_Open = true` but the area coordinates or radius are not set correctly
* The `departments` table in the area config doesn't include the player's department name

**Fix:** Verify the `x`, `y`, `z` coordinates and `radius` in your `Areas` config. Make sure the department names in `departments` exactly match those in `categories.lua`.

***

## ❌ Notifications are not displayed

**Possible causes:**

* `Notifications_Type` is set to an unrecognized value — valid values are `"notification"`, `"chat"`, and `"other"`
* When using `"other"`, the event handler in `client/custom/notifications.lua` is not properly set up

**Fix:** Set `Notifications_Type = "notification"` to use native FiveM notifications, or configure your custom handler in `client/custom/notifications.lua`.

***

### 💬 Need further help?

Join our support server on Discord: [discord.gg/madonne](https://discord.gg/madonne)


# Madonne Notify

A lightweight and elegant notification system for your FiveM server. **Madonne Notify** displays stylish toast notifications to your players, with support for multiple types, titles, messages, sounds, and custom durations.

***

## 📖 About Madonne Notify

Madonne Notify is a free, plug-and-play notification resource built with **Vue 3**. Notifications appear in the **top-right corner** of the screen as animated toast cards, each color-coded and icon-tagged by type.

It is natively supported by other MadonneStudio resources such as **MS\_Delete\_Gun** and **MS\_Madonne\_Seatbelt**, and can be used as a standalone notification system on any FiveM server.

***

## ✨ Main Features

* 🎨 **11 Notification Types** — Each type has its own color and icon: `success`, `error`, `warning`, `info`, `announce`, `progress`, `achievement`, `msg`, `radio`, `system`, `vehicle`
* 🔊 **Optional Sound** — Play a built-in UI sound on notification display
* ⏱️ **Custom Duration** — Control exactly how long each notification stays on screen
* 📌 **Title + Message** — Display a bold title, a subtitle message, or both
* 🎞️ **Smooth Animations** — Slide-in / slide-out transitions on every notification
* 🧩 **Export-based API** — Trigger notifications from any resource via a simple client or server export
* 📡 **Event-based API** — Also supports triggering via NetEvents for server-to-client notifications
* 🆓 **Free Script** — No escrow, fully open source

***

## 🔗 Quick Links

* [📥 Installation](/free-scripts/madonne-notify/installation)
* [📡 Usage & API](/free-scripts/madonne-notify/usage-and-api)
* [❓ Common Errors](/free-scripts/madonne-notify/common-errors)


# Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* No additional dependencies required

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Madonne\_Notify** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased or claimed resources.

> 💡 You must be logged in with the account used to claim the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Madonne_Notify` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Madonne_Notify/
        ├── ui/
        ├── client.lua
        ├── server.lua
        └── fxmanifest.lua
```

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`. This resource has no dependencies, so it can be started at any point:

```cfg
ensure MS_Madonne_Notify
```

> ⚠️ If other resources depend on MS\_Madonne\_Notify (e.g. MS\_Madonne\_Seatbelt with `NotificationsType = "MS_Madonne_Notify"`), make sure `MS_Madonne_Notify` is started **before** them.

***

## 🔄 Step 4 — Restart your server

Restart your server or run the following command in the console:

```
refresh
start MS_Madonne_Notify
```

Madonne Notify is now ready to use! ✅


# Usage & API

Madonne Notify exposes a simple API usable from any resource via **exports** (client-side or server-side).

***

## 🖥️ Client-side Export

Trigger a notification directly from a client-side script:

```lua
exports['MS_Madonne_Notify']:Notify(type, title, message, duration, sound)
```

### Parameters

| Parameter  | Type      | Description                                                      |
| ---------- | --------- | ---------------------------------------------------------------- |
| `type`     | `string`  | Notification type (see types below)                              |
| `title`    | `string`  | Title displayed in bold. Pass `""` to hide.                      |
| `message`  | `string`  | Subtitle message. Pass `""` to hide.                             |
| `duration` | `number`  | Display duration in **milliseconds** (e.g. `5000` for 5 seconds) |
| `sound`    | `boolean` | `true` to play a UI sound when the notification appears          |

### Example

```lua
exports['MS_Madonne_Notify']:Notify("success", "Seatbelt", "Seatbelt fastened!", 4000, true)
exports['MS_Madonne_Notify']:Notify("error", "Alert", "You are not allowed to do this.", 5000, false)
exports['MS_Madonne_Notify']:Notify("info", "", "Server restart in 10 minutes.", 6000, true)
```

***

## 🌐 Server-side Export

Trigger a notification from a server-side script, targeting a specific player by their server ID:

```lua
exports['MS_Madonne_Notify']:Notify(target, type, title, message, duration, sound)
```

### Parameters

| Parameter  | Type      | Description                                         |
| ---------- | --------- | --------------------------------------------------- |
| `target`   | `number`  | Player server ID (`-1` to broadcast to all players) |
| `type`     | `string`  | Notification type (see types below)                 |
| `title`    | `string`  | Title displayed in bold. Pass `""` to hide.         |
| `message`  | `string`  | Subtitle message. Pass `""` to hide.                |
| `duration` | `number`  | Display duration in **milliseconds**                |
| `sound`    | `boolean` | `true` to play a UI sound                           |

### Example

```lua
-- Send to a specific player
exports['MS_Madonne_Notify']:Notify(source, "warning", "Warning", "Your behavior has been noted.", 5000, true)

-- Broadcast to all players
exports['MS_Madonne_Notify']:Notify(-1, "announce", "Server", "An event is starting!", 8000, true)
```

***

## 📡 NetEvent (Client-side)

Notifications can also be triggered via a NetEvent, useful for more dynamic or event-driven systems:

```lua
TriggerEvent('MST_Notify:Notify', type, title, message, duration, sound)
```

Or from the server:

```lua
TriggerClientEvent('MST_Notify:Notify', source, type, title, message, duration, sound)
```

***

## 🎨 Notification Types

Each type comes with a dedicated color and icon:

| Type          | Color    | Icon           | Use case                  |
| ------------- | -------- | -------------- | ------------------------- |
| `info`        | Purple   | ℹ️ Information | General information       |
| `announce`    | Purple   | 📢 Megaphone   | Server announcements      |
| `progress`    | Purple   | ⏳ Hourglass    | Ongoing actions           |
| `success`     | Green    | ✅ Check        | Successful actions        |
| `achievement` | Green    | 🏆 Trophy      | Unlocked achievements     |
| `error`       | Dark Red | ⚠️ Warning     | Errors or blocked actions |
| `warning`     | Orange   | 🔔 Alert       | Warnings                  |
| `msg`         | White    | 💬 Message     | Chat or messages          |
| `radio`       | White    | 📻 Broadcast   | Radio communications      |
| `system`      | White    | ⚙️ Settings    | System events             |
| `vehicle`     | White    | 🚗 Car         | Vehicle-related events    |

***

> 💡 **Tip:** You can omit the title or message by passing an empty string `""`. The notification will adapt its layout accordingly and only show the content you provide.


# Common Errors

## 🔴 Notifications are not showing up

**Cause 1:** `MS_Madonne_Notify` is not started on your server.

**Fix:** Make sure the resource is added to your `server.cfg` and started before any resource that depends on it:

```cfg
ensure MS_Madonne_Notify
```

**Cause 2:** The resource started but the NUI page failed to load.

**Fix:** Check your server console for any errors related to `MS_Madonne_Notify`. Make sure the `ui/` folder is present and intact in the resource directory.

***

## 🔴 Export call throws an error

**Cause:** The resource name in the export call doesn't match the actual folder name.

**Fix:** Make sure you are using the exact resource name. The correct call is:

```lua
exports['MS_Madonne_Notify']:Notify(...)
```

Double-check that the folder is named `MS_Madonne_Notify` (case-sensitive on Linux servers).

***

## 🔴 Server-side export doesn't send the notification to the player

**Cause:** The `target` parameter is incorrect or the player is no longer connected.

**Fix:** Make sure you are passing a valid active server ID. Use `source` inside a server event handler, or verify the player is still online before triggering.

```lua
-- Correct server-side usage
exports['MS_Madonne_Notify']:Notify(source, "info", "Title", "Message", 5000, false)
```

***

## 🔴 The notification appears but no sound plays

**Cause:** The `sound` parameter is set to `false` or omitted.

**Fix:** Pass `true` as the last parameter:

```lua
exports['MS_Madonne_Notify']:Notify("success", "Title", "Message", 5000, true)
```

***

## 🔴 You lack the required entitlement to use MS\_Madonne\_Notify

This message indicates that your server does not have the necessary entitlement to start the resource. This is related to FiveM's **Escrow** protection system.

Check the following points one by one:

* ✅ The **CFX Portal key** listed in your `server.cfg` does not contain any typing error
* ✅ The CFX Portal key belongs to the **FiveM account that was used to purchase or claim** the resource
* ✅ The resource has been **successfully claimed** on the [CFX Portal](https://portal.cfx.re/)
* ✅ The CFX Portal key linked to your server **belongs to you**, and not to your hosting provider

> ⚠️ **Important warning about hosting provider keys**
>
> Some hosting providers include a shared CFX Portal key as part of their offers. We strongly advise against using such keys. A key that does not belong to you will block the use of **any resource protected by FiveM's Escrow system**, without exception — not just this one. Always use your own personal CFX Portal key.

***

## 💬 Still having issues?

If you are still experiencing problems after following the steps above, feel free to reach out to us:

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Madonne Seatbelt

Protect yourself from road accidents by fastening your seat belt! **Madonne Seatbelt** adds a realistic and fully configurable seatbelt system to your FiveM server, with ejection physics, sound effects, visual warnings, and developer hooks.

{% embed url="<https://www.youtube.com/watch?v=l37t1e8vXjE>" %}

***

## 📖 About Madonne Seatbelt

Madonne Seatbelt simulates real-world seatbelt mechanics in GTA V. Players can fasten and unfasten their seatbelt with a configurable key. If they are involved in a high-speed collision without their seatbelt on, they will be **physically ejected from the vehicle**.

A **visual warning icon** blinks on-screen when the player is in a moving vehicle without a seatbelt, and an **alarm sound** can be configured to play after a set interval.

***

## ✨ Main Features

* 🪢 **Realistic Ejection System** — Players are expelled from their vehicle on sharp deceleration if unbuckled, with configurable sensitivity and velocity multiplier
* 🖼️ **Visual Warning Indicator** — An animated blinking seatbelt icon appears on screen when the player is unbuckled
* 🔔 **Alarm Sound** — A looping alert plays when the player drives above a configurable speed without their seatbelt
* 🔊 **Buckle / Unbuckle Sounds** — Realistic audio feedback when toggling the seatbelt
* ⌨️ **Configurable Key Binding** — Default key is `K`, fully remappable by players in their FiveM settings
* 🚗 **Vehicle & Class Exclusions** — Disable seatbelts for specific vehicle models or entire vehicle classes (bikes, boats, helicopters…)
* 💺 **Per-Seat Whitelisting** — Prevent ejection from specific seats in specific vehicles (e.g. police car passenger seats)
* 🔔 **Notification System** — Compatible with `default`, `MS_Madonne_Notify`, `okokNotify`, or a fully custom handler
* 🧩 **Developer Exports** — `GetSeatbeltStatus` and `SetSeatbeltStatus` exports for integration with other resources
* 🪝 **Custom Hooks** — `FastenedSeatbelt()` and `UnfastenedSeatbelt()` functions in `custom/main.lua` for your own logic

***

## 🔗 Quick Links

* [📥 Installation](/free-scripts/madonne-seatbelt/installation)
* [⚙️ Configuration](/free-scripts/madonne-seatbelt/configuration)
* [🧩 Exports & Events](/free-scripts/madonne-seatbelt/exports-and-events)
* [❓ Common Errors](/free-scripts/madonne-seatbelt/common-errors)


# Installation

## 📋 Requirements

* A **FiveM server** running on artifact `2699` or above
* *(Optional)* `MS_Madonne_Notify` or `okokNotify` for enhanced notifications

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Madonne\_Seatbelt** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the account used to purchase the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Madonne_Seatbelt` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Madonne_Seatbelt/
        ├── client/
        ├── custom/
        ├── ui/
        ├── config.lua
        ├── server.lua
        └── fxmanifest.lua
```

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`, **after** any optional notification resource:

```cfg
ensure MS_Madonne_Notify   # optional, if using it for notifications
ensure MS_Madonne_Seatbelt
```

> ⚠️ If you use `NotificationsType = "MS_Madonne_Notify"` or `"okokNotify"`, make sure those resources are started **before** MS\_Madonne\_Seatbelt.

***

## ⚙️ Step 4 — Configure the resource

Open `config.lua` and configure the resource to match your server setup.

Refer to the [⚙️ Configuration](/free-scripts/madonne-seatbelt/configuration) page for a full breakdown of every option.

***

## 🔄 Step 5 — Restart your server

Restart your server or run the following command in the console:

```
ensure
start MS_Madonne_Seatbelt
```

Madonne Seatbelt is now ready to use! ✅

Players can fasten their seatbelt by pressing **`K`** (default) while inside a vehicle.


# Configuration

All configuration is done in `config.lua`, which is not escrowed and can be freely edited.

***

## 🚗 Vehicle Exclusions

```lua
DisableSeatbeltsForThisVehicles = {
    "harley","blazer","bmx","cruiser","gator3"
    -- add any vehicle model name here
},
```

List of **specific vehicle models** for which the seatbelt system is completely disabled. Useful for bicycles, ATVs, forklifts, and similar vehicles where a seatbelt makes no sense.

***

```lua
DisableSeatbeltsForThisVehcilesClasses = {
    8, 13, 14, 15, 16, 21, 22
},
```

List of **vehicle class IDs** for which the seatbelt system is disabled. This is the recommended way to exclude entire categories (motorcycles, boats, helicopters, planes…).

> 📖 Full class list: [FiveM Natives — GetVehicleClass](https://docs.fivem.net/natives/?_0x29439776AAA00A62)

***

## ⌨️ Key Binding & Controls

| Option                         | Type      | Description                                                           |
| ------------------------------ | --------- | --------------------------------------------------------------------- |
| `SeatbeltKey`                  | `string`  | Default key to toggle the seatbelt. Default: `"K"`                    |
| `KeymapText`                   | `string`  | Label shown in the FiveM key binding settings                         |
| `EnableWhenDead`               | `boolean` | If `true`, the seatbelt system remains active when the player is dead |
| `Cooldown`                     | `number`  | Minimum delay in **milliseconds** between two seatbelt toggles        |
| `LeaveVehicleWhenSeatbeltIsOn` | `boolean` | If `false`, the player cannot exit the vehicle while buckled          |

***

## 🖼️ Visual Warning

| Option                            | Type      | Description                                                                                              |
| --------------------------------- | --------- | -------------------------------------------------------------------------------------------------------- |
| `ShowBlinker`                     | `boolean` | Show the seatbelt warning icon when the player is unbuckled                                              |
| `SetBlinkerPermanent`             | `boolean` | If `true`, the icon stays visible permanently until the seatbelt is fastened. If `false`, it blinks      |
| `ShowBlinkerWhenVehicleIsStopped` | `boolean` | Show the warning even when the vehicle is stationary                                                     |
| `BlinkerMinSpeed`                 | `number`  | Minimum speed (km/h) to show the warning. Only applies when `ShowBlinkerWhenVehicleIsStopped` is `false` |

***

## 🔊 Sound

| Option          | Type      | Description                                                   |
| --------------- | --------- | ------------------------------------------------------------- |
| `ActivateSound` | `boolean` | Play buckle/unbuckle sound effects when toggling the seatbelt |
| `LoopSound`     | `boolean` | Enable the looping alarm when driving unbuckled               |
| `Volume`        | `number`  | Volume of buckle/unbuckle sounds (`0.0` to `1.0`)             |

***

## 🔔 Notifications

| Option                | Type      | Description                                                     |
| --------------------- | --------- | --------------------------------------------------------------- |
| `EnableNotifications` | `boolean` | Show a notification when the seatbelt is fastened or unfastened |
| `NotificationsType`   | `string`  | Notification system to use. See values below.                   |

### **Notification type values:**

| Value       | Behavior                                                                                                              |
| ----------- | --------------------------------------------------------------------------------------------------------------------- |
| `"default"` | Uses the native GTA V notification system                                                                             |
| `"auto"`    | Detects automatically — checks for **MS\_Madonne\_Notify** first, then **okokNotify**, then falls back to `"default"` |
| `"custom"`  | Uses your custom handler defined in `custom/notifs.lua`                                                               |

### **Notification strings:**

```lua
Strings = {
    notification_title = "Seatbelt System",
    seatbelt_on  = 'Seatbelt : ~g~set',
    seatbelt_off = 'Seatbelt : ~r~removed',
},
```

You can edit these strings to change the notification text and title.

***

## 💥 Ejection Physics

| Option                        | Type      | Description                                                                                 |
| ----------------------------- | --------- | ------------------------------------------------------------------------------------------- |
| `DiffTrigger`                 | `number`  | Speed difference threshold that triggers ejection. Lower = more sensitive. Default: `0.325` |
| `MinSpeed`                    | `number`  | Minimum vehicle speed (m/s) at which ejection can occur. Default: `13.9` (\~50 km/h)        |
| `VelocityMultiplicator`       | `number`  | Multiplier applied to the player's ejection velocity. Higher = further ejection             |
| `DisableEjectionWhenBreaking` | `boolean` | If `true`, ejection is disabled while the player is actively pressing the brake             |

***

## 🚨 Alarm

| Option           | Type      | Description                                                   |
| ---------------- | --------- | ------------------------------------------------------------- |
| `AlarmEnabled`   | `boolean` | Enable the seatbelt alarm system                              |
| `AlarmOnlySpeed` | `boolean` | Only trigger the alarm when the vehicle is above `AlarmSpeed` |
| `AlarmDuration`  | `number`  | Interval in **milliseconds** between each alarm sound loop    |
| `AlarmSpeed`     | `number`  | Minimum speed (km/h) to trigger the alarm                     |
| `AlarmVolume`    | `number`  | Volume of the alarm sound (`0.0` to `1.0`)                    |

***

## 💺 Per-Seat Ejection Whitelist

The `DisallowEjectionFromSeats` table lets you prevent ejection for specific **seats in specific vehicles**. This is useful for police vehicles where passengers should never be ejected.

```lua
DisallowEjectionFromSeats = {
    DisableAlarmInThisSituations = true,
    ["police"] = {-1, 1, 2},
    ["policeb"] = {-1},
}
```

| Option                         | Type      | Description                                                                    |
| ------------------------------ | --------- | ------------------------------------------------------------------------------ |
| `DisableAlarmInThisSituations` | `boolean` | If `true`, the alarm and blinker are also hidden for whitelisted seats         |
| `["model"]`                    | `table`   | Vehicle model name mapped to a list of seat indexes where ejection is disabled |

> 📖 Seat index reference: [FiveM Natives — GetPedInVehicleSeat](https://docs.fivem.net/natives/?_0x22AC59A870E6A669)
>
> `-1` = driver seat, `0` = front passenger, `1` = rear left, `2` = rear right, etc.

***

## 🪝 Custom Hooks — custom/main.lua

Two empty functions are available in `custom/main.lua` for you to add your own logic when the seatbelt state changes:

```lua
function FastenedSeatbelt()
    -- Called when the player fastens the seatbelt
end

function UnfastenedSeatbelt()
    -- Called when the player unfastens the seatbelt
end
```

***

## 🔔 Custom Notifications — custom/notifs.lua

Used when `NotificationsType` is set to `"custom"`. Edit the two event handlers to implement your own notification logic:

```lua
RegisterNetEvent("MS_MS_Seatbelt_Fastened_Notification")
AddEventHandler("MS_MS_Seatbelt_Fastened_Notification", function()
    -- Your notification for seatbelt fastened
end)

RegisterNetEvent("MS_MS_Seatbelt_Unfastened_Notification")
AddEventHandler("MS_MS_Seatbelt_Unfastened_Notification", function()
    -- Your notification for seatbelt unfastened
end)
```


# Exports & Events

Madonne Seatbelt exposes two **client-side exports** for integration with other resources, allowing you to read or control the seatbelt state programmatically.

***

## 📤 GetSeatbeltStatus

Returns the current seatbelt status of the local player.

```lua
local isBuckled = exports['MS_Madonne_Seatbelt']:GetSeatbeltStatus()
-- Returns: true (buckled) or false (unbuckled)
```

### Example use case

```lua
-- Prevent a player from exiting a vehicle if unbuckled
if not exports['MS_Madonne_Seatbelt']:GetSeatbeltStatus() then
    TriggerEvent('chat:addMessage', { args = { "You must fasten your seatbelt before exiting!" } })
end
```

***

## 📥 SetSeatbeltStatus

Forces the seatbelt state of the local player to a specific value.

```lua
exports['MS_Madonne_Seatbelt']:SetSeatbeltStatus(status)
```

| Parameter | Type      | Description                                       |
| --------- | --------- | ------------------------------------------------- |
| `status`  | `boolean` | `true` to force buckle, `false` to force unbuckle |

### Example use case

```lua
-- Force buckle the player when entering a specific vehicle
exports['MS_Madonne_Seatbelt']:SetSeatbeltStatus(true)

-- Force unbuckle on player death
exports['MS_Madonne_Seatbelt']:SetSeatbeltStatus(false)
```

> ⚠️ `SetSeatbeltStatus` only updates the internal state. It does not trigger the buckle/unbuckle sounds, notifications, or custom hooks. If you need those, trigger the seatbelt toggle manually through player input or use `FastenedSeatbelt()` / `UnfastenedSeatbelt()` in `custom/main.lua`.

***

## 🪝 Custom Hook Functions

Two functions in `custom/main.lua` are called automatically by the resource when the player toggles their seatbelt. You can add any logic inside them:

```lua
function FastenedSeatbelt()
    -- Called every time the player buckles up
    -- Example: sync state to server, trigger animations, update HUD...
end

function UnfastenedSeatbelt()
    -- Called every time the player unbuckles
end
```

***

## 📡 Custom Notification Events

When `NotificationsType` is set to `"custom"`, the following client-side events are triggered:

```lua
-- Triggered when the player fastens the seatbelt
RegisterNetEvent("MS_MS_Seatbelt_Fastened_Notification")

-- Triggered when the player unfastens the seatbelt
RegisterNetEvent("MS_MS_Seatbelt_Unfastened_Notification")
```

These are already set up in `custom/notifs.lua` for you to fill in.


# Common Errors

## 🔴 Players are not being ejected from vehicles

**Cause 1:** The vehicle is in the `DisableSeatbeltsForThisVehicles` or `DisableSeatbeltsForThisVehcilesClasses` exclusion list.

**Fix:** Remove the vehicle model or class from the exclusion list in `config.lua`.

**Cause 2:** `DiffTrigger` is set too high, making the ejection threshold too insensitive.

**Fix:** Lower the `DiffTrigger` value (e.g. from `0.325` to `0.2`) to make ejection trigger more easily.

**Cause 3:** `MinSpeed` is set too high, so ejection never triggers at normal speeds.

**Fix:** Lower the `MinSpeed` value. The default is `13.9` (approximately 50 km/h). Set it lower if needed.

**Cause 4:** The player is in a whitelisted seat defined in `DisallowEjectionFromSeats`.

**Fix:** Check the `DisallowEjectionFromSeats` table in `config.lua` and adjust the vehicle/seat entries as needed.

***

## 🔴 The seatbelt warning icon is not showing

**Cause:** `ShowBlinker` is set to `false`.

**Fix:** Set `ShowBlinker` to `true` in `config.lua`.

***

## 🔴 The alarm is not playing

**Cause 1:** `AlarmEnabled` is set to `false`.

**Fix:** Set `AlarmEnabled` to `true`.

**Cause 2:** `AlarmOnlySpeed` is `true` and the vehicle speed is below `AlarmSpeed`.

**Fix:** Either lower `AlarmSpeed` or set `AlarmOnlySpeed` to `false` to always play the alarm when unbuckled.

***

## 🔴 Notifications are not showing

**Cause:** The configured `NotificationsType` resource is not running on your server.

**Fix:** Either:

* Set `NotificationsType` to `"auto"` to let the resource detect the best available system automatically
* Set it to `"default"` to use the native GTA V notification system
* If using `"custom"`, make sure your handlers are correctly defined in `custom/notifs.lua`

***

## 🔴 The resource loads but the seatbelt key does nothing

**Cause:** The key binding may have been remapped or is conflicting with another resource.

**Fix:** Check the FiveM key bindings in your game settings under `Settings > Key Bindings > FiveM` and look for the **"(Un)fasten seatbelt"** entry. Reset it to the default key if needed.

***

## 🔴 You lack the required entitlement to use MS\_Madonne\_Seatbelt

This message indicates that your server does not have the necessary entitlement to start the resource. This is related to FiveM's **Escrow** protection system.

Check the following points one by one:

* ✅ The **CFX Portal key** listed in your `server.cfg` does not contain any typing error
* ✅ The CFX Portal key belongs to the **FiveM account that was used to purchase or claim** the resource
* ✅ The resource has been **successfully claimed** on the [CFX Portal](https://portal.cfx.re/)
* ✅ The CFX Portal key linked to your server **belongs to you**, and not to your hosting provider

> ⚠️ **Important warning about hosting provider keys**
>
> Some hosting providers include a shared CFX Portal key as part of their offers. We strongly advise against using such keys. A key that does not belong to you will block the use of **any resource protected by FiveM's Escrow system**, without exception — not just this one. Always use your own personal CFX Portal key.

***

## 💬 Still having issues?

If you are still experiencing problems after following the steps above, feel free to reach out to us:

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# Delete Gun

Do you want to offer your administrators a simple, effective, and fun solution for deleting abandoned vehicles, peds, or any entity on the map? The **Delete Gun** is available for free!

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FuyZUN8KzLqMB1bLSyw5X%2Fimage.png?alt=media&amp;token=a308f516-e4b1-4c04-b03c-287b156fa8e8" alt=""><figcaption></figcaption></figure>

***

## 📖 About Delete Gun

With the Delete Gun, all you have to do is **aim and shoot** at any entity using the configured weapon to instantly delete it from the server. No commands, no menus — just point and fire.

The resource is designed to be lightweight, flexible, and compatible with most FiveM server setups.

***

## ✨ Main Features

* 🎯 **Aim & Shoot** — Point the configured weapon at any entity and shoot to delete it instantly
* 🔫 **Configurable Weapon** — Choose any weapon model to use as the delete gun
* 🔐 **Flexible Permission System** — Supports ACE permissions, MadonnAdmin, ESX, or a fully custom system
* 🧩 **Multi-Mode Support** — Configure multiple gun modes with different behaviors (delete, freeze, custom actions…)
* 🔔 **Notification System** — Compatible with default GTA notifications, chat, MS\_Madonne\_Notify, okokNotify, or a fully custom handler
* 🎁 **Auto-Give Weapon** — Automatically gives the weapon to authorized players on join
* ⚙️ **ESX & ox\_inventory Compatible** — Native support for ESX framework and ox\_inventory
* 🛠️ **Customizable Actions** — Define your own client-side and server-side behaviors per mode

***

## 🔗 Quick Links

* [📥 Installation](/free-scripts/delete-gun/installation)
* [⚙️ Configuration](/free-scripts/delete-gun/configuration)
* [❓ Common Errors](/free-scripts/delete-gun/common-errors)


# Installation

## 📋 Requirements

Before installing Delete Gun, make sure you have the following:

* A **FiveM server** running on artifact `2699` or above
* *(Optional)* `es_extended` if using the ESX framework
* *(Optional)* `ox_inventory` if using ESX + ox inventory
* *(Optional)* `MS_MadonnAdmin` if using MadonnAdmin for permissions

***

## ⬇️ Step 1 — Download the resource

Download the latest version of **MS\_Delete\_Gun** from the [CFX Portal](https://portal.cfx.re/), the official Cfx.re platform for downloading your purchased resources.

> 💡 You must be logged in with the account used to purchase the resource.

***

## 📁 Step 2 — Add to your server

Copy the `MS_Delete_Gun` folder into your server's **resources directory**.

```
your-server/
└── resources/
    └── MS_Delete_Gun/
        ├── config/
        ├── customs/
        ├── framework/
        ├── main/
        └── fxmanifest.lua
```

***

## 📝 Step 3 — Add to server.cfg

Add the following line to your `server.cfg`, **after** any dependency resources (ESX, ox\_inventory, MS\_MadonnAdmin):

```cfg
ensure MS_Delete_Gun
```

> ⚠️ Make sure `MS_Delete_Gun` is started **after** any framework or inventory resource it depends on.

***

## ⚙️ Step 4 — Configure the resource

Open `config/main.lua` and configure the resource to match your server setup.

Refer to the [⚙️ Configuration](/free-scripts/delete-gun/configuration) page for a full breakdown of every option.

***

## 🔐 Step 5 — Set up permissions

Depending on the permission system you chose, you will need to grant access to your staff members.

### ACE Permissions *(default)*

Add the following to your `server.cfg` for each admin group or player you want to grant access to:

```cfg
add_ace group.admin madonne.deletegun allow
```

> The permission name `madonne.deletegun` can be changed in `customs/perms.lua`.

### MadonnAdmin

If `MADONNADMIN` is set to `true` or `auto` and MS\_MadonnAdmin is running, permissions are handled automatically based on staff rank. No additional configuration needed.

### Custom Permission System

Edit `customs/perms.lua` and implement your own logic inside the `GetPerms` function:

```lua
function GetPerms(src)
    -- Your custom permission check here
    -- return true to grant access, false to deny
    return false
end
```

***

## 🔄 Step 6 — Restart your server

Restart your server or run the following command in the console:

```
refresh
start MS_Delete_Gun
```

Your Delete Gun is now ready to use! ✅


# Configuration

All configuration files are located in the `config/` and `customs/` folders. These files are **not escrowed** and can be freely edited.

***

## config/main.lua

This is the main configuration file for the resource.

```lua
CONFIG_DELETE_GUN = {
    FRAMEWORK = "none",
    INVENTORY = "ox",
    MADONNADMIN = "auto",
    INIT_DELAY = 1,
    PERMISSION_SYSTEM = "ace",
    ENABLE_MULTI_MODE = false,
    WEAPON_TO_USE = "WEAPON_RAYCARBINE",
    AUTOMATICALLY_GIVE_WEAPON = true,
    NOTIFICATION_TEXT = "Entity deleted !",
    NOTIFICATION_TITLE = "Delete Gun",
    NOTIFICATION_TYPE = "default",
    notifChatColor = {255, 255, 255},
}
```

***

### 🧩 Framework & Inventory

| Option      | Values              | Description                                                                                        |
| ----------- | ------------------- | -------------------------------------------------------------------------------------------------- |
| `FRAMEWORK` | `"esx"` \| `"none"` | Set to `"esx"` if your server uses ESX. Use `"none"` for standalone or other frameworks.           |
| `INVENTORY` | `"ox"` \| `"none"`  | Only relevant if `FRAMEWORK` is `"esx"`. Set to `"ox"` if using ox\_inventory, `"none"` otherwise. |

***

### 🔐 Permissions

| Option              | Values                            | Description                                                                                                                                                |
| ------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MADONNADMIN`       | `"auto"` \| `"true"` \| `"false"` | Controls whether MadonnAdmin is used for permissions. `"auto"` will automatically detect if MS\_MadonnAdmin is running on your server.                     |
| `PERMISSION_SYSTEM` | `"ace"` \| `"custom"`             | Defines the permission system to use. If MadonnAdmin is enabled, this value is ignored. Use `"custom"` to implement your own logic in `customs/perms.lua`. |

> 💡 When using ACE, the default permission node is `madonne.deletegun`. You can change this in `customs/perms.lua`.

***

### ⏱️ Initialization

| Option       | Values              | Description                                                                                                                                                           |
| ------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `INIT_DELAY` | Integer *(seconds)* | Delay before the resource initializes and checks permissions on the client side. If MadonnAdmin is used, an additional 10-second delay is added on top of this value. |

***

### 🔫 Weapon

| Option                      | Values            | Description                                                                                                         |
| --------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| `WEAPON_TO_USE`             | Any weapon name   | The weapon model used as the Delete Gun. Default is `"WEAPON_RAYCARBINE"`. You can use any valid GTA V weapon name. |
| `AUTOMATICALLY_GIVE_WEAPON` | `true` \| `false` | If `true`, the weapon is automatically given to authorized players when they join.                                  |

***

### 🔔 Notifications

| Option               | Values                                           | Description                                                             |
| -------------------- | ------------------------------------------------ | ----------------------------------------------------------------------- |
| `NOTIFICATION_TEXT`  | String                                           | The message displayed to the player when an entity is deleted.          |
| `NOTIFICATION_TITLE` | String                                           | The title of the notification (used by supported notification systems). |
| `NOTIFICATION_TYPE`  | `"default"` \| `"chat"` \| `"auto"` \| `"other"` | Controls how notifications are displayed. See details below.            |
| `notifChatColor`     | `{R, G, B}`                                      | Text color when `NOTIFICATION_TYPE` is set to `"chat"`.                 |

#### **Notification types:**

| Value       | Behavior                                                                                                                                              |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `"default"` | Uses the native GTA V notification system                                                                                                             |
| `"chat"`    | Sends the notification as a chat message                                                                                                              |
| `"auto"`    | Automatically detects a running notification resource — checks for **MS\_Madonne\_Notify** first, then **okokNotify**, then falls back to `"default"` |
| `"other"`   | Triggers the `MS_DeleteGun_Notification` event, allowing a fully custom notification in `customs/notifs.lua`                                          |

***

### 🧩 Multi-Mode

| Option              | Values            | Description                                                                                                            |
| ------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `ENABLE_MULTI_MODE` | `true` \| `false` | Enables the multi-mode system, allowing the gun to have multiple behaviors. When enabled, refer to `config/modes.lua`. |

***

## config/modes.lua

This file is only used when `ENABLE_MULTI_MODE` is set to `true`.

```lua
DELETE_GUN_MODES = {
    ["CommandNameToChangeMode"] = "gunmode",
    ["CommandDescription"] = "Edit the mode of your tool gun",
    ["CommandNotify"] = "Gun mode changed to",

    ["1"] = {
        ModeName = "Delete Gun",
        AcePermissions = false,
        MadonnAdmin = {1,2,3,4,5},
        NotificationText = "Entity deleted !",

        ClientSide = function(entity)
            -- Your client-side code here
        end,

        ServerSide = function(entity)
            DeleteEntity(entity)
        end,
    }
}
```

| Option                    | Description                                                                  |
| ------------------------- | ---------------------------------------------------------------------------- |
| `CommandNameToChangeMode` | The command (without `/`) used to cycle through modes in-game                |
| `CommandDescription`      | Description shown in the chat suggestion                                     |
| `CommandNotify`           | Prefix of the notification displayed when the mode changes                   |
| `ModeName`                | Display name of the mode                                                     |
| `AcePermissions`          | ACE permission node required for this mode, or `false` to disable            |
| `MadonnAdmin`             | List of MadonnAdmin rank IDs allowed to use this mode, or `false` to disable |
| `NotificationText`        | Notification displayed when this mode is triggered                           |
| `ClientSide`              | Lua function executed **client-side** when the gun fires in this mode        |
| `ServerSide`              | Lua function executed **server-side** when the gun fires in this mode        |

> ➕ You can add as many modes as needed by duplicating the `["1"]` block and incrementing the key (`"2"`, `"3"`…).

***

## customs/notifs.lua

Used when `NOTIFICATION_TYPE` is set to `"other"`. Edit this file to define your own notification handler:

```lua
RegisterNetEvent("MS_DeleteGun_Notification")
AddEventHandler("MS_DeleteGun_Notification", function(msg)
    -- Your custom notification code here
    exports['okokNotify']:Alert("Delete Gun", msg, 5000, 'error', true)
end)
```

***

## customs/perms.lua

Used when `PERMISSION_SYSTEM` is set to `"custom"`. Edit the `GetPerms` function to implement your own permission logic:

```lua
function GetPerms(src)
    -- return true to grant access, false to deny
    return false
end
```


# Common Errors

## 🔴 The weapon is given but the gun doesn't delete anything

**Cause:** The player has the weapon but doesn't have the required permissions.

**Fix:** Make sure the permission system is correctly configured:

* **ACE:** Check that `add_ace group.yourgroup madonne.deletegun allow` is present in your `server.cfg` and that the player is in the correct group.
* **MadonnAdmin:** Ensure `MS_MadonnAdmin` is started **before** `MS_Delete_Gun` and that the player has a valid staff rank.
* **Custom:** Verify that your `GetPerms` function in `customs/perms.lua` returns `true` for the player.

***

## 🔴 The weapon is not automatically given on join

**Cause 1:** `AUTOMATICALLY_GIVE_WEAPON` is set to `false`.

**Fix:** Set it to `true` in `config/main.lua`.

**Cause 2:** The player doesn't have the required permissions, so the weapon is intentionally not given.

**Fix:** Grant the player the correct permission (see above).

**Cause 3 (ESX + ox\_inventory):** The `INVENTORY` option is not set correctly.

**Fix:** Make sure `FRAMEWORK` is set to `"esx"` and `INVENTORY` is set to `"ox"` if you are using ox\_inventory.

***

## 🔴 Notifications are not showing up

**Cause:** The `NOTIFICATION_TYPE` is set to a system that is not running on your server.

**Fix:** Either:

* Set `NOTIFICATION_TYPE` to `"auto"` to let the resource detect the available system automatically.
* Set it to `"default"` to use the native GTA V notification.
* If using `"other"`, make sure your custom handler is correctly defined in `customs/notifs.lua`.

***

## 🔴 Multi-mode command doesn't work

**Cause:** `ENABLE_MULTI_MODE` is set to `false`.

**Fix:** Set `ENABLE_MULTI_MODE` to `true` in `config/main.lua`, and make sure `config/modes.lua` is properly configured with at least one mode.

***

## 🔴 The resource loads but nothing happens (no weapon, no permissions)

**Cause:** The `INIT_DELAY` may be too short, causing the resource to check permissions before the player is fully loaded.

**Fix:** Increase the `INIT_DELAY` value in `config/main.lua` (e.g. set it to `3` or `5`).

> ⚠️ If you are using MadonnAdmin, an additional **10-second delay** is always applied on top of `INIT_DELAY`. This is normal behavior.

***

## 🔴 `MS_Delete_Gun` throws errors on start

**Cause:** A dependency resource is not started before `MS_Delete_Gun`.

**Fix:** Make sure your `server.cfg` starts resources in the correct order:

```cfg
ensure es_extended       # if using ESX
ensure ox_inventory      # if using ox_inventory
ensure MS_MadonnAdmin    # if using MadonnAdmin
ensure MS_Delete_Gun     # always last
```

***

## 🔴 You lack the required entitlement to use MS\_Delete\_Gun

This message indicates that your server does not have the necessary entitlement to start the resource. This is related to FiveM's **Escrow** protection system.

Check the following points one by one:

* ✅ The **CFX Portal key** listed in your `server.cfg` does not contain any typing error
* ✅ The CFX Portal key belongs to the **FiveM account that was used to purchase or claim** the resource
* ✅ The resource has been **successfully claimed** on the [CFX Portal](https://portal.cfx.re/)
* ✅ The CFX Portal key linked to your server **belongs to you**, and not to your hosting provider

> ⚠️ **Important warning about hosting provider keys**
>
> Some hosting providers include a shared CFX Portal key as part of their offers. We strongly advise against using such keys. A key that does not belong to you will block the use of **any resource protected by FiveM's Escrow system**, without exception — not just this one. Always use your own personal CFX Portal key.

***

## 💬 Still having issues?

If you are still experiencing problems after following the steps above, feel free to reach out to us:

* 💬 **Discord:** [discord.gg/madonne](https://discord.gg/madonne)
* 🌐 **Website:** [madonnestudio.com](https://madonnestudio.com/)
* 📧 **Email:** <contact@madonnestudio.com>


# SASPR Pack

Equip your Park Rangers in the most beautiful way thanks to our livery pack specially designed to dress up their vehicles.

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Ffnl1aLv7GfFOZIvI74x9%2F97720eb271889b81bb0ff3463a71c92db28c233a.jpg?alt=media&amp;token=c26590ad-9d00-463e-ad56-fa5d8b19829f" alt=""><figcaption></figcaption></figure>

Our pack is available for a total of 13 differents vehicles, the vehicle can be implemented on various vehicles, see compatibility test at the bottom

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2Ft2eBHZTH8RMWpeUg3emZ%2Fa9afb35bc06b25cea94692d251550b40531331f6.jpg?alt=media&amp;token=1b3121b4-9cbc-4df6-9905-590016851cff" alt=""><figcaption></figcaption></figure>

**Available vehicles :**

* 2011 CVPI&#x20;
* 2014 TAHOE&#x20;
* 2016 FPIS&#x20;
* 2016 FPIU&#x20;
* 2016 RAM
* 2018 SILVERADO
* 2018 TAHOE&#x20;
* 2019 SILVERADO
* Ford F150&#x20;
* Ford F250&#x20;
* John Deere Gator
* Bell 412
* Brunswick

<figure><img src="https://1860794455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvAynUdbw9243yqwmbdR%2Fuploads%2FTtSy2weALK3LGwFMzXTc%2Fd5a8028b7cd6a6081d312f1cf0e68cb42f6fe27c.jpg?alt=media&amp;token=e5cc904e-3629-44af-a3d3-90a6079376a4" alt=""><figcaption></figcaption></figure>

**Compatibility test :** [IMGUR Album](https://imgur.com/gallery/wU14daH)

{% hint style="info" %}
**DEPENDANCIES :** Vehicles that use the template used to make this livery pack
{% endhint %}


# How to install ?

1. After purchasing our resource via our Website, download the ZIP archive present in the email that was sent to you automatically.
2. Open the .zip file and go to the Livery folder and extract the files.
3. Open OpenIV and go inside the folder where your vehicle is installed.
4. With OpenIV open the .ytd files of your vehicle and find a texture named ( \[vehicle]\_sign\_1 ).
5. Replace this texture using the replace button by our livery corresponding to your vehicle.
6. Save and close.


