CLEO related
Status
Not open for further replies.

(_)_)===D

Member
Joined
May 2, 2016
Messages
17
Reaction score
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 1@ 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 31@ = actor_handle_by_samp_player_id 30@
if
056D:   actor 31@ defined
then
    04C4: store_coords_to 9@ 10@ 11@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    04C4: store_coords_to 12@ 13@ 14@ from_actor 31@ with_offset 0.0 0.0 0.0
    050A: 17@ = distance_between_XYZ 9@ 10@ 11@ and_XYZ 12@ 13@ 14@
    0B55: convert_3D_coords 9@ 10@ 11@ to_screen 5@ 6@
    0B55: convert_3D_coords 12@ 13@ 14@ to_screen 7@ 8@
    0B2B: samp 2@ = get_player_id_by_actor_handle 31@
    0B36: samp 3@ = get_player_nickname 2@   
    0AC8: 20@ = 256
    0AD3: 20@ = "(%d)%s [%0.1f]m" 2@ 3@ 17@
    0B6F: render font 0@ draw_text 20@ pos 15@ 1@ color 0xFF00CCFF
    0AC9: 20@
    0AC8: 23@ = 256
    0AD3: 23@ = "(%d)" 2@
    0AC9: 23@
    if 02CB:   actor 31@ bounding_sphere_visible //THIS WORK FOR STREAMED PLAYERS
    then
        0B6F: render font 24@ draw_text 23@ pos 7@ 8@ color 0xFF00CCFF
    end
else
    04C4: store_coords_to 9@ 10@ 11@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    0B2F: samp get_streamed_out_player_pos 30@ to 12@ 13@ 14@
    0B55: convert_3D_coords 12@ 13@ 14@ to_screen 7@ 8@
    050A: 17@ = distance_between_XYZ 9@ 10@ 11@ and_XYZ 12@ 13@ 14@
    0B36: samp 3@ = get_player_nickname 30@   
    0AC8: 20@ = 256
    0AD3: 20@ = "(%d)%s [%0.1f]m" 30@ 3@ 17@
    0B6F: render font 0@ draw_text 20@ pos 15@ 1@ color 0xFF00CCFF
    0AC9: 20@
    0AC8: 23@ = 256
    0AD3: 23@ = "(%d)" 30@
    0AC9: 23@
    if
    02CB:   actor 31@ bounding_sphere_visible //IDK HOW TO FIX THIS
    then
        0B6F: render font 24@ draw_text 23@ pos 7@ 8@ color 0xFF00CCFF
    end
end
 

Attachments

  • screenshot_01-12-2019_20-31-04-134.png
    screenshot_01-12-2019_20-31-04-134.png
    340.4 KB · Views: 74
  • screenshot_01-12-2019_20-31-09-573.png
    screenshot_01-12-2019_20-31-09-573.png
    399.8 KB · Views: 74

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
294
Reaction score
99
Location
UGBASE
Bounding sphere visible can't work with unstreamed because there is no PED / Actor if player is unstreamed (I think atleast).
 

(_)_)===D

Member
Joined
May 2, 2016
Messages
17
Reaction score
1
@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
97
Reaction score
21
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 1@ 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 31@ = actor_handle_by_samp_player_id 30@
if
056D:   actor 31@ defined
then
    04C4: store_coords_to 9@ 10@ 11@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    04C4: store_coords_to 12@ 13@ 14@ from_actor 31@ with_offset 0.0 0.0 0.0
    050A: 17@ = distance_between_XYZ 9@ 10@ 11@ and_XYZ 12@ 13@ 14@
    0B55: convert_3D_coords 9@ 10@ 11@ to_screen 5@ 6@
    0B55: convert_3D_coords 12@ 13@ 14@ to_screen 7@ 8@
    0B2B: samp 2@ = get_player_id_by_actor_handle 31@
    0B36: samp 3@ = get_player_nickname 2@  
    0AC8: 20@ = 256
    0AD3: 20@ = "(%d)%s [%0.1f]m" 2@ 3@ 17@
    0B6F: render font 0@ draw_text 20@ pos 15@ 1@ color 0xFF00CCFF
    0AC9: 20@
    0AC8: 23@ = 256
    0AD3: 23@ = "(%d)" 2@
    0AC9: 23@
    if 02CB:   actor 31@ bounding_sphere_visible //THIS WORK FOR STREAMED PLAYERS
    then
        0B6F: render font 24@ draw_text 23@ pos 7@ 8@ color 0xFF00CCFF
    end
else
    04C4: store_coords_to 9@ 10@ 11@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
    0B2F: samp get_streamed_out_player_pos 30@ to 12@ 13@ 14@
    0B55: convert_3D_coords 12@ 13@ 14@ to_screen 7@ 8@
    050A: 17@ = distance_between_XYZ 9@ 10@ 11@ and_XYZ 12@ 13@ 14@
    0B36: samp 3@ = get_player_nickname 30@  
    0AC8: 20@ = 256
    0AD3: 20@ = "(%d)%s [%0.1f]m" 30@ 3@ 17@
    0B6F: render font 0@ draw_text 20@ pos 15@ 1@ color 0xFF00CCFF
    0AC9: 20@
    0AC8: 23@ = 256
    0AD3: 23@ = "(%d)" 30@
    0AC9: 23@
    if
    02CB:   actor 31@ bounding_sphere_visible //IDK HOW TO FIX THIS
    then
        0B6F: render font 24@ draw_text 23@ pos 7@ 8@ color 0xFF00CCFF
    end
end


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

Attachments

  • 1575388991642.png
    1575388991642.png
    351.1 KB · Views: 29
Last edited:
Status
Not open for further replies.
Top