CLEO Help Get other Player's health & Armor

CLEO related
Status
Not open for further replies.

Husnain

Well-known member
Joined
May 20, 2016
Messages
228
Reaction score
9
Location
Mars
Code:
{$CLEO .cs}
0000:

:SAMP
wait 0
if
  0AD2: 1@ = player $PLAYER_CHAR targeted_actor //IF and SET
jf @SAMP
2@ = Actor.Health(1@)
04DD: 3@ = actor 1@ armour
0AD1: "Health: %d~n~Armour: %d" 100 2@ 3@
jump @SAMP

This is not working, I mean I cannot take other player's health & armor. Any other method you guys know?
 

Krc

Active member
Joined
Mar 30, 2018
Messages
193
Reaction score
25
Location
Lithuania
Code:
{$CLEO .cs}
0000: NOP
REPEAT
Wait 0
Until 0AFA: is_samp_structures_available

While True
Wait 0
If
0AD2: 1@ = player $PLAYER_CHAR targeted_actor
Then
0B2B: samp 2@ = get_player_id_by_actor_handle 1@
0B25: samp 3@ = get_player_health 2@
0B26: samp 4@ = get_player_armor 2@
chatmsg "HP: %d | Armour: %d" -1 3@ 4@
wait 1000
end
END
 
Status
Not open for further replies.
Top