SA-MP Forums Archive
Anti Fake killing suggestions. - 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 killing suggestions. (/showthread.php?tid=568438)



Anti Fake killing suggestions. - VenomMancer - 22.03.2015

Hello i have made this script for stop Fake killers in my server.
this will works or ?

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    SPVI(playerid,"Attacker",issuerid);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(GPVI(playerid,"Attacker")!= killerid) return Kick(killerid);
    return 1;
}
Give me suggestion if you have.
#sorryformybadenglish


Respuesta: Anti Fake killing suggestions. - alexus - 22.03.2015

Fake kill is not used by the killer, the faker is who dead... so kick the victim, not the killer !


Re: Anti Fake killing suggestions. - VenomMancer - 22.03.2015

ops sorry .
btw thanks


Re: Anti Fake killing suggestions. - mirou123 - 22.03.2015

It should work but due to the crappy sync in SAMP it might give false positives. A better way to do it is to save the time at which the person died and check it each time he dies. If he is dieing too quick like twice in a second then he i hacking. It can be bypassed though if they do it slow. It helps a bit though. But go ahead and try your code and let us know if it worked.


Re: Anti Fake killing suggestions. - VenomMancer - 23.03.2015

Tested, and works!


Re: Anti Fake killing suggestions. - mirou123 - 23.03.2015

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
Tested, and works!
Make sure you try it many times. Like if you die by falling, drawning, car explosion when you are inside the vehicle and when you are near it, try it whith /sethp 0 or /kill if you have those etc..


Re: Anti Fake killing suggestions. - VenomMancer - 28.03.2015

all works fine.
but still fake killer have at my server -_-

Help me on this thread:
https://sampforum.blast.hk/showthread.php?pid=3416060#pid3416060&posted


Re: Anti Fake killing suggestions. - Pottus - 28.03.2015

This is not the correct approach at all.

1.) Save time of last death of a player.
2.) On next death check time ex. GetTickCount() - LastDeathTime[playerid]
3.) Is it less than your tolerance? Example 1000ms ?
4.) If so kick player


Re: Anti Fake killing suggestions. - VenomMancer - 28.03.2015

This ?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
//------------------------------------------------------------------------------
// Anti fake kill
//------------------------------------------------------------------------------
    if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1) return Kick(playerid);

    SetPVarInt(playerid,"PlayerLastDeath",gettime());
    return 1;
}



Re: Anti Fake killing suggestions. - Jefff - 28.03.2015

time is only for fake kill flood, you can also check https://sampwiki.blast.hk/wiki/IsPlayerStreamedIn