For not Saving 0x item into to esx menu “inventory” do this
check for :
local elements = {}
for i=1, #inventory.items, 1 do
local item = inventory.items[i]
if item.count > 0 then -- < add this code line!!.... not the (--)
table.insert(elements, {label = .... etc etc etc }
end -- < Dont forget to close the if :)