-- render
local nextOffset = 0
for i, v in pairs(menu) do
local textwidth -- get your text width
local textheight -- get your text height here
local posX = nextOffset
local posY -- your Y position
local endX = posX + textwidth
local endY = posY + textheight
-- draw it
dxDrawText(v.name, posX, posY, endX, endY, ...) -- your next argument bla, bla, bla
-- set the next offset
nextOffset = nextOffset + textwidth
end
Something like this may work. And also argument 5 and argument 6 should not be 0 value, because you also set the alignment for the text.
See: dxDrawText