SA-MP Forums Archive
Anti Fake Kill - Please Help Me! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti Fake Kill - Please Help Me! (/showthread.php?tid=62727)



Anti Fake Kill - Please Help Me! - -Davee- - 23.01.2009

Hy!

Would somebody be able to help to stop the fake kill?

Sorry my bad English





Re: Anti Fake Kill - Please Help Me! - Mikep - 23.01.2009

GetPlayerHealth of playerid OnPlayerDeath? If its more than 0, ban?


Re: Anti Fake Kill - Please Help Me! - -Davee- - 23.01.2009

Not work ... I use /kill and I have ban:/


Re: Anti Fake Kill - Please Help Me! - Mikep - 23.01.2009

/Kill will kill the player though..


Re: Anti Fake Kill - Please Help Me! - Mikep - 23.01.2009

He can sniper from miles away.

What happens is, player stays alive, pretends someone kills him, but he doesnt die, so if this is the case, ban.


Re: Anti Fake Kill - Please Help Me! - -Davee- - 23.01.2009

Thank you for everyone Now it's works!


Re: Anti Fake Kill - Please Help Me! - Lazarus - 24.01.2009

You could always check if the "killer" is actually carrying the weapon they supposedly killed with.

pawn Code:
//OnPlayerDeath
if(GetPlayerWeapon(killerid) != reason) //if the weapon "killerid" has is not the weapon used to kill "playerid"
{
    //"playerid" used a fake kill
}



Re: Anti Fake Kill - Please Help Me! - Joe Staff - 24.01.2009

Well distance wouldn't be good if the cheater got close, but it would be good for when they're not, there is a max distance the sniper rifle can do damage. just experiement with the distance using pointtopoint(x,y,x2,y2); to get the exact measurement. Checking if the killer actually owns the weapon is a good way, but also make sure to check if the player has ammo for it (weapon hangs around even if player has 0 ammo). Also make sure to excuse the killer if the player uses /kill /suicide. Also make sure when doing weapon check to clear collision as a weapon (case player jumps off a building)


Re: Anti Fake Kill - Please Help Me! - Mikep - 24.01.2009

Or do what I said.


Re: Anti Fake Kill - Please Help Me! - -Davee- - 24.01.2009

Lazarus thank you!
It's works perfect!