mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 17:23:31 +00:00
Inventory singleSync
This commit is contained in:
+4
-4
@@ -527,10 +527,10 @@ end
|
||||
|
||||
QBCore.Player.LoadInventory = function(PlayerData)
|
||||
PlayerData.items = {}
|
||||
local result = exports.oxmysql:executeSync('SELECT * FROM players WHERE citizenid = ?', { PlayerData.citizenid })
|
||||
if result[1] then
|
||||
if result[1].inventory then
|
||||
plyInventory = json.decode(result[1].inventory)
|
||||
local result = exports.oxmysql:singleSync('SELECT * FROM players WHERE citizenid = ?', { PlayerData.citizenid })
|
||||
if result then
|
||||
if result.inventory then
|
||||
local plyInventory = json.decode(result.inventory)
|
||||
if next(plyInventory) then
|
||||
for _, item in pairs(plyInventory) do
|
||||
if item then
|
||||
|
||||
Reference in New Issue
Block a user