08.08.2011, 09:23
[QUOTE='[GF]Sasino97;1334647']You must first create another function to create it, that simultaniously saves his pos in an array. And then GetTextDrawPos
only problem with this, that you should save all datas of the TD. Text size, font, color, box, alignment, etc... And you should save which players can see the textdraws.
pawn Код:
enum tData
{
Float:tX,
Float:tY,
tText[256]
}
new TD[MAX_TEXT_DRAWS][tData];
static TID = 0;
stock CreateTextDraw(Float:X, Float:Y, const Text[])
{
TID ++;
TextDrawCreate(X, Y, Text);
TD[TID][tX] = X;
TD[TID][tY] = Y;
TD[TID][tText] = Text;
return TID;
}
stock GetTextDrawPosition(textid, &Float:X, &Float:Y)
{
X = TD[textid][tX];
Y = TD[textid][tY];
}
stock SetTextDrawPosition(textid, Float:X, Float:Y)
{
TextDrawDestroy(textid);
TextDrawCreate(X, Y, TD[textid][tText]);
}