Skip to content

Commit

Permalink
fix: some missed instances
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm committed Jun 5, 2024
1 parent dce9565 commit 765469c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,9 @@ function CheckPlayerData(source, playerData)
}
playerData.gangs = gangs or {}
playerData.position = playerData.position or defaultSpawn
playerData.items = GetResourceState('qb-inventory') ~= 'missing' and exports['qb-inventory']:LoadInventory(playerData.source, playerData.citizenid) or {}

assert(GetResourceState('qb-inventory') ~= 'started', 'qb-inventory is not compatible with qbx_core. use ox_inventory instead')
playerData.items = {}
return CreatePlayer(playerData --[[@as PlayerData]], Offline)
end

Expand Down Expand Up @@ -938,7 +940,7 @@ function Save(source)
position = pcoords,
})
end)
if GetResourceState('qb-inventory') ~= 'missing' then exports['qb-inventory']:SaveInventory(source) end
assert(GetResourceState('qb-inventory') ~= 'started', 'qb-inventory is not compatible with qbx_core. use ox_inventory instead')
lib.print.verbose(('%s PLAYER SAVED!'):format(playerData.name))
end

Expand All @@ -957,7 +959,7 @@ function SaveOffline(playerData)
position = playerData.position.xyz
})
end)
if GetResourceState('qb-inventory') ~= 'missing' then exports['qb-inventory']:SaveInventory(playerData, true) end
assert(GetResourceState('qb-inventory') ~= 'started', 'qb-inventory is not compatible with qbx_core. use ox_inventory instead')
lib.print.verbose(('%s OFFLINE PLAYER SAVED!'):format(playerData.name))
end

Expand Down

0 comments on commit 765469c

Please sign in to comment.