[Ayuda] Como obtener Esto... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Como obtener Esto... (
/showthread.php?tid=380514)
[Ayuda] Como obtener Esto... -
OTACON - 25.09.2012
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.
Re: [Ayuda] Como obtener Esto... -
Daniel-92 - 25.09.2012
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));
}
Respuesta: [Ayuda] Como obtener Esto... -
OTACON - 26.09.2012
Gracias, Intentare con eso
![Smiley](images/smilies/smile.png)
y con otro ke me dieron en la zona inglesa, Gracias