Merge pull request #617 from Lionh34rt/main

PlayerData.job.isleo
This commit is contained in:
Kakarot
2022-06-15 18:07:29 -07:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -113,6 +113,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
PlayerData.job.name = PlayerData.job.name or 'unemployed'
PlayerData.job.label = PlayerData.job.label or 'Civilian'
PlayerData.job.payment = PlayerData.job.payment or 10
PlayerData.job.type = PlayerData.job.type or 'none'
if QBCore.Shared.ForceJobDefaultDutyAtLogin or PlayerData.job.onduty == nil then
PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty
end
@@ -167,6 +168,7 @@ function QBCore.Player.CreatePlayer(PlayerData)
self.PlayerData.job.name = job
self.PlayerData.job.label = QBCore.Shared.Jobs[job].label
self.PlayerData.job.onduty = QBCore.Shared.Jobs[job].defaultDuty
self.PlayerData.job.type = QBCore.Shared.Jobs[job].type or 'none'
if QBCore.Shared.Jobs[job].grades[grade] then
local jobgrade = QBCore.Shared.Jobs[job].grades[grade]
self.PlayerData.job.grade = {}
+2 -1
View File
@@ -14,6 +14,7 @@ QBShared.Jobs = {
},
['police'] = {
label = 'Law Enforcement',
type = "leo",
defaultDuty = true,
offDutyPay = false,
grades = {
@@ -279,4 +280,4 @@ QBShared.Jobs = {
},
},
},
}
}