mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:01:22 +00:00
Merge pull request #1566 from Kenshiin13/off-duty-pay
feat(es_extended/server/modules/paycheck): add offDuty pay
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user