mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
@@ -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
@@ -14,6 +14,7 @@ QBShared.Jobs = {
|
||||
},
|
||||
['police'] = {
|
||||
label = 'Law Enforcement',
|
||||
type = "leo",
|
||||
defaultDuty = true,
|
||||
offDutyPay = false,
|
||||
grades = {
|
||||
@@ -279,4 +280,4 @@ QBShared.Jobs = {
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user