09.07.2010, 21:36
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~
then set this as string for one textdraw, it shows all lines in an order.
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]);
}