Logs
This system automatically sends detailed reports to your Discord server whenever players interact with the job. It tracks job starts, completions, and payouts for administrative monitoring.
Configuration (Config.DiscordWebhook)
Config.DiscordWebhook)This is the only line you typically need to edit.
How to get the Link:
Create a private channel in your Discord (e.g.,
#trucker-logs).Right-click the channel β Edit Channel β Integrations β Webhooks.
Create a new Webhook and copy the Webhook URL.
Usage: Paste the link inside the quotes.
Config.DiscordWebhook = 'ADD_YOUR_WEBHOOK_HERE'Log Types
The code below the configuration defines the specific events that trigger a log. You generally do not need to touch these functions unless you want to change the color or layout of the Discord message.
Summary Logs (sendSummaryLogs)
Trigger: Likely triggered at every restart of the script.
Data Sent:
Amount of courses (deliveries) made.
Total money earned.
2. Job Start Logs (startJobLogs)
Trigger: When a player (or group) starts the job.
Data Sent:
Leader Info: Name, ID, License Identifier.
Group Info: IDs of all players in the lobby.
Job Details: Job Name, Truck Stop location, Destination Coordinates.
Transport Type: Legal, overweight, illegal
3. Payout Logs (payoutLogs)
Trigger: When the delivery is successfully completed.
Data Sent:
Financials: Total Reward and the calculated salary percentage per player.
Completion: Confirmation that the specific lobby/job ID is finished.
Advanced Developer Note
The functions use the standard PerformHttpRequest native to send a POST request to the Discord API.
Customizing Colors: Change the
["color"] = 8663865value (Decimal color code).Customizing Images: Replace
https://i.imgur.com/gSBwBUe.pngwith your server's logo URL.
Last updated