Possible mistakes
Attempt to index a nil value
Fill this line in config.lua:
--Discord webhook required for photos taken of criminals
Config.DiscordWebhook = ""
Solution
Make sure to add your Discord webhook URL for the mugshot photo system to work correctly. The webhook is required for uploading criminal photos.
Example:
Config.DiscordWebhook = "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
Screenshots not working
If the mugshot system is not taking photos, ensure:
- screenshot-basic is properly installed and started
- screenshot-basic is started BEFORE bit-policemdt in your server.cfg
- Your Discord webhook is correctly configured
MDT not opening
If the tablet doesn't open:
- Verify your job is listed in
Config.authorizedJobs - Check that the command is correct: default is
/mdt - Verify the OpenKey if using key binding (default: 344)
Database errors
If you encounter SQL errors:
- Ensure both tables are created (
bit_policemdtandbit_policemdt_fines) - Verify your MySQL connector is set correctly in
Config.Mysql - Check that your database user has proper permissions