CLEO Help hit info

CLEO related

habinabi

Active member
Joined
Nov 10, 2019
Messages
51
Reaction score
2
Location
Czech Republic
Hi, I'm working on reworking this script, so if he shoots you, he'll write in the chat how much he took from you. But I can't, here's the code, someone look at it.

https://ugbase.eu/threads/release-deathinfo-with-extra-informations.11297/#post-68930

PHP:
{$CLEO}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available
0006: 31@ = 1


wait 0
if
31@ == 1
    then
     for 29@ = 0 to 1000  
                if
                SAMP.IsPlayerConnected(29@)
                then
                    if
                    0@ = SAMP.GetActorHandleByPlayerID(29@)
                    then
                    0226: 2@ = actor $PLAYER_ACTOR health
                    04DD: 1@ = actor $PLAYER_ACTOR armour
                    005A: 1@ += 2@ // (int)              
                        if 
                        051A:   actor $PLAYER_ACTOR damaged_by_actor 0@
                        then
                        0467: clear_actor 0@ last_weapon_damage
                        054E: clear_actor $PLAYER_ACTOR damage
                        0B2B: samp 7@ = get_player_id_by_actor_handle 0@
                        0B36: samp 11@ = get_player_nickname 7@
                        0226: 3@ = actor $PLAYER_ACTOR health
                        04DD: 4@ = actor $PLAYER_ACTOR armour
                        005A: 4@ += 3@ // (int)
                        0062: 1@ -= 4@  // (int)
                        0AF8: samp add_message_to_chat "Player %s has taken from you %dHP" 11@ 1@          
                        end
                    end
                end
    end //end for
end
 
Last edited:

habinabi

Active member
Joined
Nov 10, 2019
Messages
51
Reaction score
2
Location
Czech Republic
Problem

if and
051A: actor $PLAYER_ACTOR damaged_by_actor 0@)
then
Yeah sorry, I forgot to delete it, but that's not the problem. I have sampfuncs, 0.3.7 - R1 and cleo 4.1 and it doesn't work, it doesn't write a message in the chat after someone shot me as much as I took.

modified the code here so that there are no such errors that you wrote about
 
Top