-
Notifications
You must be signed in to change notification settings - Fork 325
Expand file tree
/
Copy pathconfig.lua
More file actions
335 lines (305 loc) · 9.8 KB
/
config.lua
File metadata and controls
335 lines (305 loc) · 9.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
Config = {}
ps = exports.ps_lib:init()
-- Basic Settings
Config.Debug = false -- Enable/disable debug mode (boolean)
Config.OnlyShowOnDuty = true -- Only allow the MDT to be opened when on duty (boolean)
-- Civilian Access Settings
Config.CivilianAccess = {
enabled = true, -- Allow civilians to open the MDT (profile + legislation view only)
command = true, -- Allow /mdt command for civilians
showWarrants = true, -- Show active warrants on civilian profile
showBolos = true, -- Show active BOLOs on civilian profile
}
-- Time and Date Settings
Config.DateTime = {
GameTime = true, -- If set to true, the game time will be used instead of the server time (boolean)
TimeFormat = '24', -- Format for displaying time ('24' or '12')
DateFormat = "MM-DD-YYYY" -- Format for displaying date (string: "MM-DD-YYYY", "DD-MM-YYYY", or "YYYY-MM-DD")
}
-- Department data sharing
Config.Sharing = {
-- Mutual Sharing (Bidirectional)
-- All departments in this group can see each other's data
Mutual = {
types = {
'reports',
'bodycams',
'evidence',
'bolos',
'warrants'
},
departments = {
'lspd',
'bcso',
'sahp'
}
},
-- One-Way Sharing (Unidirectional)
-- Viewers can see target department data, but not vice versa
OneWay = {
{ -- Example: FIB and GOV
viewers = {
'fib',
'gov'
},
targets = {
'lspd',
'bcso',
'sahp'
},
types = {
'reports',
'bodycams',
'evidence',
'bolos',
'warrants',
}
},
},
}
-- Keybinds
Config.Keys = {
-- https://docs.fivem.net/docs/game-references/controls/ | Default QWERTY
OpenMDT = {
enabled = true, -- Enable/disable keybind (boolean)
key = 'F11', -- Key to open MDT (string)
},
}
-- Commands
Config.Commands = {
Open = {
enabled = true, -- Enable/disable command (boolean)
command = 'mdt', -- Command to open MDT (string)
},
MessageOfTheDay = {
enabled = true, -- Enable/disable command (boolean)
command = 'motd', -- Command to set message of the day (string)
},
}
-- Dispatch Settings
Config.Dispatch = {
Resource = 'ps-dispatch',
FilterByJob = true,
}
-- Wolfknight Plate Reader Settings
Config.UseWolfknightRadar = true -- Enable/disable Wolfknight radar integration
Config.WolfknightNotifyTime = 5000 -- Duration (ms) for plate reader notifications
Config.PlateScanForDriversLicense = true -- Check driver's license on plate scan
-- Fingerprint Settings
Config.FingerprintAutoFilled = false -- Auto-populate fingerprints on citizen profiles (if false, officers must manually add fingerprints)
-- Fingerprint Scan Integration
Config.FingerprintScan = {
enabled = false, -- Enable fingerprint scan trigger from MDT
officerEvent = 'police:client:showFingerprint', -- Client event triggered on the officer
suspectEvent = 'police:client:showFingerprint', -- Client event triggered on the suspect
}
-- Fuel Resource Name
Config.Fuel = 'LegacyFuel' -- Fuel resource name for vehicle fuel management
-- Weapon Registration
Config.RegisterWeaponsAutomatically = true -- Auto-register weapons on purchase (ox_inventory and qb-inventory/qb-weapons)
Config.RegisterCreatedWeapons = false -- Also auto-register weapons on item creation (ox_inventory only)
-- Impound Locations (vector4: x, y, z, heading)
Config.ImpoundLocations = {
[1] = vector4(409.09, -1623.37, 29.29, 232.07), -- LSPD Impound
[2] = vector4(-436.42, 5982.29, 31.34, 136.0), -- Paleto Impound
}
-- Job Settings
Config.PoliceJobType = "leo"
Config.PoliceJobs = {
'lspd',
'bcso',
'sahp',
'fib',
'gov'
}
Config.DojJobType = "doj"
Config.DojJobs = {
'lawyer',
'judge',
}
Config.MedicalJobType = "ems"
Config.MedicalJobs = {
'ambulance',
}
Config.Uploads = {
MaxBytes = 5242880, -- 5 MB
RateLimitPerMinute = 10, -- Max uploads per player per minute (0 = unlimited)
AllowedAttachmentTypes = {
'image/jpeg',
'image/png',
'image/webp',
'application/pdf'
},
AllowedEvidenceImageTypes = {
'image/jpeg',
'image/png',
'image/webp'
}
}
-- Pagination Limits
Config.Pagination = {
Citizens = 20, -- Citizens per page
CitizenSearch = 20, -- Max citizen search results
Cases = 20, -- Cases per page
}
-- Fine Processing
Config.Fines = {
MaxAmount = 100000, -- Maximum fine amount ($) to prevent economy exploits
CooldownMs = 30000, -- Anti-spam cooldown between fines (milliseconds)
}
-- Warrant Defaults
Config.Warrants = {
DefaultExpiryDays = 7, -- Default warrant expiry when no date is provided
}
-- Dashboard Cache TTLs (seconds)
Config.CacheTTL = {
ReportStats = 30,
ActiveUnits = 10,
UsageMetrics = 60,
}
-- Tablet Animation
Config.Animation = {
Dict = 'amb@world_human_tourist_map@male@base',
Name = 'base',
}
-- Mugshot Camera
Config.MugshotCamera = {
DefaultFov = 50.0,
FovMin = 15.0,
FovMax = 80.0,
FovSpeed = 5.0,
}
-- Security Camera Viewer
Config.CameraViewer = {
RotationSpeed = 0.15,
ZoomClamp = { min = 0.25, max = 10.0 },
StartingZoom = 3.0,
ZoomStep = 0.1,
FovMin = 10.0,
FovMax = 100.0,
FovStep = 2.0,
}
-- Management permissions and defaults (per job grade)
Config.ManagementPermissions = {
-- Citizens
'citizens_search',
'citizens_edit_licenses',
-- BOLOs
'bolos_view',
'bolos_create',
-- Vehicles
'vehicles_search',
'vehicles_edit_dmv',
-- Weapons
'weapons_search',
-- Cases
'cases_view',
'cases_create',
'cases_edit',
'cases_delete',
-- Evidence
'evidence_view',
'evidence_create',
'evidence_transfer',
'evidence_upload',
-- Reports
'reports_view',
'reports_create',
'reports_delete',
-- Warrants
'warrants_view',
'warrants_issue',
'warrants_close',
-- Charges
'charges_view',
'charges_edit',
-- Dispatch
'dispatch_attach',
'dispatch_route',
-- Cameras & Bodycams
'cameras_view',
'bodycams_view',
-- Notes
'notes_edit_department',
-- Roster
'roster_manage_certifications',
'roster_manage_officers',
-- PPR
'ppr_view',
'ppr_manage',
-- FTO
'fto_view',
'fto_manage',
-- Management
'management_permissions',
'management_bulletins',
'management_activity',
}
-- Bodycam Settings (override defaults if needed, remove to use built-in defaults)
Config.Bodycam = {
DutyEvent = 'QBCore:Server:OnJobUpdate',
DutyEventMode = 'qbcore',
MultiJobDutyEvent = 'ps-multijob:server:dutyChanged',
DutyResource = 'qb-core',
MultiJobResource = 'ps-multijob',
}
-- Optional defaults for role permissions by job/grade
-- Example:
-- Config.PermissionDefaults = {
-- police = {
-- ['0'] = { 'access_reports' },
-- ['1'] = { 'access_reports', 'view_bodycams' },
-- }
-- }
Config.PermissionDefaults = Config.PermissionDefaults or {}
-- HIGHLY recommended not tuse this natively. Use FiveManage for this.
-- Activity Tracking - Controls which actions are logged to the audit trail
-- Categories can be toggled on/off from the Settings page in the MDT
-- These are the DEFAULT values; runtime changes are stored in the mdt_settings table
Config.AuditTracking = {
authentication = true, -- Login/logout events
reports = true, -- Report create, update, delete
cases = true, -- Case CRUD, officer assignments, attachments
evidence = true, -- Evidence CRUD, transfers, images
warrants = true, -- Warrant issued/closed
vehicles = true, -- Vehicle updates, impound/release
weapons = true, -- Weapon create, update, delete
charges = true, -- Fines processed, charges updated
searches = false, -- Citizen/player/officer searches (high volume)
dispatch = true, -- Signal 100 activate/deactivate
officers = true, -- Callsign changes
sentencing = true, -- Jail sentencing
arrests = true, -- Arrest logging
icu = true, -- ICU record deletion
cameras = true, -- Security camera access
bodycams = true, -- Officer bodycam access
}
-- Camera models available for static camera placement
Config.CameraModels = {
['security_cam_01'] = 'v_serv_securitycam_1a',
['security_cam_02'] = 'v_serv_securitycam_03',
['security_cam_03'] = 'ba_prop_battle_cctv_cam_01a',
['security_cam_04'] = 'prop_cctv_cam_06a',
['security_cam_05'] = 'ba_prop_battle_cctv_cam_01b',
['security_cam_06'] = 'prop_cctv_cam_01b',
['security_cam_07'] = 'ch_prop_ch_cctv_cam_02a',
['security_cam_08'] = 'prop_cctv_cam_04c',
['security_cam_09'] = 'prop_cctv_cam_03a',
['security_cam_10'] = 'ch_prop_ch_cctv_cam_01a',
['security_cam_11'] = 'prop_cctv_cam_01a',
['security_cam_12'] = 'prop_cctv_cam_05a',
['security_cam_13'] = 'prop_cctv_cam_07a',
['security_cam_14'] = 'prop_cctv_cam_04b',
['security_cam_15'] = 'tr_prop_tr_camhedz_cctv_01a',
['security_cam_16'] = 'prop_cctv_cam_02a',
['security_cam_17'] = 'prop_cctv_cam_04a',
['cctv_cam_01'] = 'm24_1_prop_m24_1_carrier_bank_cctv_02',
['cctv_cam_02'] = 'xm_prop_x17_cctv_01a',
['cctv_cam_03'] = 'prop_cctv_pole_02',
['cctv_cam_04'] = 'm24_1_prop_m24_1_carrier_bank_cctv_01',
['cctv_cam_05'] = 'prop_cctv_pole_04',
['cctv_cam_06'] = 'xm_prop_x17_server_farm_cctv_01',
['cctv_cam_07'] = 'prop_cctv_pole_03',
['cctv_cam_08'] = 'p_cctv_s',
['cctv_cam_09'] = 'hei_prop_bank_cctv_02',
}