# 🔧 MG MECHANIC – Advanced Mechanic, Tuning & Business System
**The complete mechanic system for QBCore and ESX.** Every shop is a real business: create it in-game, hire your team, tune cars with a cinematic menu, bill your customers, install every part by hand and run everything from the mechanic tablet.
▶️ **Preview:** https://youtu.be/ZFZR4L7jRL4
---
## ✨ Features
### 🛠️ Admin Panel (`/mgmechanicadmin`)
- Create, edit, enable / disable, delete (restorable) and purge shops **in-game**.
- Name, job, max members, price multiplier, commission, payment methods, services, tuning categories, blip and extras per shop.
- Grades with salary and permissions, members (online or by identifier), points, work vehicles and **Discord webhooks per shop**.
### 💼 Real shops, real jobs
- **Every shop has its own job**, created automatically from its name (QBCore and ESX).
- Renaming a shop moves its members (online and offline) and the company money automatically.
- Company account with your society / banking script, or built-in accounts if you don't have one.
### 📱 Mechanic Tablet
- Overview: members, staff on duty, company balance, your grade and recent activity.
- **Employee profiles**: duty sessions, weekly hours, sales and internal notes.
- Hire by invitation, promote and fire (always below your grade).
- Invoices (pending, to install, history), **parts shop** and **item shop** paid with the company account.
- Company money with **full movement history**, shop settings and activity log.
### 🎨 Tuning Menu
- Modern NUI with search, breadcrumbs and **live preview**.
- **Cinematic camera** that focuses every part and opens hood, trunk and doors when needed.
- Performance, bodywork, engine bay, interior, 12 rim types, **RGB paint with finishes**, pearlescent, liveries, xenon, neons, tint, horns and extras.
- Cart with summary, job discounts and checkout: pay now or send an invoice.
### 🧾 Invoices & Payments
- Cash, bank, company account, **customer invoice** or **custom invoice**.
- Paid invoices go to the company account, with a commission for the mechanic.
- Parts are only installed once the invoice is paid (no free tuning by storing the car).
### 🔩 Parts System
- Order the **exact parts** a job needs from the tablet (or import the invoice into the cart).
- Pick them up at the shop's parts point and install them **part by part**, each one at its zone of the car.
- Install animations, including a realistic **spray-painting** animation for paint jobs.
- Cartoon pictures for every part in ox_inventory.
### 🔧 F6 Mechanic Menu
- Diagnostics (engine, body, fuel tank, tyres), repairs, cleaning, hood & trunk, **flip vehicle**, remove nitro / fake plate and custom invoices.
- Opens even with no vehicle nearby. ox_target / qb-target support.
### 🚀 Workshop Extras
- **Nitro**: up to 2 bottles per vehicle, gas saved per bottle, flames, light trails, screen effect, sound and HUD.
- **Fake plates** and **permanent plate changes**.
- **Repair kits**: engine, body, advanced and cleaning kits.
- **Dyno** with live figures and power curve.
- **Shop garage** with work vehicles (tow trucks…).
- **Wardrobe** point (illenium-appearance, rcore_clothing, 17mov, fivem-appearance, qb-clothing, esx_skin or your own).
### 📊 Discord Logs
- General and **per-shop** webhooks, every category in its own channel.
- Mechanic, vehicle, owner, location, amounts and more; you choose which fields are shown.
### 🔒 Security & Performance
- Every price and action is validated **on the server** (permissions, hierarchy, distance, limits, rate limit).
- Optimized: ~0.00 ms idle, adaptive threads and batched database writes.
- SQL tables are created automatically.
---
## 📦 Requirements
- `oxmysql`
- `qb-core` **or** `es_extended` (auto-detected)
- Optional: ox_inventory, ox_target / qb-target, your banking, keys, fuel and clothing scripts (all configurable).
## 🌍 Included
- English and Spanish locales.
- Open files: `config.lua`, `config_server.lua`, log configs, locales and the `custom/` folder for your own integrations (inventory, banking, invoices, notify, target, keys, fuel, wardrobe…).
- Full documentation and API (exports & events).
---
## 📲 MG Scripts
- 🛒 **Tebex:** https://mg-scripts.tebex.io/
- 💬 **Discord (support & updates):** https://dsc.gg/mgscriptsoficial
- ▶️ **YouTube:** https://www.youtube.com/@MGScriptsOficial
- 🎵 **TikTok:** https://www.tiktok.com/@mgscriptsoficial

