CLEO HELP Help with draw text in screen

Joined
May 2, 2016
Messages
16
Likes
1
Points
33
#1
When editing this cleo my purpose is to obtain the distance between me and the players with a specific color (like blue). I have put a text (the ID) to the player's position out of stream to know in which direction it is located. But activating the cleo shows the text duplicated (1 text to the north and 1 to the south) and I don't know which direction it is located.

Image examples attached

I already used "02CB: actor [email protected] bounding_sphere_visible" but if the actor is out of stream the cleo does not work as it should (it slows me down as slow motion).

Anyone who can help me show the text only in the real direction in which the player is?

Code:
0B20: samp [email protected] = actor_handle_by_samp_player_id [email protected]
if
056D:   actor [email protected] defined
then
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.0
    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    0B2B: samp [email protected] = get_player_id_by_actor_handle [email protected]
    0B36: samp [email protected] = get_player_nickname [email protected]   
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)%s [%0.1f]m" [email protected] [email protected] [email protected]
    0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    0AC9: [email protected]
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)" [email protected]
    0AC9: [email protected]
    if 02CB:   actor [email protected] bounding_sphere_visible //THIS WORK FOR STREAMED PLAYERS
    then
        0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    end
else
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    0B2F: samp get_streamed_out_player_pos [email protected] to [email protected] [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
    0B36: samp [email protected] = get_player_nickname [email protected]   
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)%s [%0.1f]m" [email protected] [email protected] [email protected]
    0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    0AC9: [email protected]
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)" [email protected]
    0AC9: [email protected]
    if
    02CB:   actor [email protected] bounding_sphere_visible //IDK HOW TO FIX THIS
    then
        0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    end
end
 

Attachments

_Safa

Well-Known Member
Joined
Sep 22, 2019
Messages
58
Likes
22
Points
8
Location
UGBASE
5
#4
Bounding sphere visible can't work with unstreamed because there is no PED / Actor if player is unstreamed (I think atleast).
 

SobFoX

Well-Known Member
Joined
Jul 14, 2015
Messages
321
Likes
109
Points
93
Location
Israel
Website
www.youtube.com
15
#5
I can only tell you
You check the pos text on the screen
And see if he is the one who gives or less
if (posonscreen.z < 1.f)
continue;
And then make it overlooked
 
OP
OP
D
Joined
May 2, 2016
Messages
16
Likes
1
Points
33
#6
@SobFoX

I tried that rule, but, another problem is that, for example, it shows two texts, one to the north and one in the south, if I apply the rule it eliminates all of the south and the real positions of the players in the south will be eliminated and It will show me a fake pocision in the north. I hope I explained myself well

thank you anyway
 

JaggerJam

Active Member
Joined
Sep 14, 2017
Messages
38
Likes
9
Points
23
#7
When editing this cleo my purpose is to obtain the distance between me and the players with a specific color (like blue). I have put a text (the ID) to the player's position out of stream to know in which direction it is located. But activating the cleo shows the text duplicated (1 text to the north and 1 to the south) and I don't know which direction it is located.

Image examples attached

I already used "02CB: actor [email protected] bounding_sphere_visible" but if the actor is out of stream the cleo does not work as it should (it slows me down as slow motion).

Anyone who can help me show the text only in the real direction in which the player is?

Code:
0B20: samp [email protected] = actor_handle_by_samp_player_id [email protected]
if
056D:   actor [email protected] defined
then
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.0
    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    0B2B: samp [email protected] = get_player_id_by_actor_handle [email protected]
    0B36: samp [email protected] = get_player_nickname [email protected]  
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)%s [%0.1f]m" [email protected] [email protected] [email protected]
    0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    0AC9: [email protected]
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)" [email protected]
    0AC9: [email protected]
    if 02CB:   actor [email protected] bounding_sphere_visible //THIS WORK FOR STREAMED PLAYERS
    then
        0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    end
else
    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    0B2F: samp get_streamed_out_player_pos [email protected] to [email protected] [email protected] [email protected]
    0B55: convert_3D_coords [email protected] [email protected] [email protected] to_screen [email protected] [email protected]
    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
    0B36: samp [email protected] = get_player_nickname [email protected]  
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)%s [%0.1f]m" [email protected] [email protected] [email protected]
    0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    0AC9: [email protected]
    0AC8: [email protected] = 256
    0AD3: [email protected] = "(%d)" [email protected]
    0AC9: [email protected]
    if
    02CB:   actor [email protected] bounding_sphere_visible //IDK HOW TO FIX THIS
    then
        0B6F: render font [email protected] draw_text [email protected] pos [email protected] [email protected] color 0xFF00CCFF
    end
end

How did you achieve that list on side of screen? Can you show the code?
 

Attachments

Last edited:
Top