Posts: 292
Threads: 9
Joined: Oct 2011
Reputation:
0
I think, GetPlayerTargetPlayer would fit this perfectly. Or maybe not. I'm not sure if lag messes with it or not. You could store what player the killer is aiming at and do some checks to see if the last player the killer aimed at was indeed the player he killed.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
You could also use OnPlayerGiveDamage and OnPlayerTakeDamage and store if they hit the other player.
If you implement GetPlayerTargetPlayer then remember that not everything will call that like if they're using a joypad, if they're in a vehicle and also guns have target ranges which are shorter than the damage ranges which means you can kill someone with an m4 without GetPlayerTargetPlayer returning their id if they're far away enough
Posts: 80
Threads: 15
Joined: Jul 2011
Reputation:
0
public OnPlayerDeath(playerid,killerid,reason){
if(GetPlayerState(playerid) != PLAYER_STATE_DEATH){
CallRemoteFunction("OnPlayerUseFakeKill","п",playe rid);
}
return true;
}
Posts: 434
Threads: 19
Joined: Aug 2011
Reputation:
0
Patchwerk...
1. I am pretty sure it's PLAYER_STATE_WASTED.
2. Fake kill actually KILLS the player that used the cheat. The idea is to give the impression the target player has a weapon that's not permitted on the server, by triggering either a death-message or the anticheat.
Checking if the player died is redundant. OnPlayerDeath is only called when the player dies...
Posts: 2,593
Threads: 34
Joined: Dec 2007
Maybe in cheats but not in the ***samp ^^ second program calls OnPlayerDeath so killerid & playerid are not kills, 4 anti cheat should add too
pawn Code:
if(killerid == playerid) BanEx(playerid,"Possibly FakeKill");
Posts: 1,023
Threads: 50
Joined: Mar 2007
Reputation:
0
Jefff that post is lost on me. It made no sense at all.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
how about you track the health and armour variables through OnPlayerTakeDamage, if they have more than x then message the admins.
you could check the reason under opd and check if the weapon would be able to deal out that much damage
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
Cessil, I told you via steam that it's flawed. the bastards use a cleo mod
I fixed this situtation by calculating whether the player died in under 500 ms.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
I didn't tell you about tracking the health with optd and your way is flawed too
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
Only if Kalcor made a function to activate via gamemodeinit to disable cleo mods.... But still, these people commence over 500 fake kills in under 5 seconds lol, I guess my way is flawed but there isn't really a reliable solution for this
Posts: 555
Threads: 136
Joined: Dec 2010
Reputation:
0
So for now there is no solution ?
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I'm not sure if fake killing works anymore but I never use the OnPlayerDeath() call back, I use OnPlayerTakeDamage() and OnPlayerStateChange() to detect death then directly call the death callback... the best solution is.
OnPlayerDeath(playerid, killerid, reason) { return 1; }
Posts: 23
Threads: 1
Joined: Oct 2014
Reputation:
0
It works ? I want to know plz tell me