25.09.2012, 19:47
Buenas a Todos, Queria Saber como puedo obtener la posicion X y Y de un Textdraw y mostralo en un printf o en un otro mismo textdraw?.
Desde ya Muchas Gracias.
Desde ya Muchas Gracias.
#define GetTextDrawPosX(%1) TextDrawPos[int:%1][0]
#define GetTextDrawPosY(%1) TextDrawPos[int:%1][1]
new Float:TextDrawPos[MAX_TEXT_DRAWS][2];
//Antes de cualquier TextDrawCreate
stock Text:Hook_TextDrawCreate(Float:x, Float:y, text[]) {
new ID = int:TextDrawCreate(x,y,text);
TextDrawPos[ID][0] = x;
TextDrawPos[ID][1] = y;
return Text:ID;
}
#define TextDrawCreate Hook_TextDrawCreate
public OnFilterScriptInit() {
new Text:ID = TextDrawCreate(500.00,410,"Texto");
printf("TextDrawID: %d PosX: %f PosY: %f",int:ID,GetTextDrawPosX(ID),GetTextDrawPosY(ID));
}