refactor(client/functions): Don't send events for inventory and loadout

- While most resources for ESX will utilise PlayerData in some way, few will require up-to-date inventory and loadout data.
- Those that do use the getter or a server callback, anyway.
This commit is contained in:
Linden
2021-06-04 20:55:05 +10:00
committed by GitHub
parent 30de47e09d
commit 55edd9ad66
+3 -1
View File
@@ -42,7 +42,9 @@ end
ESX.SetPlayerData = function(key, val)
ESX.PlayerData[key] = val
TriggerEvent('esx:setPlayerData', key, val)
if key ~= 'inventory' and key ~= 'loadout' then
TriggerEvent('esx:setPlayerData', key, val)
end
end
ESX.ShowNotification = function(msg)