CLEO Help [HELP]untitled

CLEO related
Status
Not open for further replies.

GoodMan

Active member
Joined
Jun 4, 2014
Messages
141
Reaction score
0
Been trying this for days and i can't make it work properly,.

its supposed to draw defined players and their anim id name and file but there seems to be lack of memory maybe?

Here is the code 

PHP:
{$CLEO .cs}

0000: NOP

repeat
wait 500
until 0AFA:  is_samp_available

10@ = Render.CreateFont("Tahoma", 7, 5)

while true
wait 0
FOR 1@ = 0 to 999

if
0B23:  samp is_player_connected 1@
then
6@ = 5
7@ = 230
   0B20: samp 31@ = actor_handle_by_samp_player_id 1@
   if
   056D:   actor 31@ defined
   then
   0B2B: samp 2@ = get_player_id_by_actor_handle 31@
           3@ = SAMP.GetPlayerNickname(2@)
           4@ = SAMP.PlayerAnimationID(2@)
           5@ = SAMP.GetPlayerColor(2@)
           alloc 3@ 32
           alloc 4@ 32
           alloc 27@ 64
           7@ += 14
           0AD3: 27@ = format "%d %s %s" 2@ 3@ 4@
           0B6F: render font 10@ draw_text 27@ pos 6@ 7@ color 5@
           free 3@
           free 4@
           free 27@
       end
   end
end
end
idk maybe i need to hack memory or something? i tried doing it for playeractor and works perfect but when i do that for samp players i can't. :foreveralone: :surprised: :penis:
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
0B20: samp 31@ = actor_handle_by_samp_player_id 1@

0B2B: samp 2@ = get_player_id_by_actor_handle 31@

absolute madman


3@ = SAMP.GetPlayerNickname(2@)
alloc 3@ 32

it wont work until you allocate the memory (afaik)


4@ = SAMP.PlayerAnimationID(2@)

returns an integer tho
 

GoodMan

Active member
Joined
Jun 4, 2014
Messages
141
Reaction score
0
Code:
if
                        0B20: samp 31@ = actor_handle_by_samp_player_id 30@
                        then
                        0B2B: samp 2@ = get_player_id_by_actor_handle 31@
                        
                        0B36: samp 3@ = get_player_nickname 2@
                        0B37: samp 4@ = get_player_color 2@
                        
                        0B57: samp 21@ = player 2@ animation_id
                        0B58: samp get_animation_name_to 22@ file_to 23@ by_id 21@
                        0AC8: 21@ = 32
                        0AC8: 22@ = 32
                        0AC8: 23@ = 32
                        0AC8: 20@ = 256
                        0AD3: 20@ = "(%d)%s {CCFF00} %d %s %s" 2@ 3@ 21@ 22@ 23@
                        0B6F: render font 0@ draw_text 20@ pos 15@ 1@ color 4@
                        0AC9: 21@
                        0AC9: 22@
                        0AC9: 23@
                        0AC9: 20@
                        end
Here another example, yet doesn't work, im mostly giving up
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
GoodMan said:
Here another example, yet doesn't work, im mostly giving up

{$CLEO}

0000:

repeat
wait 0
until 0AFA:  is_samp_available

alloc 14@ 100

10@ = Render.CreateFont("Tahoma", 7, 5)

while true
wait 0

for 1@ = 0 to 1000
if
0B23:  samp is_player_connected 1@
then
  if 0B20: samp 31@ = actor_handle_by_samp_player_id 1@
    then
    00A0: store_actor 31@ position_to 29@ 28@ 27@
    if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
        then
        Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
        0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
        0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@  
        0B2B: samp 2@ = get_player_id_by_actor_handle 31@
        3@ = SAMP.GetPlayerNickname(1@)
        4@ = SAMP.PlayerAnimationID(1@)
        5@ = SAMP.GetPlayerColor(1@)
        format 14@ "{%X}%s [%d] Anim %d" 5@ 3@ 2@ 4@
        0B6F: render font 10@ draw_text 14@ pos 23@ 22@ color 5@
       end
   end
end
end
end
 

GoodMan

Active member
Joined
Jun 4, 2014
Messages
141
Reaction score
0
_=Gigant=_ said:
GoodMan said:
Here another example, yet doesn't work, im mostly giving up

{$CLEO}

0000:

repeat
wait 0
until 0AFA:  is_samp_available

alloc 14@ 100

10@ = Render.CreateFont("Tahoma", 7, 5)

while true
wait 0

for 1@ = 0 to 1000
if
0B23:  samp is_player_connected 1@
then
  if 0B20: samp 31@ = actor_handle_by_samp_player_id 1@
    then
    00A0: store_actor 31@ position_to 29@ 28@ 27@
    if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
        then
        Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
        0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
        0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@  
        0B2B: samp 2@ = get_player_id_by_actor_handle 31@
        3@ = SAMP.GetPlayerNickname(1@)
        4@ = SAMP.PlayerAnimationID(1@)
        5@ = SAMP.GetPlayerColor(1@)
        format 14@ "{%X}%s [%d] Anim %d" 5@ 3@ 2@ 4@
        0B6F: render font 10@ draw_text 14@ pos 23@ 22@ color 5@
       end
   end
end
end
end

That's cool, did you test it?
 
Status
Not open for further replies.
Top