Esxplantig kullanıyorum ama soruların bitince üstüme item vermiyor konsolda bir hata gozukuyor
Konsoldakı hata bu
if(itemProps.limit < itemProps.count + amount) then
Kodun Tamamı
RegisterServerEvent("esx_receptury:statusSuccess")
AddEventHandler("esx_receptury:statusSuccess", function(message, min, max, item)
TriggerClientEvent('esx:showNotification', source, message)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
math.randomseed(os.time())
local amount = math.random(min, max)
local itemProps = xPlayer.getInventoryItem(item)
if(itemProps.limit < itemProps.count + amount) then
xPlayer.setInventoryItem(item, itemProps.limit)
TriggerClientEvent("pNotify:SendNotification", source, {
text = 'Cebinizde Bos Alan Yok.',
type = "error",
timeout = 2000,
layout = "centerLeft"
})
else
xPlayer.addInventoryItem(item, amount)
end
end)
Konsoldakı hata bu
if(itemProps.limit < itemProps.count + amount) then
Kodun Tamamı
RegisterServerEvent("esx_receptury:statusSuccess")
AddEventHandler("esx_receptury:statusSuccess", function(message, min, max, item)
TriggerClientEvent('esx:showNotification', source, message)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
math.randomseed(os.time())
local amount = math.random(min, max)
local itemProps = xPlayer.getInventoryItem(item)
if(itemProps.limit < itemProps.count + amount) then
xPlayer.setInventoryItem(item, itemProps.limit)
TriggerClientEvent("pNotify:SendNotification", source, {
text = 'Cebinizde Bos Alan Yok.',
type = "error",
timeout = 2000,
layout = "centerLeft"
})
else
xPlayer.addInventoryItem(item, amount)
end
end)
