Installation

If you can't do something, open a ticket on discord and we'll fix it.

qb-core

You have to go here and find this. qb-core/server/player.lua find QBCore.Player.Save(source) and change :

qb-core/server/player.lua
function QBCore.Player.Save(source)
	local src = source
	local ped = GetPlayerPed(src)
    local pcoords = GetEntityCoords(ped)
    local PlayerData = QBCore.Players[src].PlayerData
	if PlayerData ~= nil then
		local result = exports.oxmysql:executeSync('SELECT * FROM players WHERE citizenid=@citizenid', {['@citizenid'] = PlayerData.citizenid})
		if result[1] == nil then
			exports.oxmysql:execute('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata, :discordID) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', {
				citizenid = PlayerData.citizenid,
				cid = tonumber(PlayerData.cid),
				license = PlayerData.license,
				name = PlayerData.name,
				money = json.encode(PlayerData.money),
				charinfo = json.encode(PlayerData.charinfo),
				job = json.encode(PlayerData.job),
				gang = json.encode(PlayerData.gang),
				position = json.encode(pcoords),
				metadata = json.encode(PlayerData.metadata),
			})
		else
			exports.oxmysql:execute('UPDATE players SET license = @license, name = @name, money = @money, charinfo = @charinfo, job = @job, gang = @gang, position = @position, metadata = @metadata WHERE citizenid = @citizenid', {
				['@citizenid'] = PlayerData.citizenid,
				['@license'] = PlayerData.license,
				['@name'] = PlayerData.name,
				['@money'] = json.encode(PlayerData.money),
				['@charinfo'] = json.encode(PlayerData.charinfo),
				['@job'] = json.encode(PlayerData.job),
				['@gang'] = json.encode(PlayerData.gang),
				['@position'] = json.encode(pcoords),
				['@metadata'] = json.encode(PlayerData.metadata),
			})
		end
		-- QBCore.Player.SaveInventory(src)
        	exports['qb-inventory']:SaveInventory(src)
		QBCore.ShowSuccess(GetCurrentResourceName(), 'NEW PLAYER '..PlayerData.name ..' SAVED!')
	else
		QBCore.ShowError(GetCurrentResourceName(), 'ERROR QBCORE.PLAYER.SAVE - PLAYERDATA IS EMPTY!')
	end
end

After change: You have to go here and find this. qb-core/server/player.lua find QBCore.Player.SaveOffline(source)

qbx-core

You have to go here and find this. qbx-core/server/storage.lua find UpsertPlayerEntity(request)and change :

Last updated