Added support for placing items on ground if inv too full

This commit is contained in:
Ollie Pugh
2021-12-30 02:56:30 +00:00
parent 02a46247cb
commit 8ef28d2d05
+2 -1
View File
@@ -352,7 +352,8 @@ function QBCore.Player.CreatePlayer(PlayerData)
end
end
else
TriggerClientEvent('QBCore:Notify', self.PlayerData.source, 'Your inventory is too heavy!', 'error')
TriggerEvent("inventory:server:spawnOnGround", self.PlayerData.source, { name = itemInfo['name'], amount = amount, info = info or '', label = itemInfo['label'], description = itemInfo['description'] or '', weight = itemInfo['weight'], type = itemInfo['type'], unique = itemInfo['unique'], useable = itemInfo['useable'], image = itemInfo['image'], shouldClose = itemInfo['shouldClose'], slot = slot, combinable = itemInfo['combinable'] }, amount)
TriggerClientEvent('QBCore:Notify', self.PlayerData.source, 'Your inventory is too heavy, placing item on floor!', 'error')
end
return false
end