CLEO Help Cleo click on a textdraw

CLEO related
Status
Not open for further replies.

Majestique-

Member
Joined
May 16, 2016
Messages
5
Reaction score
0
Hi! I need a cleo that spam click on a clickable textdraw. Idk if i have to get the id and how to do it.
 

cheetahftw1

Active member
Joined
Aug 31, 2018
Messages
39
Reaction score
0
TextDraw and 3D Text ID Finder by @springfield


Text Draw Finder
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

0B34: "txd" @textdraw

WHILE TRUE
WAIT 0
END


:textdraw
0B35: 0@
for 1@ = 0 to 2304
if 0C5D: samp textdraw 1@ is_exists
then
alloc 2@ = 1024
0C5A: samp textdraw 1@ get_string_to 2@
if 0C29: 3@ = stristr string1 2@ string2 0@
then 0AF8: "textdraw with id %d contains %s text" -1 1@ 0@
end
free 2@
end
end
0B43:

[/shcode]

3D Text Finder
[shcode=cpp]
{$CLEO}
0000:

REPEAT
WAIT 100
UNTIL 0AFA:

0b34: "find3dtext" @labels
0b34: "tele3dtext" @tp

WHILE TRUE
WAIT 0
END

:labels
0b35: 11@
00A0: store_actor $PLAYER_ACTOR position_to 14@ 15@ 16@
for 0@ = 0 to 2048
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 2@ position 3@ 4@ 5@ view_distance 6@ show_behind_walls 7@ attached_to_player 8@ attached_to_vehicle 9@
if 0C29: 10@ = stristr string1 1@ string2 11@
then
0509: 17@ = distance_between_XY 14@ 15@ 3@ 4@
0af8: "LABEL: ID (%d); DIST: (%0.2f); TEXT: %s" -1 0@ 17@ 1@
end
end
end
0b43:

:tp
0b35: 0@
0C1A: 0@ = atoi 0@
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 2@ position 3@ 4@ 5@ view_distance 6@ show_behind_walls 7@ attached_to_player 8@ attached_to_vehicle 9@
00A1: put_actor $PLAYER_ACTOR at 3@ 4@ 5@
end
0b43:
[/shcode]
 

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
And can u tell me please how can i get the id of the textdraw? I'm new in cleo scripts.. thanks
Code:
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0B34: "txd" @textdraw

WHILE TRUE
   WAIT 0
END


:textdraw
0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "textdraw with id %d contains %s text" -1 1@ 2@
      end
      free 2@
  end
end
0B43:
/txd
 
Status
Not open for further replies.
Top