[Ayuda] Como obtener Esto...
#1

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.
Reply
#2

puedes hockear la funciуn TextDrawCreate y guardar la pos X e Y en variables.

EDIT: algo asн.

pawn Код:
#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));
}
Reply
#3

Gracias, Intentare con eso y con otro ke me dieron en la zona inglesa, Gracias
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)