mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
Merge pull request #1855 from seltonmt012/fix/setinventoryitem-noop
fix(es_extended/server/classes/player): stop setInventoryItem throwing when nothing changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user