CLEO Help Know the hidden Deathmatcher

CLEO related
Status
Not open for further replies.

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
I'm working on a CLEO that prompts who ever gives damage to me, I have a problem. How can I get the actor's ID ? What I need to do is that it will message me, who ever gives me damage and the weapon used.


Code:
{$CLEO .cs}

thread 'Wittzi'

:LOAD
    wait 0
    if
      8AF7: get_samp_base_to 0@
    then
        0A93: end_custom_thread
    end
    repeat
        wait 400
    until 0AFA: is_samp_structures_available


:Wittzi_01
wait 0
if and
0256: player $PLAYER_CHAR defined
0B23: samp is_player_connected $PLAYER_ACTOR
else_jump @Wittzi_01
if
051A: actor $PLAYER_ACTOR damaged_by_actor 0@
else_jump @Wittzi_01
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0B36: samp 1@ = get_player_nickname 2@
0470: 3@ = actor 0@ current_weapon
0AF8: samp add_message_to_chat "Damaged by : %s with weapon %s" 1@ 3@ color 0xFF61BB 
054E: clear_actor $PLAYER_ACTOR damage 
wait 500
jump @Wittzi_02

:Wittzi_02
wait 0
if
051A: actor $PLAYER_ACTOR damaged_by_actor 0@
else_jump @Wittzi_01                                                                                  
jump @Wittzi_01
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,500
Solutions
1
Reaction score
246
Location
( ͡° ͜ʖ ͡°)
{$CLEO .cs}

thread 'Wittzi'

:Wittzi_01
wait 0
if
0256: player $PLAYER_CHAR defined
else_jump @Wittzi_01
if
051A: actor $PLAYER_ACTOR damaged_by_actor 0@
else_jump @Wittzi_01
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0B36: samp 1@ = get_player_nickname 2@
0ACD: show_text_highpriority "Damaged by %s" 1@ time 500
jump @Wittzi_01
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
Hello sir opcode, are there other any ways to get the opponents ID? I'm still crashing
this is the only way to get his id in samp player list :

[...]
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0B36: samp 1@ = get_player_nickname 2@
0ACD: show_text_highpriority "Damaged by %d" 2@ time 500
jump @Wittzi_01

Without samp functions v2.6 it is not possible.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
[quote author="undiscovered"]Hello sir opcode, are there other any ways to get the opponents ID? I'm still crashing
this is the only way to get his id in samp player list :

[...]
0B2B: samp 2@ = get_player_id_by_actor_handle 0@
0B36: samp 1@ = get_player_nickname 2@
0ACD: show_text_highpriority "Damaged by %d" 2@ time 500
jump @Wittzi_01

Without samp functions v2.6 it is not possible.[/quote]
I mean how can I get the 0@ ?
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
or at least;
0AD2: 0@ = player $PLAYER_CHAR targeted_actor

If you keep crashing with these things then you got some serious problems about that samp functions thingy and i don't know how you'll fix it apart from downloading samp functions v2.6.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
or at least;
0AD2: 0@ = player $PLAYER_CHAR targeted_actor

If you keep crashing with these things then you got some serious problems about that samp functions thingy and i don't know how you'll fix it apart from downloading samp functions v2.6.
0AD2: 0@ = player $PLAYER_CHAR targeted_actor , player need to be target?
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
no man, player isn't the target, that opcode means "the actor called 0@ is the player character's targetted actor."
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
ye, and i use it usually like this :

0AD2: $target = player $PLAYER_CHAR targeted_actor //IF and SET
if
0457: player $PLAYER_CHAR aiming_at_actor $target
[...]
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
This is my algo,

Player Dmer hits me
I take the name of the DMer through 051A: actor $PLAYER_ACTOR damaged_by_actor $player_Dmer , if its possible
And so on.. Is my script correct?
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
8
i don't know, you must try it at least and see by your own. Nobody will hurt you when the script didn't work.
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,500
Solutions
1
Reaction score
246
Location
( ͡° ͜ʖ ͡°)
{$CLEO .cs}
THREAD "THREAD_BY_OPCODEXE"
0662: NOP "www.youtube.com/OpcodeXe"
0662: NOP ""

:LOAD
wait 0
if
Player.Defined(0)
jf @LOAD
if
8AF7: get_samp_base_to 0@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available

:START
wait 0
if
0ADC: test_cheat "DMG"
jf @MAIN
if
31@ == 0 // ITS OFF
then
31@ = 1 // ENABLE IT
018C: play_sound 1083 at 0.0 0.0 0.0
0ACD: show_text_highpriority "DMG ON" time 1337
else
31@ = 0 // TURN IT OFF
018C: play_sound 1084 at 0.0 0.0 0.0
0ACD: show_text_highpriority "DMG OFF" time 1337
end

:MAIN
if
31@ == 1 // on
jf @START
const
ped = 31@
end
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
0A8D: ped = read_memory 29@ size 1 virtual_protect 0
000A: 29@ += 0x1
if and
0029: ped >= 0x00
001B: 0x80 > ped
then
005A: ped += 30@
end
if
051A: actor $PLAYER_ACTOR damaged_by_actor 30@
then
0B2B: samp 0@ = get_player_id_by_actor_handle 30@
0B36: samp 1@ = get_player_nickname 0@
0AD1: show_formatted_text_highpriority "Damaged by %s" time 2000 1@
END
end
jump @START
 
Status
Not open for further replies.
Top