Creating new line on textdraw
#4

I think i got you

You would have to have a variable, that counts the currently shown lines, each time a line is added, it increases by one (linecount)

then pack the textdraw strings into an 2d array, size should be the max number of lines.

new tdraw[5][128 (Max string length]

If a new line is added, you move the old ones on step down in the array and delete the last one like this:

tdraw[4] = tdraw[3]; //The last string is gonna fall out
tdraw[3] = tdraw[2];
...
linecount -= 1;

format all those in one string, divide the strings with ~n~

pawn Код:
new string[512];
for(new i = 0; i < linecount; i ++) {
    format(string,512, "%s~n~%s, string, tdraw[i]);
}
then set this as string for one textdraw, it shows all lines in an order.
Reply


Messages In This Thread
Creating new line on textdraw - by [L3th4l] - 09.07.2010, 21:25
Re: Creating new line on textdraw - by Kar - 09.07.2010, 21:28
Re: Creating new line on textdraw - by [L3th4l] - 09.07.2010, 21:32
Re: Creating new line on textdraw - by Mauzen - 09.07.2010, 21:36
Re: Creating new line on textdraw - by [L3th4l] - 09.07.2010, 22:14
Re: Creating new line on textdraw - by [L3th4l] - 10.07.2010, 15:44
Re: Creating new line on textdraw - by [HUN]Jaki - 11.07.2010, 19:52
Re: Creating new line on textdraw - by hab2ever - 11.07.2010, 19:58

Forum Jump:


Users browsing this thread: 3 Guest(s)