Anti-fake Kill.
#1

I've seen previous discussion about this, and am still wondering for a fix.

I have created one:
http://forum.sa-mp.com/showpost.php?...&postcount=646

though I think it's flawed. GetPlayerWeapon( killerid ) != reason fails too, that's a major flaw lol.

Any tips?

Thanks a lot.
Reply
#2

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.
Reply
#3

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
Reply
#4

public OnPlayerDeath(playerid,killerid,reason){
if(GetPlayerState(playerid) != PLAYER_STATE_DEATH){
CallRemoteFunction("OnPlayerUseFakeKill","п",playe rid);
}
return true;
}
Reply
#5

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...
Reply
#6

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");
Reply
#7

Jefff that post is lost on me. It made no sense at all.
Reply
#8

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
Reply
#9

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.
Reply
#10

I didn't tell you about tracking the health with optd and your way is flawed too
Reply
#11

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
Reply
#12

So for now there is no solution ?
Reply
#13

no solution :/
Reply
#14

pawn Code:
if((GetTickCount() - GetPVarInt(playerid, "LastKilledTick")) < 100)
    {
        printf("Warning: Player %d was kicked because last killed tick was: %d", playerid, (GetTickCount() - GetPVarInt(playerid, "LastKilledTick")));
        Kick(playerid);
    }
    SetPVarInt(playerid, "LastKilledTick", GetTickCount());
Reply
#15

Quote:
Originally Posted by Emre__
View Post
pawn Code:
if((GetTickCount() - GetPVarInt(playerid, "LastKilledTick")) < 100)
    {
        printf("Warning: Player %d was kicked because last killed tick was: %d", playerid, (GetTickCount() - GetPVarInt(playerid, "LastKilledTick")));
        Kick(playerid);
    }
    SetPVarInt(playerid, "LastKilledTick", GetTickCount());
Could this work? please I need an answer fast
Reply
#16

OnPlayerSpawn(playerid):

Code:
SetPVarInt(playerid,"K_Times",0);
OnPlayerDeath(playerid, killerid, reason):

Code:
SetPVarInt(playerid,"K_Times", GetPVarInt(playerid,"K_Times") + 1);
if(GetPVarInt(playerid,"K_Times") > 1) return Kick(playerid);
Reply
#17

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; }
Reply
#18

It works ? I want to know plz tell me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)