From e71e187a8f0213558a7b8d7d60358109a18b9f9c Mon Sep 17 00:00:00 2001 From: Hakos47 <76844995+hakos47@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:24:32 +0200 Subject: [PATCH] fix shared update It's a temporary fix while we see how to do it better. but this in principle fixes the error that when a client entered it did not get the table of items etc updated. since shared_scripts does not serve to update information on both sides (client, server) it would fix problems with addItems, addItem, etc. It is not the best solution. but it's a temporary fix --- server/player.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/player.lua b/server/player.lua index 2c454c0..0385b7a 100644 --- a/server/player.lua +++ b/server/player.lua @@ -32,6 +32,11 @@ function QBCore.Player.Login(source, citizenid, newData) return true else QBCore.ShowError(GetCurrentResourceName(), 'ERROR QBCORE.PLAYER.LOGIN - NO SOURCE GIVEN!') + for k,v in pairs(QBCore.Shared) do + if type (v) == 'table' then + TriggerClientEvent('QBCore:Client:OnSharedUpdateMultiple', source, k,v) + end + end return false end end