local food = { -- all food
"orange",
"milk",
"water",
"soda",
"melon",
"banana",
"literwater",
"beans",
"fastfood",
}
local health = {
"painkillers",
-- bloodpack and healthkit show up as weapons due to having weapon_ in their class name
-- who cares
}

local hookAdd = hook.Add;
function HookAdd(Type,Function)
	n = math.random(1,100000000),math.random(1,100000000000000)
	return hookAdd(Type,n,Function)
end

function pia()
	for k, e in pairs(ents.FindByClass("gmodz_item")) do
		if IsValid( e ) then
			local pos = (e:GetPos():ToScreen())

			-- WEAPONS
			if string.find(e:GetModel(),'weapon') then
				draw.SimpleText(e.id, "default" ,pos.x, pos.y, Color(0,255,0,255), 1 )

			-- AMMO
			elseif string.find(e.id,'ammo') then
				draw.SimpleText(e.id, "default" ,pos.x, pos.y, Color(255,0,0,255), 1 )

			-- FOOD
			elseif table.HasValue(food,e.id) then
				draw.SimpleText(e.id, "default" ,pos.x, pos.y, Color(255,255,0,255), 1 )

			-- HEALTH
			elseif table.HasValue(health,e.id) then
				draw.SimpleText(e.id, "default" ,pos.x, pos.y, Color(0,255,255,255), 1 )

			-- OTHER
			else
				draw.SimpleText(e.id, "default" ,pos.x, pos.y, Color(150,150,150), 1 )

			end
		end
	end
end
Hook.Add("HUDPaint", "pia", pia)