Skip to main content

Installation

1. Add the Resource​

Place the resource folder into your server's resources directory. The resource can be named anything, but we recommend:

resources/
├── cfx_job_time_tracker/
├── fxmanifest.lua
├── shared/
├── server/
├── client/
└── locales/

2. Install Dependencies​

This resource requires oxmysql for database operations. Make sure it's installed and started in your server.cfg:

ensure oxmysql
ensure cfx_job_time_tracker

3. Database Setup​

Import the provided .sql file into your database.

tip

The system uses the native oxmysql library. If you're using a different database system, ensure the connection is properly configured in your server setup.

4. Configure Framework​

Edit shared/config.lua and set your framework:

Config.Framework = 'esx' -- Change to 'qbcore' if using QBCore

5. Add Discord Webhooks​

Edit shared/webhook.lua and add your Discord webhook URLs for each job:

Webhooks.join = {
ambulance = "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_TOKEN",
police = "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_TOKEN",
-- Add more jobs...
}
warning

Keep your webhook URLs private! Do not share them publicly or commit them to public repositories.

6. Start the Server​

Restart your FiveM server or use the refresh command:

refresh
start cfx_job_time_tracker

You should see console messages confirming the resource has loaded successfully.

success

Your Job Time Tracker is now ready! Proceed to Usage to configure tracked jobs and test the system.