# 👑 NEXTCODE MenuAdmin v2 - RedM Admin Suite (VORP)
> **The Ultimate All-in-One Administration Tool for RedM Servers**
> *ระบบจัดการแอดมินสำหรับเซิร์ฟเวอร์ RedM (VORP) ที่สมบูรณ์แบบและล้ำสมัยที่สุด*
---
<details open>
<summary><h2>🇬🇧 [ENGLISH] Product Description</h2></summary>
### 🌟 Overview
**NEXTCODE MenuAdmin v2** is an all-in-one administration suite engineered specifically for **RedM (VORP Core)**. Built with an ultra-sleek, modern dark NUI dashboard, it equips your server staff with everything necessary to manage players, monitor stability, handle tickets, and log actions in real time.
### ✨ Key Features
#### 📊 1. Server Management & Dashboard
* **Server-Wide Actions**: Revive All, Heal All, Slay All, Godmode All, and Bring All players.
* **Lag Reducer / World Cleaner**: Clear abandoned vehicles, wagons, peds, and props with 1 click.
* **Global Announcements**: Broadcast high-visibility announcements to the entire server.
* **Coords Copy**: One-click coordinate copier ($X, Y, Z, H$) to clipboard.
#### 👤 2. Live Player Management
* **Real-time Player Roster**: Instant search by Server ID, Player Name, or Character RP Name.
* **Player Moderation**: Kick, Temp Ban, Perm Ban, Unban, Freeze, and Slay.
* **Live Spectate Mode**: Smooth, invisible spectate camera to monitor players.
* **Teleportation**: Goto player, Bring player, or Teleport to Map Waypoint (TP Marker).
* **Live Inventory Search**: Inspect target player's inventory directly via VORP Inventory.
* **Economy & Items**: Give Cash, Gold/Bank, Items (with item image preview), and Weapons.
* **Job Management**: Assign Jobs and Job Grades dynamically from config.
* **Appearance & Scale**: Open Skin/Second Chance menu, or scale character size with visual particle FX.
#### 🐎 3. Spawners & Customization
* **Vehicle & Mount Spawner**: Spawn top horse breeds (Arabian, Turkoman, Shire), Wagons, and Boats.
* **Ped Transformation**: Transform into animals (Eagle, Wolf, Dog, Snake) or Story/Special NPCs (Arthur, Dutch, Zombie) with instant `/rc` restore.
* **Weather & Time Control**: Set and freeze server weather conditions and time of day.
#### 🎫 4. Built-in Player Report System
* **Player Command (`/report`)**: Players can submit Bug, Player Violation, or Question tickets.
* **Admin Management (`/reports` or NUI Badge)**: Claim tickets, teleport directly to assist, and resolve cases.
* **Persistent Data**: Reports and ticket histories are safely saved in JSON storage.
#### 🛡️ 5. Built-in Discord Webhook Logs
* Rich Embeds with automated color-coding.
* Displays full Admin details (Name, Server ID, Steam, License) and Target Player info.
* **Standalone**: No third-party logger dependency needed (`azael_discordlogs` NOT required).
---
### 📋 Dependencies & Requirements
* **Artifacts**: Cerulean or newer (RDR3)
* **Framework**: `vorp_core`
* **Database**: `oxmysql`
* **Recommended**: `vorp_inventory`, `vorp_character`, `weathersync`
---
### 📦 What's Included?
* Complete Script Resource (`NEXTCODE-MenuAdmin_v2`)
* `admin.sql` database schema for MySQL Bans
* `Config.lua` & `Config.general.lua` (Fully customizable)
* Interactive Web Manual (`manual.html` / `คู่มือ.html`)
</details>
---
<details open>
<summary><h2>🇹🇭 [ภาษาไทย] รายละเอียดสินค้า</h2></summary>
### 🌟 ภาพรวมระบบ
**NEXTCODE MenuAdmin v2** คือระบบเมนูแอดมินระดับพรีเมียมสำหรับเซิร์ฟเวอร์ **RedM (VORP Core)** ที่รวมทุกฟังก์ชันสำคัญไว้ในที่เดียว มาพร้อมหน้าต่าง NUI ดีไซน์ล้ำสมัย ลื่นไหล ไม่กินสเปค ช่วยให้ทีมงานดูแลเซิร์ฟเวอร์ จัดการผู้เล่น แก้ปัญหา และตรวจสอบความโปร่งใสได้อย่างมืออาชีพ
### ✨ ไฮไลท์ฟังก์ชันเด่น
#### 📊 1. ระบบควบคุมเซิร์ฟเวอร์ (Server Dashboard)
* **จัดการทั้งเซิร์ฟเวอร์**: ชุบชีวิตทั้งหมด (Revive All), ฮีลทั้งหมด (Heal All), เปิดอมตะ (Godmode All), ฆ่าทั้งหมด (Slay All), ดึงผู้เล่นทุกคนมาหา (Bring All)
* **ล้างขยะลดแลค (Lag Reducer)**: ลบรถม้า/ม้าที่ไม่มีคนขับ, ลบ NPC ตกค้าง, ลบ Prop บนแผนที่
* **ประกาศกลางจอ (Announcement)**: ส่งข้อความบรอดแคสต์ถึงผู้เล่นทุกคนในเซิร์ฟเวอร์
* **คัดลอกพิกัด (Copy Coords)**: กดปุ่มเดียวเพื่อคัดลอกพิกัด $X, Y, Z, H$ เข้า Clipboard ทันที
#### 👤 2. ระบบจัดการผู้เล่น (Player Panel)
* **รายชื่อผู้เล่น Realtime**: ค้นหาผู้เล่นได้ทันทีตาม ID, ชื่อ Steam หรือชื่อตัวละคร (RP Name)
* **ระบบลงโทษ**: เตะ (Kick), แบนชั่วคราว/แบนถาวร (Ban), ปลดแบน (Unban), ตรึงขา (Freeze), ฆ่า (Slay)
* **ระบบส่องดู (Spectate)**: ส่องกล้องดูพฤติกรรมผู้เล่นแบบล่องหน
* **วาร์ป (Teleport)**: วาร์ปไปหาผู้เล่น (Goto), ดึงผู้เล่นมาหา (Bring), วาร์ปไปยังจุดมาร์คแผนที่ (TP Waypoint)
* **ส่องกระเป๋า (Search Inventory)**: เปิดดูกระเป๋าของผู้เล่นแบบสดๆ ผ่าน VORP Inventory
* **เสกของ & การเงิน**: เสกเงินสด, เสกทองคำ, เสกไอเทม (พร้อมรูปภาพไอเทม), เสกอาวุธ
* **ปรับเปลี่ยนอาชีพ (Set Job)**: กำหนดอาชีพและยศของตัวละครได้ตามที่ตั้งไว้ใน Config
* **ปรับแต่งตัวละคร & สเกล**: เปิดเมนูแต่งตัวสร้างตัวละครใหม่ (Second Chance) หรือปรับขยาย/ย่อขนาดตัวละครพร้อมเอฟเฟกต์แสง
#### 🐎 3. เสกพาหนะ & แปลงร่าง (Spawners)
* **เสกพาหนะ/ม้า**: เสกม้าสายพันธุ์ยอดนิยม (Arabian, Turkoman, Shire), รถม้า, ปืนกลติดรถม้า และเรือ
* **แปลงร่าง (Ped Transformation)**: แปลงร่างเป็นสัตว์ (นกอินทรี, หมาป่า, สุนัข, งู) หรือตัวละคร NPC พิเศษ (Arthur, Dutch, Zombie) พร้อมปุ่มคืนร่างเดิมทันที (`/rc`)
* **ปรับสภาพอากาศและเวลา**: เลือกเปลี่ยนสภาพอากาศ ปรับเวลา และล็อคเวลา/สภาพอากาศได้
#### 🎫 4. ระบบรับแจ้งเรื่องในตัว (Report System)
* **ผู้เล่นใช้คำสั่ง `/report`**: ส่งเรื่องแจ้งปัญหา บั๊ก หรือรายงานผู้เล่นกระทำผิด
* **แอดมินรับเคสผ่านเมนู (`/reports`)**: ดูรายการเคส, กดรับเรื่อง (Claim), วาร์ปไปช่วยเหลือ และกดปิดเคส (Resolve)
* **บันทึกข้อมูลถาวร**: ข้อมูลคำร้องและประวัติทั้งหมดบันทึกลงในไฟล์ JSON ปลอดภัย ไม่สูญหาย
#### 🛡️ 5. ระบบ Discord Webhook Logs ในตัว
* ส่ง Log รายงานทุกการกระทำของแอดมินเข้า Discord อัตโนมัติในรูปแบบ Rich Embed
* ระบุข้อมูลแอดมิน (ชื่อ, ID, Steam, License) และผู้เล่นเป้าหมายอย่างละเอียด
* **ไม่ต้องลงสคริปต์เสริม**: ไม่ต้องพึ่งพา `azael_discordlogs` เพียงแค่วาง URL Webhook ก็ใช้งานได้ทันที
---
### 📋 ความต้องการของระบบ (Requirements)
* **Artifacts**: Cerulean ขึ้นไป (RDR3)
* **Framework**: `vorp_core`
* **Database**: `oxmysql`
* **แนะนำเพิ่มเติม**: `vorp_inventory`, `vorp_character`, `weathersync`
---
### 📦 สิ่งที่คุณจะได้รับ
* ตัวสคริปต์ฉบับเต็ม (`NEXTCODE-MenuAdmin_v2`)
* โครงสร้างฐานข้อมูล `admin.sql` สำหรับระบบแบน
* ไฟล์คอนฟิก `Config.lua` และ `Config.general.lua`
* คู่มือการติดตั้งและใช้งานภาษาไทยแบบละเอียด (`คู่มือ.html` / `manual.html`)
</details>
---
### ⚙️ Configuration Preview / ตัวอย่างการตั้งค่า
```lua
Config.MenuSettings = {
Command = "adminv2", -- Chat command to open menu
Description = "Open admin menu",
Key = 0x064D1698 -- Default Key: [HOME]
}
-- Built-in Discord Logs (No external resource needed)
ConfigSv["EnableDiscordLogs"] = true
ConfigSv["DiscordWebhook"] = "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"