CLEO Help Something wrong.

CLEO related
Status
Not open for further replies.

not490

Well-known member
Joined
Feb 8, 2014
Messages
438
Reaction score
4
Code:
{$CLEO}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available


   0B34: samp register_client_command "df" to_label @activate
   

:START
wait 0
if
31@ == 1
    then
     for 29@ = 0 to 1000    
                if and
                Player.Defined($PLAYER_ACTOR)
                SAMP.IsPlayerConnected(29@)
                then
                    if
                    0@ = SAMP.GetActorHandleByPlayerID(29@)
                    then                
                        if and
                        051A:   actor $PLAYER_ACTOR damaged_by_actor 0@
                        actor.Dead($PLAYER_ACTOR)
                        then
                        0467: clear_actor 0@ last_weapon_damage
                        054E: clear_actor $PLAYER_ACTOR damage
                        0AB1: call_scm_func @GetInformation 2 of player handle 0@ $PLAYER_ACTOR 7@ Health 8@ Armour 9@ ping 10@ nickname 11@ playercolor 12@ weapon 13@ DistanceXYZ 14@
                        0AF8: samp add_message_to_chat "{FF0000}You have been killed by {BFBFBF}%s(%d) {FF0000}with weapon ID : %d from a distance of %f meters" color 12@ 11@ 7@ 13@ 14@
                        0AF8: samp add_message_to_chat "%s(%d)'s ping (%d), Health (%d), Armour (%d)" 12@ 11@ 7@ 10@ 8@ 9@
           
    end
        end
            end
                end
                    end
                jump @START  
                    


:activate
0B12: 31@ = 31@ XOR 1
If 31@ == 1
then
0AF8: samp add_message_to_chat "{FF0000}Death info is now {BFBFBF}enabled!" -1
else
0AF8: samp add_message_to_chat "{FF0000}Death info is now disabled!" -1
end
samp.CmdRet


:GetInformation
Actor.StorePos(0@, 1@, 2@, 3@)
Actor.StoreDeadActorPos($PLAYER_ACTOR, 4@, 5@, 6@)
0B2B: samp 7@ = get_player_id_by_actor_handle 0@
0B25: samp 8@ = get_player_health 7@
0B26: samp 9@ = get_player_armor 7@
0B2A: samp 10@ = get_player_ping 7@
0B36: samp 11@ = get_player_nickname 7@
0B37: samp 12@ = get_player_color 1@
0470: 13@  = actor 0@ current_weapon
050A: 14@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@
0AB2: ret 8 7@ 8@ 9@ 10@ 11@ 12@ 13@ 14@ 15@

What might be wrong?
Code:
0AF8: samp add_message_to_chat "{FF0000}You have been killed by {BFBFBF}%s(%d) {FF0000}with weapon ID : %d from a distance of %f meters" color 12@ 11@ 7@ 13@ 14@
It shows me this in the chat, but all the places where should be Weapon ID or Distance. Its just blanc, there is nothing. Seems like it doesn't get the data from server.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Works fine for me..

Code:
0B37: samp 12@ = get_player_color 1@

Here you should use 7@, which is the ID.

Result:
[13:51:23] {FF0000}You have been killed by {BFBFBF}George(41) {FF0000}with weapon ID : 31 from a distance of 2.898845 meters
[13:51:23] George(41)'s ping (61), Health (100), Armour (0)
 
Status
Not open for further replies.
Top