Anti Fake killing suggestions.
#1

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

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

ops sorry .
btw thanks
Reply
#4

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

Tested, and works!
Reply
#6

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

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)