CLEO Know the hidden Deathmatcher

Status
Not open for further replies.

undiscovered

Well-Known Member
Joined
May 3, 2013
Messages
76
Likes
0
Points
151
#1
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 [email protected]
    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 [email protected]
else_jump @Wittzi_01
0B2B: samp [email protected] = get_player_id_by_actor_handle [email protected]
0B36: samp [email protected] = get_player_nickname [email protected]
0470: [email protected] = actor [email protected] current_weapon
0AF8: samp add_message_to_chat "Damaged by : %s with weapon %s" [email protected] [email protected] 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 [email protected]
else_jump @Wittzi_01                                                                                  
jump @Wittzi_01
 

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,479
Likes
217
Points
208
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
#3
OP
OP
U

undiscovered

Well-Known Member
Joined
May 3, 2013
Messages
76
Likes
0
Points
151
#4
Hello sir opcode, are there other any ways to get the opponents ID? I'm still crashing
 

xzytro

Well-Known Member
Joined
Apr 1, 2013
Messages
2,296
Likes
6
Points
183
#6
OP
OP
U

undiscovered

Well-Known Member
Joined
May 3, 2013
Messages
76
Likes
0
Points
151
#7
[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 [email protected] = get_player_id_by_actor_handle [email protected]
0B36: samp [email protected] = get_player_nickname [email protected]
0ACD: show_text_highpriority "Damaged by %d" [email protected] time 500
jump @Wittzi_01

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

xzytro

Well-Known Member
Joined
Apr 1, 2013
Messages
2,296
Likes
6
Points
183
#10
or at least;
0AD2: [email protected] = 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.
 
OP
OP
U

undiscovered

Well-Known Member
Joined
May 3, 2013
Messages
76
Likes
0
Points
151
#11
or at least;
0AD2: [email protected] = 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: [email protected] = player $PLAYER_CHAR targeted_actor , player need to be target?
 

xzytro

Well-Known Member
Joined
Apr 1, 2013
Messages
2,296
Likes
6
Points
183
#14
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
[...]
 
OP
OP
U

undiscovered

Well-Known Member
Joined
May 3, 2013
Messages
76
Likes
0
Points
151
#15
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

Well-Known Member
Joined
Apr 1, 2013
Messages
2,296
Likes
6
Points
183
#16
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

Well-Known Member
Joined
Feb 18, 2013
Messages
1,479
Likes
217
Points
208
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
#17
{$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 [email protected]
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
[email protected] == 0 // ITS OFF
then
[email protected] = 1 // ENABLE IT
018C: play_sound 1083 at 0.0 0.0 0.0
0ACD: show_text_highpriority "DMG ON" time 1337
else
[email protected] = 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
[email protected] == 1 // on
jf @START
const
ped = [email protected]
end
0A8D: [email protected] = read_memory 0xB74490 size 4 virtual_protect 0
000A: [email protected] += 0x4
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
for [email protected] = 0 to 35584 step 0x100
0A8D: ped = read_memory [email protected] size 1 virtual_protect 0
000A: [email protected] += 0x1
if and
0029: ped >= 0x00
001B: 0x80 > ped
then
005A: ped += [email protected]
end
if
051A: actor $PLAYER_ACTOR damaged_by_actor [email protected]
then
0B2B: samp [email protected] = get_player_id_by_actor_handle [email protected]
0B36: samp [email protected] = get_player_nickname [email protected]
0AD1: show_formatted_text_highpriority "Damaged by %s" time 2000 [email protected]
END
end
jump @START
 
Status
Not open for further replies.
Top