Merge pull request #1566 from Kenshiin13/off-duty-pay

feat(es_extended/server/modules/paycheck): add offDuty pay
This commit is contained in:
Kenshin13
2025-01-01 16:44:04 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
@@ -5,7 +5,8 @@ function StartPayCheck()
for player, xPlayer in pairs(Core.Players) do
local jobLabel = xPlayer.job.label
local job = xPlayer.job.grade_name
local salary = xPlayer.job.grade_salary
local onDuty = xPlayer.job.onDuty
local salary = (job == "unemployed" or onDuty) and xPlayer.job.grade_salary or ESX.Math.Round(xPlayer.job.grade_salary * Config.OffDutyPaycheckMultiplier)
if xPlayer.paycheckEnabled then
if salary > 0 then
@@ -44,6 +44,7 @@ Config.SaveDeathStatus = true -- Save the death status of a player
Config.EnableDebug = false -- Use Debug options?
Config.DefaultJobDuty = true -- A players default duty status when changing jobs
Config.OffDutyPaycheckMultiplier = 0.5 -- The multiplier for off duty paychecks. 0.5 = 50% of the on duty paycheck
Config.Multichar = GetResourceState("esx_multicharacter") ~= "missing"
Config.Identity = true -- Select a character identity data before they have loaded in (this happens by default with multichar)