Configuration
This document details the configuration files within the shared/ directory, explaining what each file controls and how to customize them.
1. shared/config.lua
Controls core settings, items, commands, and keybinds for general systems.
| Option | Type | Default | Description |
|---|---|---|---|
Config.TabletItem | String | 'police_tablet' | Item needed to open the tablet UI. |
Config.NotebookItem | String | 'police_notebook' | Item used to open the officer field notebook. Set false to disable item use (F6//notebook still work for department members). |
Config.TabletCommand | String | 'policetablet' | Command to open the tablet interface. |
Config.TabletKey | String/Bool | false | Default keybind for opening the tablet (e.g. 'F6'). |
Config.CuffItem | String | 'handcuffs' | Item required to perform cuff actions. |
Config.ZiptieItem | String | 'ziptie' | Item required to perform ziptie actions. |
Config.LockpickItem | String | 'lockpick' | Item used to pick cuffs/zipties. |
Config.VisionItem | String | 'visiongoggles' | Goggle overlay item name. |
Config.PlacerItem | String | 'police_props' | Menu placer item name. |
Config.HelicamItem | String | 'helicam_remote' | Helicam controller item. |
Config.BodycamItem | String | 'bodycam' | Bodycam item name. |
Config.DutyBeltItem | String | 'duty_belt' | Portable container belt item. |
Config.BadgeItem | String | 'policebadge' | Custom badge template carrier item. |
Config.BadgeShowRadius | Number | 4.0 | Range in meters for other players to see your badge. |
Config.CuffKeyItem | String | 'handcuff_key' | Handcuff key item name used to unlock handcuffs. |
Config.ScissorsItem | String | 'scissors' | Scissors item name used to cut zipties. |
Config.PublicFrontDesk | Boolean | true | Allows civilians to use station reception desks to notify staff and file complaints. |
Config.GksphoneJobStatus | Boolean | false | With GKS Phone: opens a department in the phone's services app only while at least one of its officers is on duty, and closes it otherwise. See GKS Phone. |
Custom Banking (Config.CustomBanking)
The department society account (fines, wheel boot fees, patrol call payouts, society purchases, tablet balance) works out of the box with kartik-banking, qb-banking, Renewed-Banking, okokBanking, fd_banking, p_banking, snipe-banking, tgg-banking, tgiann-bank and esx_banking. To use your own banking system instead, turn this on. When enabled it takes priority over the built-in banking support.
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | false | Route all society account calls to your banking system. |
resource | String | 'my_banking' | Name of your banking resource (used when add, remove or get is an export name). |
accountPrefix | String | '' | Added in front of the job name to build the account id, e.g. 'society_' turns police into society_police. Leave empty to use the job name. |
add | String/Function | 'AddAccountMoney' | Export name, or a function (account, amount, reason), that adds money. Return false on failure. |
remove | String/Function | 'RemoveAccountMoney' | Export name, or a function (account, amount, reason), that removes money. Return false on failure (for example not enough funds). |
get | String/Function | 'GetAccountMoney' | Export name, or a function (account), that returns the balance as a number (a table with balance, money or amount also works). |
Export example:
Config.CustomBanking = {
enabled = true,
resource = 'my_banking',
accountPrefix = '',
add = 'AddSocietyMoney',
remove = 'RemoveSocietyMoney',
get = 'GetSocietyBalance',
}Database example (the functions only run on the server):
Config.CustomBanking = {
enabled = true,
accountPrefix = '',
add = function(account, amount, reason)
return MySQL.update.await('UPDATE my_accounts SET balance = balance + ? WHERE id = ?', { amount, account }) > 0
end,
remove = function(account, amount, reason)
return MySQL.update.await('UPDATE my_accounts SET balance = balance - ? WHERE id = ? AND balance >= ?', { amount, account, amount }) > 0
end,
get = function(account)
return MySQL.scalar.await('SELECT balance FROM my_accounts WHERE id = ?', { account }) or 0
end,
}Other resources can read and change the same accounts through the server exports GetAccountMoney(account), AddAccountMoney(account, amount, reason) and RemoveAccountMoney(account, amount, reason) on kartik-policejob. Restart the resource after changing this setting.
Vehicle Keys
Keys for department vehicles are given and taken automatically when one of these is started: qb-vehiclekeys, qbx_vehiclekeys, Renewed-Vehiclekeys, qs-vehiclekeys, wasabi_carlock, MrNewbVehicleKeys, t1ger_keys, jaksam vehicles keys, okokGarage and p_vehiclekeys. Nothing needs to be set in the config.
Dynamic Admin Settings (In-Game Panel)
These options can be toggled by admins directly from the MDT Admin Settings panel:
- Require Duty for Armoury (
dutyForArmoury): Forces officers to be clocked on-duty to retrieve items. - Show On-Duty Blips (
showDutyBlips): Renders GPS blips on the map for all on-duty officers. - Public Impound Fee (
impoundFee): Default fine amount when towing a vehicle. - Restraint Controls: Toggle command (
restraintCommand), target eye-ray (restraintTarget), or radial menu options (restraintRadial) for cuffing/ziptieing/escorting. - Require Gear Items (
requireGearItems): Forces officers to carry physical items to use them in the field. - Require Placer Items (
requirePlacerItems): Forces officers to carry physical items to place objects. - Gear Activation (
gearActivation): Configures if gear is activated via items only, commands only, or both.
Dashcam (Config.Dashcam)
The dashcam turns on by itself when an officer with the dashcam permission gets into an authorized police vehicle, and turns off when they get out.
| Key | Type | Default | Description |
|---|---|---|---|
AutoOnEnter | Boolean | true | Start the dashcam automatically on vehicle entry. |
RequirePolice | Boolean | true | Only start inside an authorized vehicle. Set false to allow any vehicle. |
AccentColor | String | '#22d3ee' | Color of the dashcam overlay. |
Department | String | 'POLICE DEPARTMENT' | Department name shown on the overlay. |
PoliceClasses | Table | { [18] = true } | Vehicle classes that count as police vehicles (18 = Emergency). |
PoliceModels | Table | {} | Spawn codes that also count as police vehicles, whatever their class. Use this for addon police cars that are not in the Emergency class. |
A vehicle is authorized when its class is in PoliceClasses or its spawn code is in PoliceModels. Example:
Config.Dashcam = {
AutoOnEnter = true,
RequirePolice = true,
AccentColor = '#22d3ee',
Department = 'POLICE DEPARTMENT',
PoliceClasses = { [18] = true },
PoliceModels = { 'npolvic', 'npolexp', 'npolchar' },
}PoliceModels also accepts the { npolvic = true } style. Restart the resource after editing the config.
2. shared/config_vehshop.lua
Manages the persistent vehicle purchase shop.
- Perm: Permission string required to buy/browse (default
'garage'). - RequireDuty: Forces players to be on duty to purchase.
- DefaultGarage: Initial garage where the vehicle is stored upon purchase.
- PlatePrefix: Plated prefix (e.g.
POL12345). - Preview Showroom: Vector coordinates (
Coord) and camera variables for the 3D rotating display room.
3. shared/config_academy.lua
Configures cadet training courses, exam questionnaires, and classroom/track zones.
- passThreshold: Percentage required to pass exams.
- zones: Coordinates and ranges for Classroom, Driving Track, and Shooting Range.
- courses: Array defining course IDs, duration limits, question lists (for law exams), and grading metrics (collision penalties, required hits).
- certifications: Expiry days and labels for training credentials (driving, marksmanship, penal code).
4. shared/config_tracker.lua
Manages dispatch GPS tracker broadcasts.
- TrackerUpdateInterval: Frequency (ms) coordinates are sent.
- TrackerBlipColors: Custom colors based on job (e.g., LSPD
38, BCSO5). - TrackerShareGroups: Share pools (e.g., sharing LSPD, BCSO, and SAHP tracker coordinates between members).
5. shared/config_gunrack.lua
Trunk gunrack configuration.
- Mode:
'department'(shared inventory),'personal'(unique to officer), or'both'. - AllowedClasses: Classes allowed to have trunks (Default class
18- Emergency). - AllowedModels: List of specific model names that support the trunk inventory.