Jump to content

[HELP] Line Break


off

Recommended Posts

I am writing a text, but do not know how to break the line.

Example:

local text1 = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec aliquam mi, nec accumsan augue. Quisque ornare sollicitudin nisl. Vivamus mi orci, pellentesque porttitor sem non, sodales dictum risus. Praesent magna orci, ultrices in nisl quis, euismod dictum mauris. Curabitur cursus laoreet felis sed ullamcorper. Proin faucibus id velit a consequat. Nulla facilisi. Sed fringilla elit nec tortor imperdiet viverra. Curabitur quis neque nec eros feugiat fringilla. Nam a est a mauris mattis cursus sed vitae dolor. Nam non justo blandit, mattis sem eget, pellentesque nibh. Proin quis luctus dolor." 
  
function TextOne() 
    dxDrawText(text1, 269, 171, 100, 100, tocolor(0, 0, 0, 127), 1, "sans", "left", "top", false, false, true) 
end 
addEvent("onClientPlayerSpawn", true) 
addEventHandler("onClientRender", root, TextOne) 

Obs:In this example the text this with broken lines, because the forum post system does this automatically.

Sorry my bad english.

Link to comment
You could also do something like this:
local text = "Another \ 
New \ 
Line!" 

That's inefficient. You should use [[ ]] instead.

Yes, you can also do this:

local text1 = [[Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Maecenas nec aliquam mi, nec accumsan augue. 
Quisque ornare sollicitudin nisl. Vivamus mi orci, pellentesque porttitor sem non, sodales dictum risus. 
Praesent magna orci, ultrices in nisl quis, euismod dictum mauris. 
Curabitur cursus laoreet felis sed ullamcorper. 
Proin faucibus id velit a consequat. Nulla facilisi. 
Sed fringilla elit nec tortor imperdiet viverra. 
Curabitur quis neque nec eros feugiat fringilla. 
Nam a est a mauris mattis cursus sed vitae dolor. 
Nam non justo blandit, mattis sem eget, pellentesque nibh. Proin quis luctus dolor.]] 

Link to comment
You could also do something like this:
local text = "Another \ 
New \ 
Line!" 

That's inefficient. You should use [[ ]] instead.

Yes, you can also do this:

local text1 = [[Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Maecenas nec aliquam mi, nec accumsan augue. 
Quisque ornare sollicitudin nisl. Vivamus mi orci, pellentesque porttitor sem non, sodales dictum risus. 
Praesent magna orci, ultrices in nisl quis, euismod dictum mauris. 
Curabitur cursus laoreet felis sed ullamcorper. 
Proin faucibus id velit a consequat. Nulla facilisi. 
Sed fringilla elit nec tortor imperdiet viverra. 
Curabitur quis neque nec eros feugiat fringilla. 
Nam a est a mauris mattis cursus sed vitae dolor. 
Nam non justo blandit, mattis sem eget, pellentesque nibh. Proin quis luctus dolor.]] 

Thank you all. Is working with this: [[Text]].

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...