เพิ่มประเภทเหตุ#
lua
Config.Dispatch.Types.bankrob = {
code = '10-90',
label = 'ปล้นธนาคาร',
accent = '#ff4545',
blipColor = 1,
blipSprite = 161,
blipRadius = 80.0
}Client-side ReportCrime#
Client-side ถูกปิดเป็นค่าเริ่มต้นเพื่อความปลอดภัย หากต้องการให้ resource ฝั่ง Client เรียก Dispatch ให้เปิด:
lua
Config.Security.ClientDispatchTypes = trueเมื่อเปิดแล้ว Client เรียกได้เฉพาะ Type ที่มีอยู่ใน Config.Dispatch.Types และ Type หลบหนีจากคุกยังเป็น Server-only
lua
exports['ks_police']:ReportCrime('cement', {
category = 'normal',
details = 'พบการขโมยวัสดุก่อสร้าง'
})Server-side ReportCrime#
lua
exports['ks_police']:ReportCrime('cement', {
source = playerId,
category = 'normal',
details = 'พบการขโมยวัสดุก่อสร้าง'
})หากไม่มี Player Source สามารถส่ง coords = { x = ..., y = ..., z = ... } แทนได้
สีตามหมวดคดี#
category อ้างอิง Config.ChargeCategories[].code ระบบ Resolve สีจาก Server Config และไม่รับ CSS สีดิบจาก Client