CLEO Help TextDraw / 3DTextLabel finder?

CLEO related
Status
Not open for further replies.

mariska

Member
Joined
Nov 12, 2018
Messages
5
Reaction score
2
Hi!

I am playing in an RP server where you can find "keys" across the city. The key one time was a slice of bread so it was easy to find, because I used an object finder cleo, but they changed it to a dash (-).

If there is any solution for this can you help me? It would be better if the command would be a keyboard combination and NOT a text command like /textfinder.

Here is an image how does the "key" looks like: (the little white dash)

(ps.: i'm bad at programming, i can't write my own .cs file) Thanks for the help!
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
TextDraw and 3D Text ID Finder by @springfield


Text Draw Finder
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@ 0@
      end
      free 2@
  end
end
0B43:

3D Text Finder
Code:
{$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:
 
Status
Not open for further replies.
Top