Configuration
Configuration options and settings
Configuration
All configuration is done in config.lua. Here are all available options:
General Settings
| Option | Type | Default | Description |
|---|---|---|---|
Config.Version |
string | '1.0.0' |
Resource version for update checking |
Config.Locale |
string | 'en' |
Language file from locales/ folder |
Config.Debug |
boolean | false |
Enable debug logging in server console |
Access Control
| Option | Type | Default | Description |
|---|---|---|---|
Config.AdminGroups |
table | {'god', 'admin', 'superadmin'} |
Permission groups with admin access |
Config.AdminGroups = {
'god',
'admin',
'superadmin',
}Bill Settings
| Option | Type | Default | Description |
|---|---|---|---|
Config.MaxDescriptionLength |
number | 500 |
Maximum characters for bill descriptions |
Config.DefaultDueDays |
number | 7 |
Default due date offset in days from creation |
Config.MinBillAmount |
number | 1 |
Minimum bill amount ($) |
Config.MaxBillAmount |
number | 1000000 |
Maximum bill amount ($) |
Config.MaxBulkTargets |
number | 10 |
Maximum players for bulk billing |
Config.AllowDisputes |
boolean | true |
Whether players can dispute bills |
Distance and Targeting
| Option | Type | Default | Description |
|---|---|---|---|
Config.NearbyDistance |
number | 0 |
Max distance to show nearby players (0 = all online) |
Late Fee System
| Option | Type | Default | Description |
|---|---|---|---|
Config.LateFeeInterval |
number | 60 |
Late fee check interval in minutes (0 = disabled) |
Late fee percentages are configured per job in the database and can be managed through the admin panel.
Status Configuration
Bill statuses with their display labels and colors:
Config.Statuses = {
{ id = 'unpaid', label = 'Unpaid', color = '#F97316' },
{ id = 'partial', label = 'Partial', color = '#EAB308' },
{ id = 'paid', label = 'Paid', color = '#22C55E' },
{ id = 'overdue', label = 'Overdue', color = '#EF4444' },
{ id = 'disputed', label = 'Disputed', color = '#8B5CF6' },
{ id = 'cancelled', label = 'Cancelled', color = '#6B7280' },
}Do not change the `id` values as they are used internally. You can modify `label` and `color` freely.
Payment Methods
Available payment options for players:
Config.PaymentMethods = {
{ id = 'bank', label = 'Bank' },
{ id = 'cash', label = 'Cash' },
}Discord Webhooks
Configure Discord logging by adding webhook URLs:
Config.Webhooks = {
BillCreated = '', -- When a new bill is sent
BillPaid = '', -- When a bill is paid (full or partial)
BillOverdue = '', -- When a bill becomes overdue
DisputeFiled = '', -- When a player disputes a bill
DisputeResolved = '', -- When an admin resolves a dispute
AdminAction = '', -- When an admin cancels or modifies a bill
}Leave empty ('') to disable specific webhook types.
Localization
Supported languages:
en- English (default)sv- Swedish
To add a new language:
- Copy
locales/en.jsontolocales/[code].json - Translate all values (keep keys unchanged)
- Set
Config.Locale = '[code]'
Advanced Configuration
Job Management
Jobs that can send bills are managed in the database table legacy_billing_jobs. You can:
- Enable/disable billing per job
- Set late fee percentages (0.00 to 100.00)
- Configure job display labels
Late Fee Calculation
Late fees are calculated as a percentage of the original bill amount and applied once when the due date passes:
Late Fee = Original Amount × (Late Fee Percentage ÷ 100)Performance Tuning
- Increase
Config.LateFeeIntervalto reduce server load - Set
Config.NearbyDistance> 0 to limit player lists in dense areas - Adjust
Config.MaxBulkTargetsbased on server performance
Changing configuration values may require a server restart to take effect.