mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 17:23:31 +00:00
@@ -113,6 +113,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
|
|||||||
PlayerData.job.name = PlayerData.job.name or 'unemployed'
|
PlayerData.job.name = PlayerData.job.name or 'unemployed'
|
||||||
PlayerData.job.label = PlayerData.job.label or 'Civilian'
|
PlayerData.job.label = PlayerData.job.label or 'Civilian'
|
||||||
PlayerData.job.payment = PlayerData.job.payment or 10
|
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
|
if QBCore.Shared.ForceJobDefaultDutyAtLogin or PlayerData.job.onduty == nil then
|
||||||
PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty
|
PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty
|
||||||
end
|
end
|
||||||
@@ -167,6 +168,7 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
|||||||
self.PlayerData.job.name = job
|
self.PlayerData.job.name = job
|
||||||
self.PlayerData.job.label = QBCore.Shared.Jobs[job].label
|
self.PlayerData.job.label = QBCore.Shared.Jobs[job].label
|
||||||
self.PlayerData.job.onduty = QBCore.Shared.Jobs[job].defaultDuty
|
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
|
if QBCore.Shared.Jobs[job].grades[grade] then
|
||||||
local jobgrade = QBCore.Shared.Jobs[job].grades[grade]
|
local jobgrade = QBCore.Shared.Jobs[job].grades[grade]
|
||||||
self.PlayerData.job.grade = {}
|
self.PlayerData.job.grade = {}
|
||||||
|
|||||||
+2
-1
@@ -14,6 +14,7 @@ QBShared.Jobs = {
|
|||||||
},
|
},
|
||||||
['police'] = {
|
['police'] = {
|
||||||
label = 'Law Enforcement',
|
label = 'Law Enforcement',
|
||||||
|
type = "leo",
|
||||||
defaultDuty = true,
|
defaultDuty = true,
|
||||||
offDutyPay = false,
|
offDutyPay = false,
|
||||||
grades = {
|
grades = {
|
||||||
@@ -279,4 +280,4 @@ QBShared.Jobs = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user