04.08.2011, 21:25
How To Make It Like That If Player Is Seeing 1 Textdraw The Other Goes Automatically Down Of It Not On Top Of It ~n~?
new Text: TextDraw[3];
//OnGameModeInit
for(new i, Float: offset = 0.0; i != sizeof TextDraw; ++i, offset += 10.0) {
TextDraw[i] = TextDrawCreate(30.0, 50.0 + offset, "_");
}
stock TextDrawSetData(string[]) {
enum E_TextdrawData {
tText[256] //only 256 because over that you cant use ~r~, ...
}
static TextDrawData[sizeof TextDraw][E_TextdrawData];
if(string[0] != EOS) {
new i = sizeof TextDraw;
while(--i != 0) {
TextDrawData[i][tText] = TextDrawData[i - 1][tText];
TextDrawSetString(TextDraw[i], TextDrawData[i][tText]);
}
TextDrawData[0][tText][0] = EOS;
TextDrawSetString(TextDraw[0], string);
strcat(TextDrawData[0][tText], string, 256);
}
}
you could destroy and recreate a little more down
but thats mostly not needed just create the textdraws at different positions and set the data to the correct one, move the data to the next lower one if the first is needed Here a little example First we create our textdraws pawn Код:
pawn Код:
|