35 credits

Ac-Shop

95 replies15,683 views2y ago

95 replies

2y ago#21
@[USER=60851]YehodAtias[/USER]

If you tell me what doesn't work, I will fix it, but it works for everyone now.
0
2y ago#22
[ATTACH type="full"]12901[/ATTACH]
0
2y ago#23
@[USER=60851]YehodAtias[/USER]

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.
0
2y ago#24
how i fix this?

please tell
WestRust, post: 286969, member: 29287
@[USER=60851]YehodAtias[/USER]

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.

[ATTACH type="full"]12902[/ATTACH]

















the all name i knife
0
2y ago#25
SCRIPT ERROR: @ac-shop/server/server.lua:97: attempt to call a nil value (field 'addInventoryItem')
0
2y ago#26
YehodAtias, post: 286970, member: 60851
how i fix this?

please tell

[ATTACH type="full" alt="1706138260837.png"]12902[/ATTACH]

















the all name i knife

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.
0
2y ago#27
esplugin, post: 286971, member: 56309
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?
0
2y ago#28
New QBCore lj-inventory bro :=)
WestRust, post: 286994, member: 29287
What is your inventory and in which infrastructure are you getting errors?
0
2y ago#29
It 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?
0
2y ago#30
WestRust, post: 287002, member: 29287
It 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?

Yes ı fixed qbcore

local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('ac-shop:pay')
AddEventHandler('ac-shop:pay', 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)
0
2y ago#31
esplugin, post: 287005, member: 56309
Yes ı fixed qbcore

local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('ac-shop:pay')
AddEventHandler('ac-shop:pay', 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)

Thanks for sharing. If anyone else gets the same error, they can use this.
0
2y ago#32
[ATTACH type="full" width="674px"]13055[/ATTACH]

working but if i buy it doesn't send to my inventory
0
2y ago#33
callisto, post: 287094, member: 25903
[ATTACH type="full" width="523px" alt="1706157508201.png"]12906[/ATTACH]

working but i get the bug an item name at shoping chart, and if i buy it doesn't send to my inventory

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.
0
2y ago#34
WestRust, post: 286887, member: 29287
I added the new link, do not forget to select the discount from the new link and the framework from the config.

i have test it and it works thank you very much but i have pay double can you give me credits back please
0
2y ago#35
Good share bro cheers good one this
0
2y ago#36
esx or qb open source +rep
0
2y ago#37
Nice thanks man for this share
0
2y ago#38
WestRust, post: 287335, member: 29287
esx or qb open source +rep

can you give me please my credits back i have pay double that would be nice
0
2y ago#39
callisto, post: 287094, member: 25903
[ATTACH type="full" width="523px" alt="1706157508201.png"]12906[/ATTACH]

working but i get the bug an item name at shoping chart, and if i buy it doesn't send to my inventory

CAN YOU HELP ME mm
0
2y ago#40
Thanks for sharing but a little expensive
0

Sign in to reply

Join the discussion — it takes less than a minute.