Get last player hit ID in samp

erichoward

Member
Joined
Dec 9, 2019
Messages
15
Reaction score
0
Location
egypt
I want to know how to get the ID of the last hit person ( the last person I hit with my gun)
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
293
Reaction score
98
Location
UGBASE
Hook for outcoming ID_BULLET_SYNC packets and read HitType for BULLET_HIT_TYPE_PLAYER ID 1.
 

erichoward

Member
Joined
Dec 9, 2019
Messages
15
Reaction score
0
Location
egypt
Code:
{$CLEO}
0000: NOP
:Start
wait 6000
SAMP.Available
else_jump @Start
0AF8: samp add_message_to_chat "{FFFFFF}Auto Badge cleo by{FFFF00} Eric{FFFF00}"
0AF8: samp add_message_to_chat "{FF0000}DO NOT{FFFFFF} use this cleo to modify it or add anything to it{FFFFFF}"
wait 50
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor
wait 100
0AF9: samp say_msg "/badge"
wait 1000
this is a code that types the command /badge when you aim at someone (I think that it works, it would be great if you try it). What I am looking for is to stop this from working if my player name was a different color)
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
293
Reaction score
98
Location
UGBASE
tbh i dont get what you are trying to do. can u please explain?
 
D

Deleted member 57993

Guest
like slientaim settings "ignore same nickname color"
you just need to use some "if" conditions just get ur nickname color and compare it to target id color
 

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
why do you need to know the last player you hit, what are you actually trying to do?
 

erichoward

Member
Joined
Dec 9, 2019
Messages
15
Reaction score
0
Location
egypt
I want to make a backup cleo, that types the name of the player you hit. And for the auto badge I dont know how to script it.
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
293
Reaction score
98
Location
UGBASE
So you really maybe should start explaining what you want precisely, because I literally dont understand any shit you are trying to explain us.

If you want to know WHO is shooting at you, you will need to hook the same way as I told you in the second post but for INCOMING packet.

If you want to ignore specific players (as example if their color matches with yours) -> Get the color of targeted_actor with 0B37 -> and get your color aswell ($PLAYER_ACTOR) and just compare them (if they match -> dont do anything else do /badge or what ever you want).

yo nigz need to start doing it yourself instead of keep asking for pasta.
 

erichoward

Member
Joined
Dec 9, 2019
Messages
15
Reaction score
0
Location
egypt
So you really maybe should start explaining what you want precisely, because I literally dont understand any shit you are trying to explain us.

If you want to know WHO is shooting at you, you will need to hook the same way as I told you in the second post but for INCOMING packet.

If you want to ignore specific players (as example if their color matches with yours) -> Get the color of targeted_actor with 0B37 -> and get your color aswell ($PLAYER_ACTOR) and just compare them (if they match -> dont do anything else do /badge or what ever you want).

yo nigz need to start doing it yourself instead of keep asking for pasta.
well i am a starter, so it would be better if you can do it, i would appreciate that
 
Top