Really need anti fake kill.
#1

Hello guys. i have make FR server from 2 years ago.
but my problem is still same, and its called 'Fake kill' from hackers.

Who have, or can make for me anti fake kill ?

#sorryformybadenglish
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=322342

Atleast make an attempt to either search or make your own antifakekill script
Reply
#3

pawn Код:
new deathdata[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
      deathdata[playerid] = INVALID_PLAYER_ID;
      return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
      deathdata[playerid] = INVALID_PLAYER_ID;
      return 1;
}

public OnPlayerSpawn(playerid)
{
       deathdata[playerid] = INVALID_PLAYER_ID;
       return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
       if(deathdata[playerid] == INVALID_PLAYER_ID)
       {
               deathdata[playerid] = killerid;
               deathdata[killerid] = playerid;
       }
       return 1;
}

stock DeathMessage(playerid, killerid, reason)
{
      if(deathdata[playerid] == killerid && deathdata[killerid] == playerid)
      {
              deathdata[playerid] = INVALID_PLAYER_ID;
              deathdata[killerid] = INVALID_PLAYER_ID;
              return SendDeathMessage(playerid, killerid, reason);
      }
      else return false;
}
Make sure you hook DeathMessage func with SendDeathMessage. So as to completely run the death list with vars.
Hook the callbacks as well and use as an include.

NOTE:
- You can only send a death message if the player has killed the other player
- Function will return false if the player wasnt killed by the specified killer
- Death data of player will reset on spawn i.e. you must send death message before spawn

** Though i am not sure if this will work but anything is better than nothing AND this to prevent fake death messages.
Reply
#4

Put this under OnPlayerDeath and check
Код:
	//anti-fake kill
	if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1) Ban(playerid);
	SetPVarInt(playerid,"PlayerLastDeath",gettime());
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)