CLEO Help Textdraw Position

CLEO related
Status
Not open for further replies.

Ammoseeker

Member
Joined
Mar 21, 2014
Messages
14
Reaction score
1
Hi,
Is there any way to get textdraw position via textdraw id? (if is it possible, without samp funcs and for 0.3DL)
Thanks in advance.
 
Last edited:

Ammoseeker

Member
Joined
Mar 21, 2014
Messages
14
Reaction score
1
I can get this LD_BEAT.txd (cring) yellow circle and arrows textdraw id. When this textdraw is activate, arrows are moving to left side. If arrow inside the circle, press arrow key. I can do this with timer but that's not working correctly. If is there any way to get circle pos and arrow pos equals to both, i press the key.
 

Attachments

  • 1620929664905.png
    1620929664905.png
    52.7 KB · Views: 34

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
Maybe someone else know something about that...????
Please refrain from double posting, also if you know how to get the text & if it exists you probably already read the textdraw pool, just extend it with the position offset? You could dump your way of getting text and I could look into adopting it.
You can simply read it from the textdraw pool.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
I can get this LD_BEAT.txd (cring) yellow circle and arrows textdraw id. When this textdraw is activate, arrows are moving to left side. If arrow inside the circle, press arrow key. I can do this with timer but that's not working correctly. If is there any way to get circle pos and arrow pos equals to both, i press the key.

Okay with 0x help we got this...
PHP:
:GetTextDrawPosition
{
    0.3.DL
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@ 2@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 3@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 4@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0AB2: 2 3@ 4@
ELSE 059A:  return_false
END
0AB2: 0
 
Last edited:

Ammoseeker

Member
Joined
Mar 21, 2014
Messages
14
Reaction score
1
I get textdraws on a rp server with my program via ur snippet codes.
Like this;
(pic1)
In this pic, right side Textdraw Name and ID

But my problem still persists. Sometimes some textdraw pos get x: 0 - y: 0.
Positions seems like this;
(pic2)
 

Attachments

  • 1621092848023.png
    1621092848023.png
    11.7 KB · Views: 41
  • 1621093146177.png
    1621093146177.png
    2.3 KB · Views: 38

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
I get textdraws on a rp server with my program via ur snippet codes.
Like this;
(pic1)
In this pic, right side Textdraw Name and ID

But my problem still persists. Sometimes some textdraw pos get x: 0 - y: 0.
Positions seems like this;
(pic2)
It hard to say what exactly happened here, but you should first check if entered textdraw id was right(TextDraw Exist).
I check that latter..

Send me server ip and short but clearly explains how to get textdraws..
 
Status
Not open for further replies.
Top