SA-MP Forums Archive
Current fake kill situations - 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: Current fake kill situations (/showthread.php?tid=477403)



Current fake kill situations - Loot - 23.11.2013

Hi,

I was wondering what's the best protection against fake kills.
Nowadays, the cheaters can fake kill both themselves and their victims, which means even (for instance) if you do have an anti cheat, he can literally fake kill the victim (against the cheater himself) without stop which might get the VICTIM a ban eventually, while the cheater does not get detected.

I couldn't find any tip/solution regarding the current fake kill issue, is there anything I can do against?

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == reason) {
        // does not always works properly
    }
    if(killerid == playerid) {
        // same goes here
    }
    return 1;
}



Re: Current fake kill situations - Patrick - 23.11.2013

Try this code created by Lorenc_

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Anti-Fake Kill. Needs more to it I guess but works.

pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( IsPlayerConnected( killerid ) )
    {
        if( IsPlayerConnected( GetPVarInt( playerid, "LastKilled" ) ) && GetPVarInt( playerid, "LastKilled" ) == killerid )
        {
            if( ( GetPVarInt( playerid, "LastKilledTickcount" ) - GetTickCount( ) ) < 500 )
            {
                SetPVarInt( playerid, "LastKilledTick", GetPVarInt( playerid, "LastKilledTick" ) + 1 );
                if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Kick( playerid );
            }
            SetPVarInt( playerid, "LastKilledTickcount", GetTickCount( ) );
        }
        SetPVarInt( playerid, "LastKilled", killerid );
    }
    return 1;
}
There is a flaw with minigun, so make it admin immune or something.