Fake Kill
#1

Hi,

Is this a good Anti Fake Kill ? If not how to make it more success +REP if helped

Код:
//anti fake kill
new antifakekill[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
    antifakekill[playerid] ++;
    SetTimerEx("antifakekill2", 1000,false,"i",playerid);
return 1;
}
forward antifakekill2(playerid);
public antifakekill2(playerid)
{
    antifakekill[playerid] --;
    if(antifakekill[playerid] > 3)
    {
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"* %s was banned reason (Fake kill)",pName);
    SendClientMessageToAll(0xFF0000FF,string);
    BanEx(playerid, "Fake kill");
    }
    return 1;
}
Reply
#2

I think you are trying to ban all players that have a hack that kills themself with
But the code you wrote will ban all players that died more than 3 times
If the killer kills the player 3 times
the player will get banned, Even though they didn't hack
That also applies for people that commited suicide
Reply
#3

Код:
    if(killerid != INVALID_PLAYER_ID && playerid == killerid)
	{
		return Kick(playerid);
	}
	
    if(GetPVarInt(playerid, "last_died_at") > GetTickCount())
	{
		Kick(playerid);
		return 1;
	}
	SetPVarInt(playerid, "last_died_at", GetTickCount()+500);
Reply
#4

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
Код:
    if(killerid != INVALID_PLAYER_ID && playerid == killerid)
	{
		return Kick(playerid);
	}
	
    if(GetPVarInt(playerid, "last_died_at") > GetTickCount())
	{
		Kick(playerid);
		return 1;
	}
	SetPVarInt(playerid, "last_died_at", GetTickCount()+500);
This will cause only people that commit suicide to get kicked, Look closely
If the killer is the player, kick the player, which if someone fall from a high place, will get kicked, because he killed himself, Think a bit before u script
Reply
#5

Quote:
Originally Posted by Arbico
Посмотреть сообщение
I think you are trying to ban all players that have a hack that kills themself with
But the code you wrote will ban all players that died more than 3 times
If the killer kills the player 3 times
the player will get banned, Even though they didn't hack
That also applies for people that commited suicide
No...Don't you see the timer? It is actually if player died 3 times in one second he will get banned.
Reply
#6

Quote:
Originally Posted by Arbico
Посмотреть сообщение
This will cause only people that commit suicide to get kicked, Look closely
If the killer is the player, kick the player, which if someone fall from a high place, will get kicked, because he killed himself, Think a bit before u script
I currently use this thing in my server there is no wrong fake-kill.
Reply
#7

So, Should i use this or ?
Reply
#8

Use it if you want innocent players banned. Some things you can do to check for fake kills are: distance between the "killer" & the victim (who is the one hacking), weapon used, if any damage was passed through Take/GiveDamage or other functions, etc.
Reply
#9

The use of a timer is unnecessary, you can still increase the variable in the callback. I'd also advise to stop the execution right there if the value of the variable is over 3 as we wouldn't want to add the "fake kills" to the players' statistics and execute pointless code.

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
I currently use this thing in my server there is no wrong fake-kill.
You don't take into account the slow fake-death though.

Quote:
Originally Posted by Abagail
Посмотреть сообщение
[..] distance between the "killer" & the victim (who is the one hacking) [..]
As far as I know, the killers are all streamed in to the cheater's client.

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
Distance won't work. For example when you give damage somebody and he types /kill. The system will kick wrong person.
Keep track with a variable when a player suicides by a command.
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The use of a timer is unnecessary, you can still increase the variable in the callback. I'd also advise to stop the execution right there if the value of the variable is over 3 as we wouldn't want to add the "fake kills" to the players' statistics and execute pointless code.
Except for the fact that it doesn't actually stop fake killing, but only massive/spammy fake kills.

Quote:
Originally Posted by Paulice
Посмотреть сообщение
Simply check whether the player has registered damage to the other player or not. If the player did not, then cheat confirmed.

That is as simple as it gets, consider other factors if you want a more effective anti-system (though the above would serve you fine)
Time since last damage can also be a factor you could consider adding (ideal for servers with a damage sync system - take precaution if you do not have one; try increasing the set limit).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)