SA-MP Forums Archive
Anti-fake Kill. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti-fake Kill. (/showthread.php?tid=322342)



Anti-fake Kill. - Lorenc_ - 01.03.2012

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.


Re: Anti-fake Kill. - Psymetrix - 01.03.2012

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.


Re: Anti-fake Kill. - cessil - 01.03.2012

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


Re: Anti-fake Kill. - Patchwerk - 02.03.2012

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


Re: Anti-fake Kill. - Rob_Maate - 02.03.2012

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...


Re: Anti-fake Kill. - Jefff - 02.03.2012

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



Re: Anti-fake Kill. - Redirect Left - 02.03.2012

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


Re: Anti-fake Kill. - cessil - 02.03.2012

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


Re: Anti-fake Kill. - Lorenc_ - 02.03.2012

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.


Re: Anti-fake Kill. - cessil - 03.03.2012

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


Re: Anti-fake Kill. - Lorenc_ - 03.03.2012

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


Re : Anti-fake Kill. - Amine_Mejrhirrou - 05.05.2012

So for now there is no solution ?


Re: Anti-fake Kill. - dud - 15.12.2012

no solution :/


Re: Anti-fake Kill. - Emre__ - 08.01.2013

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());



Re: Anti-fake Kill. - Tika Spic - 15.03.2013

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


Re: Anti-fake Kill. - CaIIIka - 15.03.2013

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);



Re: Anti-fake Kill. - Pottus - 15.03.2013

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; }


Re: Anti-fake Kill. - RoC4life - 19.01.2015

It works ? I want to know plz tell me