@YehodAtias
Add the items you want to the markets from the config and as an extra example, you can look at markets numbered 12 and 13, they also have items.
This error is not from me, can you look at the item names in the config, I tested it on my friend and if we saw something like this, we would fix it.
What is your inventory and in which infrastructure are you getting errors?SCRIPT ERROR: @ac-shop/server/server.lua:97: attempt to call a nil value (field 'addInventoryItem')
What is your inventory and in which infrastructure are you getting errors?
Yes ı fixed qbcoreIt will be fixed if you change it with the lj inventory item giving event, or it may not be the required parameter, so can you make the necessary change by looking in another script?
Thanks for sharing. If anyone else gets the same error, they can use this.Yes ı fixed qbcore
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('ac-shopay')
AddEventHandler('ac-shopay', function(data)
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if data.payType == "cash" then
local money = xPlayer.PlayerData.money['cash']
if money >= data.price then
xPlayer.Functions.RemoveMoney('cash', data.price, "Shops")
AC.Success()
for k,v in pairs(data.cartArr) do
xPlayer.Functions.AddItem(v.itemname, tonumber(v.count))
end
else
AC.Error()
end
else
local bankMoney = xPlayer.PlayerData.money['bank']
if bankMoney >= data.price then
xPlayer.Functions.RemoveMoney('bank', data.price, "Shops")
AC.Success()
for k,v in pairs(data.cartArr) do
xPlayer.Functions.AddItem(v.itemname, tonumber(v.count))
end
else
AC.Error()
end
end
end)
Use the item giving function suitable for your inventory, whatever infrastructure you are using, make that code by looking at the item giving function in your script.View attachment 12906
working but i get the bug an item name at shoping chart, and if i buy it doesn't send to my inventory
i have test it and it works thank you very much but i have pay double can you give me credits back pleaseI added the new link, do not forget to select the discount from the new link and the framework from the config.
can you give me please my credits back i have pay double that would be niceesx or qb open source +rep
CAN YOU HELP ME mmView attachment 12906
working but i get the bug an item name at shoping chart, and if i buy it doesn't send to my inventory