เริ่มจาก Config / Server Console#

หลัง ensure nX_police ให้แก้ Config error ที่ validator ระบุก่อนตรวจ gameplay symptom

หา Config ไม่เจอหลังอัปเดต#

รุ่นใหม่ไม่มี config/shared แล้ว ใช้ config/customer, config/data และ config/locales และดูหน้า Config Migration

Recovery commands#

Commandใช้เมื่อ
policepanelเปิด Police Command โดยยังใช้สิทธิ์ตามระบบตามปกติ
policeuifixใช้เมื่อ UI ค้างหรือการรับเมาส์/คีย์บอร์ดผิดปกติ

Local diagnostics#

ใช้คำสั่งเหล่านี้ใน F8 เพื่อเก็บข้อมูลประกอบการตรวจปัญหา:

  • nxpolice_doctor - read-only smoke test ตรวจ Runtime, DB schema, dependencies, NC hook, locale, cache และ production hygiene พร้อม PASS/WARN/FAIL
  • kssquaddiag - local Squad diagnostic; command จะถูก register เฉพาะเมื่อ Config.General.Debug=true
  • kssirencheck - local Siren/Squad visual diagnostic; register เฉพาะ Debug mode
สิทธิ์ nxpolice_doctor
ใช้จาก Server Console ได้เสมอ; ในเกมต้องมี manageConfiguration หรือ ACE nX_police.doctor

ติดต่อ Support#

หากต้องติดต่อ Support ให้รัน nxpolice_doctor แล้วส่งเฉพาะผล PASS/WARN/FAIL และ log ที่เกี่ยวข้อง โดยลบหรือปิดบัง IP, webhook, token, password, API key, connection string และ player identifier ก่อนส่ง ห้ามส่ง server.cfg, database dump หรือไฟล์ secret

Maintenance#

policebootstrap <server id> เป็น setup/recovery command ไม่ใช่ gameplay command: Console ใช้ได้ ผู้เล่นต้องผ่าน configuration group หรือ ACE nX_police.bootstrap

Statistics reset ใช้ /nxresetstatistics แล้ว /nxresetstatistics confirm เท่านั้น

POLICE+#

/police+ ใช้ AdminGroups/Config.Jail.Editor ตาม policy และใช้สำหรับ Jail Area Editor เท่านั้น ดูหน้า POLICE+ Admin Tools สำหรับขั้นตอนสร้าง/แก้พื้นที่คุก

ค้นตัวหรือยึดของไม่ตรง#

  • ตรวจ Config.Integrations.Inventory.Resource
  • แก้ signature ที่ config/functions ตาม API ของ Inventory
  • ต้อง Remove สำเร็จก่อน RecordSeizedEvidence/Deposit flow

ถูกล็อคมือแล้วยังเปิด UI / กดปุ่มที่ไม่ควรได้#

  • ตรวจ Config.Cuff.Whitelist: Control ID ต้องใส่เป็นตัวเลข ส่วน mapped key เช่น F6/T/ALT+K ต้องใส่เป็น string ในรายการเดียวกัน
  • ตรวจว่าปุ่มที่ resource ใช้เปิด UI ตรงกับค่าที่ใส่ใน Whitelist จริง เช่น nc_inventory แบบ keybinding ใช้ค่าปุ่ม open ของ NC
  • ตรวจว่ามีปุ่มเกินจากที่ต้องการหรือมีค่าซ้ำหรือไม่
  • UI ภายนอกต้องส่งปุ่ม/Control ID เข้า CanOpenUi หรือ SetCuffUiActive ตอนเปิด และเรียก SetCuffUiActive(name, false) ตอนปิด
  • หลังแก้ Config ให้ restart nX_police แล้วทดสอบใหม่

Item ปลดกุญแจมือ / GPS Cutter ไม่ทำงาน#

  1. ตรวจ Config.Cuff.UnlockItem.Enabled หรือ Config.Jail.Escape.GpsCutter.Enabled
  2. ตรวจชื่อ item ให้ตรงกับ Inventory จริง
  3. Unlock Item และ GPS Cutter ห้ามใช้ชื่อ item เดียวกัน
  4. ถ้า ConsumeOnUse=false ระบบยังต้องอ่าน item count ได้; ตรวจ Inventory bridge/Adapter
  5. ถ้า RequireForPoliceUncuff=true ต้องเปิด UnlockItem.Enabled ด้วย
  6. ดู Config Validator ใน Server Console หลัง restart

หากใช้ระบบตาย/ชุบแบบ Custom ให้ทดสอบ AutoUncuffOnDeath หลังเชื่อมระบบนั้น หากไม่ปลดตาม Config ให้แนบ F8/Server Console ติดต่อ Support

External Notify ไม่ขึ้น / ขึ้นซ้ำ#

  1. ตรวจ Provider='external'
  2. ตรวจ resource started
  3. ตรวจ Functions.Client.ExternalNotify
  4. Adapter ต้อง return true เมื่อแสดงสำเร็จ
  5. เปิด FallbackToInternal=true ระหว่างทดสอบ

ถ้าขึ้นซ้ำ อย่าให้ Adapter เรียก Internal toast เองอีกครั้ง

ตายแล้วเปิด UI ไม่ได้ / ยังเปิดได้#

  • ตรวจ Config.UI.AllowWhileDead ใน config/customer/07_ui.lua
  • true = อนุญาตเปิด UI ตอนตาย
  • false = บล็อกการเปิดและปิด UI ของ nX Police ที่เปิดค้างเมื่อผู้เล่นตาย
  • UI ภายนอกต้องเชื่อม CanOpenUi / SetCuffUiActive จึงจะใช้ policy เดียวกัน

UI เปิดไม่ได้ / UI ค้าง#

  • ตรวจไฟล์ web/dist และ legacy อยู่ครบ
  • ดู F8 + Server Console พร้อมกัน
  • ลอง policeuifix หากเป็น focus state ค้าง

Resource ไม่ผ่าน License#

  • ตรวจ Public Server IP ตรงกับ License
  • ย้าย VPS/ISP ให้แก้ IP ก่อน
  • ใช้ Package เดิมและแก้เฉพาะไฟล์ที่คู่มืออนุญาต