off Posted March 5, 2014 Share Posted March 5, 2014 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
xXMADEXx Posted March 5, 2014 Share Posted March 5, 2014 You could also do something like this: local text = "Another \ New \ Line!" Link to comment
myonlake Posted March 5, 2014 Share Posted March 5, 2014 You could also do something like this: local text = "Another \ New \ Line!" That's inefficient. You should use [[ ]] instead. Link to comment
Hell-Mate Posted March 5, 2014 Share Posted March 5, 2014 You could also do something like this: local text = "Another \ New \ Line!" That's inefficient. You should use [[ ]] instead. He can use /n for every new line instead of these. Link to comment
DNL291 Posted March 5, 2014 Share Posted March 5, 2014 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
WhoAmI Posted March 5, 2014 Share Posted March 5, 2014 Isn't it better to set wordbreak to true? dxDrawText(text1, 269, 171, 100, 100, tocolor(0, 0, 0, 127), 1, "sans", "left", "top", false, true, true) Link to comment
off Posted March 5, 2014 Author Share Posted March 5, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now