Solution for anti-fake killing.
#1

As there isn't one and cannot be scripted correctly, can there please be a fix for it? I have a player base over 14 players per day and get attacked several times. I've tried to do something to patch it but it fails.

pawn Code:
if(GetPlayerWeapon(killerid) == reason) Kick(killerid);
Flawed method.

Using the OnPlayerTakeDamage callback fails since it each time a fake kill is made, it shows the damage. Detecting if a player was killed in under 500ms doesn't seem to work fine as well.

Thanks.
Reply
#2

Why not use OnPlayerTakeDamage callback? You can check if the issuerid has the weaponid in his hands, if he doesn't, ban the playerid for fake kill hack.
Reply
#3

Check the distance, interior and virtual world between the 2 players, and also the weapon the killer is holding. Note that some death reasons are impossible to have a killer. Checking these things will be more accurate.
My system for that is quite accurate, and it can even detect fake death caused by SA-MP bug (for example, if A hits B, and then B commits suicide, the death reason will be A killed B, instead of committing suicide).
Reply
#4

Quote:
Originally Posted by leong124
View Post
Check the distance, interior and virtual world between the 2 players, and also the weapon the killer is holding. Note that some death reasons are impossible to have a killer. Checking these things will be more accurate.
My system for that is quite accurate, and it can even detect fake death caused by SA-MP bug (for example, if A hits B, and then B commits suicide, the death reason will be A killed B, instead of committing suicide).
Noobish to ask but would you send it to me? Having to have this mod be on my server is my nightmare. Thanks.
Reply
#5

Quote:
Originally Posted by Lorenc_
View Post
Noobish to ask but would you send it to me? Having to have this mod be on my server is my nightmare. Thanks.
That's err...pretty simple to make. Or better yet, you could check if the player is streamed in to the player.

pawn Code:
public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerStreamedIn(playerid, killerid)) { // No need for a VW check, you don't stream in to other clients if they're in different VWs to you (presumably...)
        if(GetPlayerInterior(playerid) == GetPlayerInterior(killerid)) {
            if(GetPlayerWeapon(killerid) == reason) {
                print("OH HERRO!!!1!1!1");
            }
        }
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by Calgon
View Post
That's err...pretty simple to make. Or better yet, you could check if the player is streamed in to the player.

pawn Code:
public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerStreamedIn(playerid, killerid)) { // No need for a VW check, you don't stream in to other clients if they're in different VWs to you (presumably...)
        if(GetPlayerInterior(playerid) == GetPlayerInterior(killerid)) {
            if(GetPlayerWeapon(killerid) == reason) {
                print("OH HERRO!!!1!1!1");
            }
        }
    }
    return 1;
}
So, if I exploded a player, you really think that would work lol?
Reply
#7

what if you shoot someone, and they jump off something after you're streamed out? (or /kill) that won't work.

I don't have a good solution for this, maybe you could use GetPlayerKeys or monitor ammo changes (and do an IsPlayerInRangeOfPoint for melee weapons, because they have infinite ammo.)
Reply
#8

Well, it depends really. It's a lot more reliable than having no checks at all.
Reply
#9

Quote:
Originally Posted by Calgon
View Post
That's err...pretty simple to make. Or better yet, you could check if the player is streamed in to the player.

pawn Code:
public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerStreamedIn(playerid, killerid)) { // No need for a VW check, you don't stream in to other clients if they're in different VWs to you (presumably...)
        if(GetPlayerInterior(playerid) == GetPlayerInterior(killerid)) {
            if(GetPlayerWeapon(killerid) == reason) {
                print("OH HERRO!!!1!1!1");
            }
        }
    }
    return 1;
}
Add distance to that too.
Reply
#10

Read what I commented before I included the code, there's no way you can kill a player if they're not streamed in. This way, snipers' kills won't be ignored.
Reply
#11

Quote:
Originally Posted by Calgon
View Post
Well, it depends really. It's a lot more reliable than having no checks at all.
Better have no checks at all, than having checks that are only 50% reliable.
Reply
#12

So you're saying you would rather have it completely wrong than half right, basically?
Reply
#13

No I'm saying that I prefer not banning at all, than banning innocents.
Reply
#14

Quote:
Originally Posted by decondelite
View Post
No I'm saying that I prefer not banning at all, than banning innocents.
That's why you report it to admin and/or log it. That way it can be checked into.



