From 4f9a4a06c8fe3e37939347a38086b8b3b68794ce Mon Sep 17 00:00:00 2001 From: randomz <41997047+RandomZFx@users.noreply.github.com> Date: Fri, 8 Aug 2025 23:47:13 -0500 Subject: [PATCH] Update server.lua Converted String amount to Number to ensure AddItem was properly working. (tested on live server item was not being given due to that issue) --- modules/shops/_default/server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shops/_default/server.lua b/modules/shops/_default/server.lua index c44b668..768bc5a 100644 --- a/modules/shops/_default/server.lua +++ b/modules/shops/_default/server.lua @@ -51,7 +51,7 @@ Shops.CompleteCheckout = function(src, shopName, item, amount, paymentType) local mathStuff = tonumber(itemData.price) * tonumber(amount) if balance < mathStuff then return Notify.SendNotify(src, ilocale('Shops.NotEnoughMoney'), "error", 5000) end if not Framework.RemoveAccountBalance(src, paymentType, mathStuff) then return end - Inventory.AddItem(src, itemData.name, amount) + Inventory.AddItem(src, itemData.name, tonumber(amount)) local itemLabel = Inventory.GetItemInfo(itemData.name).label Notify.SendNotify(src, ilocale('Shops.PurchasedItem')..itemLabel, "success", 5000) end @@ -63,4 +63,4 @@ RegisterNetEvent("community_bridge:completeCheckout", function(shopName, item, a Shops.CompleteCheckout(src, shopName, item, amount, paymentType) end) -return Shops \ No newline at end of file +return Shops