fix(es_extended/server/classes/player): make setInventoryItem a no-op on no change

Setting an item to the count it already has sent a zero difference to
removeInventoryItem, which treats zero as an error and calls error(). That
unwinds out of the caller, so anything after the call was skipped.
This commit is contained in:
Selt
2026-07-28 01:54:04 +02:00
parent 5354e278de
commit e6b6d1f40a
@@ -505,6 +505,10 @@ function CreateExtendedPlayer(playerId, identifier, ssn, group, accounts, invent
if item and count >= 0 then
count = ESX.Math.Round(count)
if count == item.count then
return
end
if count > item.count then
self.addInventoryItem(item.name, count - item.count)
else