pawn Code:
public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerStreamedIn(playerid, killerid)) { // No need for a VW check, you don't stream in to other clients if they're in different VWs to you (presumably...)
        if(GetPlayerInterior(playerid) == GetPlayerInterior(killerid)) {
            if(GetPlayerWeapon(killerid) == reason) {
                print("OH HERRO!!!1!1!1");
            }
        }
    }
    return 1;
}
Why are you checking if they have everything correct? I would check against it...Then have it auto-message admins..Besides that, you don't need to not be streamed in to fake kill...Just GetWeapon is good enough in that perspective.

Now you come to the point where, what if they have that weapon? That just breaks the entire thing...
Reply
#15

Quote:
Originally Posted by [ABK]Antonio
View Post
That's why you report it to admin and/or log it. That way it can be checked into.



pawn Code:
public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerStreamedIn(playerid, killerid)) { // No need for a VW check, you don't stream in to other clients if they're in different VWs to you (presumably...)
        if(GetPlayerInterior(playerid) == GetPlayerInterior(killerid)) {
            if(GetPlayerWeapon(killerid) == reason) {
                print("OH HERRO!!!1!1!1");
            }
        }
    }
    return 1;
}
Why are you checking if they have everything correct? I would check against it...Then have it auto-message admins..Besides that, you don't need to not be streamed in to fake kill...Just GetWeapon is good enough in that perspective.

Now you come to the point where, what if they have that weapon? That just breaks the entire thing...
Well, it was more along the lines of proof of concept, but you're right about checking against it.

If you read what I just wrote, you'll understand why I'm checking if the player is streamed in to the killer. This way we can determine whether the kill was actually possible - you can't kill someone if you're not streamed in to their client, but you can probably fake kill.

Quote:
Originally Posted by decondelite
View Post
No I'm saying that I prefer not banning at all, than banning innocents.
Who said anything about banning people?
Reply
#16

Quote:
Originally Posted by decondelite
View Post
No I'm saying that I prefer not banning at all, than banning innocents.
You don't need to ban them, but notify the admins or don't show the death message and run the related scripts.

For explosion, it is not easy to detect it accurately using current PAWN functions. We have to detect the keys of the killer, and check whether they are holding a detonator, put/threw some explosives, or driving a hunter/hydra/rhino.
For vehicles, you may also need to check the front camera vector. However, this may not be accurate enough. A native support for detecting such killings is great.
Reply
#17

Store last damager id at onplayertakedamage and check if the killer id is that person. Works 99.9% of times, tested with hacks, there's only false positives when a person is killed by a fire and it makes the killer the person who set the fire, but onplayeratake damage counts as invalid player
Reply
#18

I doubt it, although I haven't tested it. Seems that SA-MP also make use of the callback there. If SA-MP itself can show fake deaths, so are the callback.

Calgon: I remember that the cheat can only apply fake deaths for players that are streamed in, making the check of IsPlayerStreamedIn useless.
Reply
#19

Quote:
Originally Posted by CuervO
View Post
Store last damager id at onplayertakedamage and check if the killer id is that person. Works 99.9% of times, tested with hacks, there's only false positives when a person is killed by a fire and it makes the killer the person who set the fire, but onplayeratake damage counts as invalid player
Tested it a week ago, detection is flawed..
Reply
#20

pawn Code:
// Anti FakeKill Flood by RuNix

#include <a_samp>

new XDeaths[MAX_PLAYERS];
new LastDeath[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n----------------------------------------");
    print(" Anti FakeKill Flood FilterScript by RuNix");
    print("----------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    XDeaths[playerid] = 0;
    LastDeath[playerid] = 0;
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(XDeaths[playerid] == 0)
    {
       LastDeath[playerid] = gettime();
    }
    XDeaths[playerid]++;
    if(XDeaths[playerid] == 5)
    {
        if((gettime() - LastDeath[playerid]) <= 5)
        {
            SendClientMessage(playerid,0,"{FFBF00}Hey n0b, flood your mother!");
            BanEx(playerid,"Banned for FakeKill Flood");
        }else
        if((gettime() - LastDeath[playerid]) > 5)
        {
            XDeaths[playerid]=0;
        }
    }
    return 1;
}
I use this script on my server Romania Super Stunt and works perfectly.
This script is old of 0.3c and i don't used OnPlayerTakeDamage...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)