JCKSDocs
JCKS JobsV1Funciones

Invoices, paychecks and service calls

How invoices, fines, paychecks, service calls and the taxi meter work in JCKS Jobs 1.0.0.

Invoices and fines

Employees with the billing permission send invoices to a nearby player with the target option Send invoice. Every grade of the jobs in Config.Billing.allGrades (default police, sheriff, ambulance, mechanic) can bill without the permission. The invoice window offers the quick picks of the job, and the employee can always type an own amount. On foot the employee writes on a notepad and the invoice is handed over with an animation.

Players pay or decline in the Job Hub (F6, Invoices). The company account receives the money, the employee who sent it gets commission percent. Bosses see every invoice of the company with totals and can cancel unpaid ones. Unpaid invoices are reminded when the player joins.

Key Default What it changes
Config.Billing.enabled true Invoices on or off
Config.Billing.requireDuty true Only on duty
Config.Billing.distance 5.0 Max meters to the other player
Config.Billing.allGrades { 'police', 'sheriff', 'ambulance', 'mechanic' } Jobs where every grade bills
Config.Billing.maxAmount 100000 Highest invoice
Config.Billing.commission 10 Percent for the sender, the rest goes to the company
Config.Billing.account 'bank' Account invoices are paid from, 'bank' or 'cash'
Config.Billing.allowDecline true Players can decline
Config.Billing.maxPending 10 Unpaid invoices one player can have
Config.Billing.remindOnJoin true Reminder of unpaid invoices on join
Config.Billing.presets police, ambulance, mechanic lists Quick picks per job, { label, amount }

MDT reports bill each suspect with the same invoice system. Other resources create invoices with CreateInvoice (see API). ServerEditable.SendInvoice in server/editable.lua can hand invoices to an external billing resource: return true when it took over.

Paychecks

Off by default. When on, every employee gets the salary of their grade every interval minutes. Turn off the framework paycheck at the same time (ESX Config.PaycheckInterval, QBCore QBConfig.Money.PayCheckTimeOut, the Qbox paycheck settings), or players are paid twice.

Key Default What it changes
Config.Payroll.enabled false Paychecks on or off
Config.Payroll.interval 15 Minutes between paychecks
Config.Payroll.onlyOnDuty true Only players on duty are paid
Config.Payroll.fromSociety true Salaries come from the company account, no money means no paycheck
Config.Payroll.account 'bank' Where the salary goes

Service calls

Every player can call a job with /call <job> <message> or in F6, Services. On-duty employees get an alert and a blip for blipTime seconds. /respond sets the GPS to the latest call and tells the caller a unit is on the way.

Key Default What it changes
Config.ServiceCalls.enabled true Service calls on or off
Config.ServiceCalls.command 'call' false = only through F6
Config.ServiceCalls.respondCommand 'respond' Respond command
Config.ServiceCalls.respondKey '' Default key for responding
Config.ServiceCalls.jobs police, ambulance, mechanic, taxi Callable jobs with label and icon
Config.ServiceCalls.cooldown 60 Seconds between two calls of one player
Config.ServiceCalls.blipTime 120 Seconds the call stays on the map
Config.ServiceCalls.anonymous false Hides the caller's name

ServerEditable.OnServiceCall can send calls to another dispatch resource: return true to take over.

Taxi meter

The on-duty taxi driver starts and stops the meter with /taximeter or the optional key. The fare is baseFare plus perKm for every km plus perMinute for every minute of waiting. Driver and passengers see a meter with LED digits at the top of the screen. Stopping it bills a passenger who sits in the car or stands next to it, with a normal invoice. The server checks the value the client sends.

Key Default What it changes
Config.TaxiMeter.enabled true Meter on or off
Config.TaxiMeter.jobs { taxi = true } Jobs that use it
Config.TaxiMeter.requireDuty true Only on duty
Config.TaxiMeter.command 'taximeter' Command
Config.TaxiMeter.key '' Default key, players rebind it
Config.TaxiMeter.models {} Empty = every vehicle, for example { 'taxi' }
Config.TaxiMeter.baseFare 25 Start fare
Config.TaxiMeter.perKm 45 Per km driven
Config.TaxiMeter.perMinute 4 Per minute of waiting
Config.TaxiMeter.maxFare 2500 Highest fare
Config.TaxiMeter.billCooldown 60 Seconds before the same passenger can be billed again