CLEO Help Help, i search 3DTextLabel finder!

CLEO related
Status
Not open for further replies.

sza23

Active member
Joined
Apr 5, 2013
Messages
44
Reaction score
2
There is such cleo? Find 3DTextLabel, example: Are one ini file: Text: asd123, and cleo will be search in game 3dtextlabel.

Thanks answers and sorry my bad english!  :) :shy:

:ugbase: :ugbase: :ugbase: :ugbase: :ugbase: :ugbase: :ugbase:
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
with SF it should be rather easy

[shcode=cpp]
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@

//compare your text with 1@ (strstr, strcmp etc.)
end
end
[/shcode]
 

sza23

Active member
Joined
Apr 5, 2013
Messages
44
Reaction score
2
Hy! Thanks verry much answers!



Code:
springfield:

with SF it should be rather easy


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@
        
       //compare your text with 1@ (strstr, strcmp etc.)
   end
end


please help me, I do not understand this code, and do not know supplement, sorry my bad english (translate) Thank you very much! :) :)


Example: [img=248x55]http://kephost.com/images/2017/04/25/asdasd20569.png[/img]


And cleo will be search in map my text:
[img=837x526]http://kephost.com/images/2017/04/25/ddds.png[/img]

Please help me @supahdupahnubah
or
@springfield
Thanks!  :) :shy: :shy:  :ugbase: :ugbase: :ugbase: :ugbase:
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Use something like this, use command /find3dtext <part of text> to find all 3d labels that contain that text around you, and use /tele3dtext <label id> to teleport to it.

[shcode=cpp]
{$CLEO}
0000:

repeat
wait 100
until 0afa:

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

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:

:teleport
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]

The rest is up to you.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
if your not understanding his code, he did was loop through the maximum limit of 3D Text labels and check if they are valid (defined) or created or whatever u say, and if they are get their ID and send it back to you, else if it isn't valid then process the other ID's.
 

sza23

Active member
Joined
Apr 5, 2013
Messages
44
Reaction score
2
please help me I do not understand this code :-/  thanks :)   :ugbase: :ugbase: :ugbase: :ugbase: :ugbase:

Code:
{$CLEO}
0000:
 
repeat
    wait 100
until 0afa:
 
0b34: "find3dtext" @labels
0b34: "tele3dtext" @teleport
 
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:
 
:teleport
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