mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #399 from Yianss/patch-1
Update the way jobrep metadata is handled
This commit is contained in:
+15
-6
@@ -80,12 +80,21 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
|
||||
PlayerData.metadata['craftingrep'] = PlayerData.metadata['craftingrep'] or 0
|
||||
PlayerData.metadata['attachmentcraftingrep'] = PlayerData.metadata['attachmentcraftingrep'] or 0
|
||||
PlayerData.metadata['currentapartment'] = PlayerData.metadata['currentapartment'] or nil
|
||||
PlayerData.metadata['jobrep'] = PlayerData.metadata['jobrep'] or {
|
||||
['tow'] = 0,
|
||||
['trucker'] = 0,
|
||||
['taxi'] = 0,
|
||||
['hotdog'] = 0,
|
||||
}
|
||||
if PlayerData.metadata['jobrep'] ~= nil then
|
||||
PlayerData.metadata['jobrep'] = {
|
||||
['tow'] = PlayerData.metadata['jobrep']['tow'] or 0,
|
||||
['trucker'] = PlayerData.metadata['jobrep']['trucker'] or 0,
|
||||
['taxi'] = PlayerData.metadata['jobrep']['taxi'] or 0,
|
||||
['hotdog'] = PlayerData.metadata['jobrep']['hotdog'] or 0,
|
||||
}
|
||||
else
|
||||
PlayerData.metadata['jobrep'] = {
|
||||
['tow'] = 0,
|
||||
['trucker'] = 0,
|
||||
['taxi'] = 0,
|
||||
['hotdog'] = 0,
|
||||
}
|
||||
end
|
||||
PlayerData.metadata['callsign'] = PlayerData.metadata['callsign'] or 'NO CALLSIGN'
|
||||
PlayerData.metadata['fingerprint'] = PlayerData.metadata['fingerprint'] or QBCore.Player.CreateFingerId()
|
||||
PlayerData.metadata['walletid'] = PlayerData.metadata['walletid'] or QBCore.Player.CreateWalletId()
|
||||
|
||||
Reference in New Issue
Block a user