Config Files
The configuration is split between shared/config.lua (framework settings) and shared/webhook.lua (Discord integrations).
shared/config.luaâ
Framework Selectionâ
Config.Framework = 'esx' -- or 'qbcore'
Specifies which framework your server uses. Must match your actual framework.
Allowed values:
'esx'â ESX Framework'qbcore'â QBCore Framework
Debug Modeâ
Config.Debug = false
Enables detailed console logging for troubleshooting. When enabled, you'll see debug messages for:
- Framework initialization
- Job changes
- Tracking start/stop events
- Network status changes
Enable this during setup to verify the system is working correctly. Disable in production.
Tracked Jobsâ
Config.TrackedJobs = {
ambulance = "Ambulance",
police = "Police",
mechanic = "Mechanic",
}
Define which jobs should be tracked. The key is the job name in your database, the value is the display name for Discord messages.
How to add a new job:
- Find the exact job name from your database or ESX/QBCore job table
- Add it to the table:
Config.TrackedJobs = {
your_job_name = "Display Name in Discord",
}
Only jobs listed here will be tracked. If a player changes to a job not in this list, tracking automatically stops.
Webhook Colorsâ
Config.WebhookColors = {
-- Job colors can be added here for embed customization
}
Reserved for future color customization per job. Currently not active.
Default Colorâ
Config.DefaultColor = 255
The default embed color for Discord messages (decimal format). Current setting is white (255).
Common color values:
255â White16711680â Red65280â Green255â Blue16776960â Yellow
Report Timesâ
Config.ReportTimes = {
daily = { hour = 23, minute = 45 },
weekly = { hour = 18, minute = 20 }
}
Set the times when automatic reports are generated and sent to Discord.
- daily â Sent every day at
23:45(11:45 PM) - weekly â Sent every week at
18:20(6:20 PM, typically Friday)
Time format: 24-hour (0-23 hours, 0-59 minutes)
Example â Daily report at noon, weekly on Monday at 9 AM:
Config.ReportTimes = {
daily = { hour = 12, minute = 0 },
weekly = { hour = 9, minute = 0 }
}
Reports include summaries of all tracked work time for the configured period.
Languageâ
Config.Locale = "sl"
Sets the language for webhook messages and console output.
Supported languages:
"en"â English"sl"â Slovenian
Translations are loaded from the locales/ folder.
Discord Avatarâ
Config.AvatarURL = "https://r2.fivemanage.com/wyTeYcIJQmPSbGaf6THxa/unibit.webp"
The avatar image URL displayed in Discord embeds. Replace with your own image URL.
Requirements:
- Must be a direct image URL (ends in
.png,.jpg,.webp, etc.) - Must be publicly accessible
- Recommended size: 256Ã256 pixels
Use a CDN like Imgur, Cloudinary, or your own server to host the image.
Minimum Tracking Timeâ
Config.MinTrackingTime = 5
The minimum work duration (in seconds) before logging is sent to Discord. Prevents spam from very short job changes.
Default: 5 seconds (sessions shorter than this are not reported)
Webhook Usernameâ
Config.WebhookUsername = "Vice-PlayerTime"
The name displayed on Discord webhook messages. Change this to your branding.
Example output:
Posted by: Vice-PlayerTime
shared/webhook.luaâ
Contains Discord webhook URLs for job notifications.
Join/Leave Webhooksâ
Webhooks.join = {
ambulance = "https://discord.com/api/webhooks/...",
police = "https://discord.com/api/webhooks/...",
-- ...
}
Sent when a player starts or stops working for a job.
Daily/Weekly Report Webhooksâ
Webhooks.daily = {
ambulance = "https://discord.com/api/webhooks/...",
police = "https://discord.com/api/webhooks/...",
-- ...
}
Sent at the times configured in Config.ReportTimes.
How to Create Discord Webhooksâ
- Open your Discord server and go to Server Settings â Integrations
- Click Create Webhook
- Name it (e.g., "Job Reports") and select the target channel
- Copy the webhook URL
- Paste it into
shared/webhook.lua
Webhook URLs contain tokens. Never share them or commit them to public repositories!
Use separate webhooks for different jobs and reports for better organization in Discord.