Paycheck System
The Finals Management paycheck engine provides realistic payroll processing, receipt slip overlays, and multiple payout channels.
1. Execution Modes (Config.AutoPaycheck)
| Mode | Loop Location | When to Use | Setup |
|---|---|---|---|
builtin | finals_management | Standalone, Custom, or any server wanting automated payroll with zero core framework edits. | Uses Config.AutoPaycheck.intervalMinutes and salaries defined in paychecks.lua. |
framework | Framework core | Servers where Qbox, QBCore, or ESX core manages the pay timer. | Framework calls exports['finals_management']:AddPendingPaycheck(...). |
Lua
Config.AutoPaycheck = {
enabled = true,
mode = 'builtin', -- 'builtin' | 'framework'
payOnStartup = true, -- Issues test paycheck 15s after resource reload
intervalMinutes = 10, -- Payroll interval in minutes (builtin mode)
requireOnDuty = true, -- Only accrue pay while clocked on duty
payoutMoneyType = 'bank', -- Deposit destination ('bank' or 'cash')
--- Society Vault Deduction & Government Reserve Fallback
payrollFunding = {
deductFromSociety = true, -- Debits salary from department society account
fallbackToGovernment = true, -- If society lacks funds, fallback to state reserves so workers are still paid
},
layout = {
position = 'middle-right',
size = 'large',
displayMs = 3500,
animationMs = 450,
},
}2. Salary Configuration (paychecks.lua)
When using mode = 'builtin', define job salaries and grade flags in paychecks.lua:
Lua
Paychecks = {
['police'] = {
label = 'Los Santos Police Department',
grades = {
[0] = { name = 'Cadet', payment = 50 },
[1] = { name = 'Officer', payment = 75 },
[2] = { name = 'Sergeant', payment = 100 },
[3] = { name = 'Lieutenant', payment = 125 },
[4] = { name = 'Chief of Police', isboss = true, bankAuth = true, payment = 150 },
},
},
['ambulance'] = {
label = 'Emergency Medical Services',
grades = {
[0] = { name = 'Paramedic In Training', payment = 45 },
[1] = { name = 'Paramedic', payment = 70 },
[2] = { name = 'Field Supervisor', payment = 95 },
[3] = { name = 'Chief of Medicine', isboss = true, bankAuth = true, payment = 140 },
},
},
}3. Delivery Channels (Config.PaycheckDelivery)
Choose how employees receive their earned wages:
A. Direct Deposit (direct)
Wages immediately land in the player's bank or cash account each pay cycle.
B. Physical Payroll Clerk NPC (collection_ped)
Wages accumulate in the database (finals_pending_paychecks). Employees must visit the city payroll clerk to collect their accumulated wages:
Lua
Config.PaycheckDelivery = {
method = 'collection_ped',
payoutMoneyType = 'bank',
collectionPed = {
enabled = true,
location = vector4(241.5269, 227.0405, 106.2870, 154.6251),
model = 's_m_m_highsec_01',
interactDistance = 2.0,
interact = 'ox_target', -- 'ox_target' | 'qb-target' | 'ox_lib' | 'native'
requireConfirm = true,
blip = {
enabled = true,
sprite = 280,
scale = 0.8,
colour = 3,
name = 'Payroll Clerk',
},
},
}C. Mobile Tablet Collection (tablet)
Wages accrue in the database and can be claimed anytime directly from the employee tablet.
4. Paycheck Slip Alerts & Sound
Lua
Config.PaycheckAlerts = {
payslipui = true, -- Paytm/Maze Bank style receipt slip NUI overlay
Notification = true, -- Standard HUD toast alert
Mail = true, -- In-game smartphone email notification
}
Config.PaycheckSound = {
enabled = true,
name = 'CONFIRM_BEEP',
set = 'HUD_MINI_GAME_SOUNDSET',
}
Config.PaycheckSampleData = {
title = 'Paycheck Received',
currencySymbol = '$',
logo = 'https://r2.fivemanage.com/UAQqgGIAmbtk5u6XDUrVw/maze-bank-logo.png',
logoScale = 1.5,
toDetail = 'Payroll Deposit',
fromDetail = 'Maze Bank Official',
}