From 8b8a4f45ec840e2d8039999031dcfdd979314eb9 Mon Sep 17 00:00:00 2001 From: Corey McCown Date: Tue, 15 May 2018 13:46:09 -0400 Subject: [PATCH] Update main.lua Fix #38, item pickup issue. --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 6c4bc028..73e1fefd 100644 --- a/server/main.lua +++ b/server/main.lua @@ -542,7 +542,7 @@ AddEventHandler('esx:onPickup', function(id) if pickup.type == 'item_standard' then local item = xPlayer.getInventoryItem(pickup.name) - local canTake = (item.limit - item.count > 0) and (item.limit - item.count) or 0 + local canTake = ((item.limit == -1) and (pickup.count)) or ((item.limit - item.count > 0) and (item.limit - item.count)) or 0 local total = pickup.count < canTake and pickup.count or canTake local remaining = pickup.count - total