HUD


	-- Add 16 to the width and set the height of the box.
	width = width + 16;
	height = (20 * #information) + 14 - cutheight;
	
	-- The position of the information box.
	local x = 4;
	local y = ScrH() - height - 4;
	
	-- Increase the x and y position by 8.
	x = x;
	y = y + 16;
	
	local last_textwidth = 0
	-- Draw the information on the box.
	for k, v in pairs(information) do
		textwidth, textheight = surface.GetTextSize(v[1])
		
		if ( v[3] == true ) then
			draw.RoundedBox(0, x + last_textwidth + 24, y - 20, textwidth + 23, 18, Color(0, 0, 0, 200))
			self:DrawInformation(v[1], "ChatFont", x + last_textwidth + 45, y - 19, Color(255, 255, 255, 255), 255, true);
			
			if ( v[2] ) then
				surface.SetMaterial( Material( v[2] ) );
				surface.SetDrawColor(255, 255, 255, 255);
				surface.DrawTexturedRect(x + last_textwidth + 25, y - 19, 16, 16);
			end
			
		elseif ( v[2] ) then
			draw.RoundedBox(0, x, y, textwidth + 22, 18, Color(0, 0, 0, 200))
			self:DrawInformation(v[1], "ChatFont", x + 20, y + 1, Color(255, 255, 255, 255), 255, true);
			
			-- Draw the icon that respresents the text.
			surface.SetMaterial( Material( v[2] ) );
			surface.SetDrawColor(255, 255, 255, 255);
			surface.DrawTexturedRect(x + 1, y + 1, 16, 16);
		else
			draw.RoundedBox(0, x, y, width, 20, Color(0, 0, 0, 200))
			self:DrawInformation(v[1], "ChatFont", x, y + 1, Color(255, 255, 255, 255), 255, true);
		end;
		
		-- Increase the y position.
		if ( !v[3] or v[3] == false ) then
			y = y + 20;
		end
		
		last_textwidth = textwidth
	end;
	
	-- Return the width and height of the box.
	return width, height;
end;

I think this piece of code makes it show up like:

What do I have to change in the code to make it appear like this:

Like what do I have to change to make it appear in a square box instead of single boxes.

I would recommend just getting rid of the draw.RoundedBox’s under the “for, do” loop and just put a draw.RoundedBox before the “for, do” loop

And how would I do that, what I’ve tried so far did not work (Including your way, but I think I didn’t do it right.)

[editline]25th May 2017[/editline]

Fixed, thanks for the help.