Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local itemsTable = {}
- local itemCount = 0
- local scanItem = 5541
- for i = 4000, 4100 do
- houseId = i
- print(houseId)
- if tonumber(getHouseOwner(houseId)) then
- for _, pos in pairs(getHouseTiles(houseId)) do
- for _, item in pairs(getTileItems(pos)) do
- if (isMoveable(item.uid)) then
- if (isContainer(item.uid)) then
- for _, items in ipairs(getAllItemsFromContainer(item)) do
- if items.itemid == scanItem then
- itemCount = itemCount + 1
- end
- end
- else
- if item.itemid == scanItem then
- itemCount = itemCount + 1
- end
- end
- end
- end
- end
- if itemCount >= 10 then
- table.insert(itemsTable, {houseId, itemCount})
- end
- end
- itemCount = 0
- end
- for k, v in pairs(itemsTable) do
- print("House id: ("..v[1].."), count: ("..v[2]..")")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement