Hello Guys.
I need help with my inventory script, when opening it, keeps “loading” and in F8 the following message appears:
NUI CALLBACK on client side:
CODE vRPN.Mochila()
function vRPN.Mochila()
local source = source
local user_id = vRP.getUserId(source)
local data = vRP.getUserDataTable(user_id)
local inventario = {}
local peso = vRP.getInventoryWeight(user_id)
local maxpeso = vRP.getInventoryMaxWeight(user_id)
if data and data.inventory then
for k,v in pairs(data.inventory) do
if vRP.itemBodyList(k) then
table.insert(inventario,{ amount = parseInt(v.amount), name = vRP.itemNameList(k), index = vRP.itemIndexList(k), key = k, type = vRP.itemTypeList(k), peso = vRP.getItemWeight(k) })
end
end
return inventario,peso,maxpeso
end
end
Inventory on FiveM:
Can you help me with this problem?