- 23
- 3
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.
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?
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?
CLEO:
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
Последнее редактирование: