Config รุ่นปัจจุบันแบ่งตามสิ่งที่ลูกค้าต้องทำจริง: customer สำหรับกติกา, data สำหรับรายการที่แก้บ่อย, locales สำหรับข้อความ และ functions สำหรับ Adapter โดย Security / Performance / Network policy อยู่ Internal
00_setup.lua — เริ่มตรงนี้#
Config.General = {
Debug = false,
Locale = 'th',
Jobs = { OnDuty = 'police', OffDuty = 'offpolice' },
AdminGroups = { admin = true, superadmin = true, dev = true }
}
Config.Features = {
Duty = true,
Dispatch = true,
Cases = true,
Jail = true,
Statistics = true
}ไฟล์ config/customer/00_setup.lua คือ Quick Start: ตั้ง Job, Admin Groups และเปิด/ปิดระบบหลักจากจุดเดียว
config/customer — Gameplay / Policy#
| ไฟล์ | ใช้ตั้งค่า |
|---|---|
00_setup.lua | General / Features |
01_police.lua | Duty / Search / Cuff / Quick Menu / Countdown |
02_dispatch.lua | Dispatch / Curfew / Squad / Helicopter Camera |
03_cases_jail.lua | Case policy / Jail / Escape / Jail Card / Screenshot |
04_management.lua | Mailbox / Rank Permissions / Equipment Management |
05_economy.lua | Bank / Welfare / Paycheck / Safe / Shop policy / Reward policy |
06_services.lua | Reports / Announcements / Playpass / Statistics |
07_ui.lua | Notification / UI |
08_integrations.lua | Advanced Integrations |
09_doorlock.lua | Door Lock policy / permission / visual |
config/data — รายการที่แก้บ่อย#
config/locales/th.lua — ข้อความ#
ข้อความภาษาไทยที่ลูกค้าปรับได้อยู่ไฟล์เดียว ส่วน aliases / formatter / compatibility resolver อยู่ Internal เพื่อลดข้อความซ้ำและไม่ให้ Customer Config เต็มไปด้วย source mapping
Notification Provider#
Toast ปกติเลือกใช้ของ nX Police หรือ Notify ภายนอกได้จาก config/customer/07_ui.lua โดยไม่ต้องแก้ Core
Config.Notification = {
Enabled = true,
Provider = 'internal', -- internal / external
Duration = 4500,
External = {
Resource = '',
FallbackToInternal = true,
TypeMap = {
info = 'info', success = 'success',
error = 'error', warning = 'warning'
}
}
}เมื่อใช้ external ให้เชื่อม signature จริงที่ Functions.Client.ExternalNotify() ใน config/functions/client.lua และแนะนำให้เปิด FallbackToInternal เพื่อไม่ให้ข้อความหายเมื่อ Notify ภายนอก restart หรือ error
External Provider ใช้เฉพาะ Toast ปกติ ไม่แทน Dispatch Card, Jail HUD, Announcement หรือ UI เฉพาะระบบ ดูตัวอย่างเต็มที่หน้า Integrations → External Notification
Reset Statistics#
ไม่มี Config.Statistics.ResetKey แล้ว การล้างสถิติเป็นคำสั่ง Admin-only และใช้ Config.General.AdminGroups เป็น authority:
/nxresetstatistics
/nxresetstatistics confirmต้องยืนยันคำสั่งที่สองภายใน 60 วินาที ระบบมี lock กัน reset ซ้อน พร้อม Activity audit และ Discord statistics log
ค่าที่ไม่อยู่ใน Customer Config#
Rate limit, anti-spam, SQL cache, retry, timeout, OneSync tolerance, telemetry, smoothing, network protocol และ Security hard limits ถูกกำหนดฝั่ง Internal Runtime/Server Policy เพื่อไม่ให้ลูกค้าแก้พลาดและลดภาระ Support