SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/03/2018, 05:52 AM   #11
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: hacker killing everyone

Just do an anti kill spam but also exclude fake kills by making sure the killed id is not the same as always, i was going to create something like this and seeing as it is this dangerous i'll release it soon and notify you.
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 04/03/2018, 06:21 AM   #12
cessil
High-roller
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 1,346
Reputation: 296
Default Re: hacker killing everyone

Quote:
Originally Posted by z[D]ark View Post
Is not it. It's suicide.

I also got this with raknet pawn plugin logs:
Code:
[17:52:14] BULLET_SYNC[26]:
hitType 1 
hitId 35 
origin 2856.22 2331.10 10.82 
hitPos -2527.49 -604.61 132.56 
offsets 0.04 0.01 0.50 
weaponId 22
[17:52:14] BULLET_SYNC[26]:
hitType 1 
hitId 38 
origin 2856.46 2330.35 10.82 
hitPos 285.85 -83.99 1001.51 
offsets -0.05 0.01 0.50 
weaponId 22
[17:52:14] BULLET_SYNC[26]:
hitType 1 
hitId 39 
origin 2856.68 2329.64 10.82 
hitPos -126.73 -286.17 644.87 
offsets 0.06 0.05 0.50 
weaponId 22
[17:52:14] BULLET_SYNC[26]:
hitType 1 
hitId 40 
origin 2856.90 2328.92 10.82 
hitPos 1935.04 1348.92 9.96 
offsets -0.01 -0.02 0.50 
weaponId 22
that shows someone standing still and shooting people thousands of units away, you could add a couple checks that I can think off IsPlayerStreamedIn and also if the cheater has that weapon, as well as ammo drops could help detect it
I would also say it shows up as suicide because the player isn't streamed in for them
cessil is offline   Reply With Quote
Old 04/03/2018, 01:20 PM   #13
z[D]ark
Little Clucker
 
z[D]ark's Avatar
 
Join Date: Sep 2016
Location: Brasil, SP.
Posts: 13
Reputation: 3
Default Re: hacker killing everyone

Can someone give me a sample code? I tried to do it but i could not stop this stupid child.
z[D]ark is offline   Reply With Quote
Old 04/03/2018, 01:32 PM   #14
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: hacker killing everyone

Quote:
Originally Posted by z[D]ark View Post
Can someone give me a sample code? I tried to do it but i could not stop this stupid child.
What cessil said is even easier, the problem is you still need to exclude fake death, and a sample code would be too long mate, so just wait til i release an include about it or maybe cessil knows a simpler method so wait for him to reply.
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 05/03/2018, 12:06 AM   #15
cessil
High-roller
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 1,346
Reputation: 296
Default Re: hacker killing everyone

Quote:
Originally Posted by z[D]ark View Post
Can someone give me a sample code? I tried to do it but i could not stop this stupid child.
Show your attempt, I set up my anticheat so everyone is on the same team and I can process all damages and discard or multiply damage to every bullet shot.
It's not something I can just show a small snippet of, like RogueDrifter said, and you should set up a proper anti cheat.

This is a small untested example and is only a small part of what you could do and won't help completely eradicate the problem, I also noticed all the shots are at the same second so having detection for speed of shots should be something you should add too.
It seems like you don't have an anticheat at all.
Also note, this can cause false positives and should only be a temporary measure until you can write a proper anti cheat.
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
  if(!IsPlayerStreamedIn(playerid,damagedid))
  {
    Kick(playerid);
  }
}
cessil is offline   Reply With Quote
Old 05/03/2018, 12:42 AM   #16
z[D]ark
Little Clucker
 
z[D]ark's Avatar
 
Join Date: Sep 2016
Location: Brasil, SP.
Posts: 13
Reputation: 3
Default Re: hacker killing everyone

Quote:
Originally Posted by cessil View Post
Show your attempt, I set up my anticheat so everyone is on the same team and I can process all damages and discard or multiply damage to every bullet shot.
It's not something I can just show a small snippet of, like RogueDrifter said, and you should set up a proper anti cheat.

This is a small untested example and is only a small part of what you could do and won't help completely eradicate the problem, I also noticed all the shots are at the same second so having detection for speed of shots should be something you should add too.
It seems like you don't have an anticheat at all.
Also note, this can cause false positives and should only be a temporary measure until you can write a proper anti cheat.
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
  if(!IsPlayerStreamedIn(playerid,damagedid))
  {
    Kick(playerid);
  }
}
I had done this before and only managed to block the players he killed at a greater distance. But in places where there are several players in one place, it kills everyone and i can not find a way to stop it. I use anti-cheaters created by me: anti-crashers, speed, fly, godmode, among others... but nothing that can block this kind of cheater.
z[D]ark is offline   Reply With Quote
Old 05/03/2018, 01:02 AM   #17
cessil
High-roller
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 1,346
Reputation: 296
Default Re: hacker killing everyone

Quote:
Originally Posted by z[D]ark View Post
I had done this before and only managed to block the players he killed at a greater distance. But in places where there are several players in one place, it kills everyone and i can not find a way to stop it. I use anti-cheaters created by me: anti-crashers, speed, fly, godmode, among others... but nothing that can block this kind of cheater.
And you should add detection for fast bullet shots, ammo loss, if they have the weapon, distance, etc.
I did ask you to post your attempt, this section is for helping others not scripting for others.

here's a snippet of weapon firing speed
Code:
enum WeapEnum {
	WeapID,
	Float:WBaseDamage,
	Float:WeapRange,
	FireRate,
}

new WeaponData[][WeapEnum] = {
	{ 0, 10.0000, 10.0000 , 250 },//fists
	{ 1, 0.0000, 0.0000 , 0 },//unused
	{ 2, 0.0000, 0.0000 , 0 },//unused
	{ 3, 0.0000, 0.0000 , 0 },//unused
	{ 4, 0.0000, 0.0000 , 0 },//unused
	{ 5, 0.0000, 0.0000 , 0 },//unused
	{ 6, 0.0000, 0.0000 , 0 },//unused
	{ 7, 0.0000, 0.0000 , 0 },//unused
	{ 8, 0.0000, 0.0000 , 0 },//unused
	{ 9, 0.0000, 0.0000 , 0 },//unused
	{ 10, 0.0000, 0.0000 , 0 },//unused
	{ 11, 0.0000, 0.0000 , 0 },//unused
	{ 12, 0.0000, 0.0000 , 0 },//unused
	{ 13, 0.0000, 0.0000 , 0 },//unused
	{ 14, 0.0000, 0.0000 , 0 },//unused
	{ 15, 0.0000, 0.0000 , 0 },//unused
	{ 16, 0.0000, 0.0000 , 0 },//unused
	{ 17, 0.0000, 0.0000 , 0 },//unused
	{ 18, 0.0000, 0.0000 , 0 },//unused
	{ 19, 0.0000, 0.0000 , 0 },//unused
	{ 20, 0.0000, 0.0000 , 0 },//unused
	{ 21, 0.0000, 0.0000 , 0 },//unused
	{ 22, 8.000000, 35.00000, 100 },//9mm
	{ 23, 13.000000, 35.00000, 250 },//silencer
	{ 24, 46.000000, 35.00000, 600 },//deagle
	{ 25, 3.300000, 40.00000, 750 },//shotgun
	{ 26, 3.300000, 35.00000, 75 },//sawn off
	{ 27, 4.950000, 40.00000, 230 },//combat
	{ 28, 6.600000, 35.00000, 75 },//uzi
	{ 29, 8.250000, 45.00000, 50 },//mp5
	{ 30, 9.900000, 70.00000, 40 },//ak-47
	{ 31, 9.900000, 90.00000, 40 },//m4
	{ 32, 6.600000, 35.00000, 75 },//uzi
	{ 33, 25.00000, 100.00000, 500 },//rifle
	{ 34, 41.0000, 100.00000, 500 }, //sniper rifle
	{ 35, 0.00000, 0.00000, 0 }, //unused
	{ 36, 0.00000, 0.00000, 0 }, //unused
	{ 37, 0.00000, 0.00000, 0 }, //unused
	{ 38, 46.00000, 75.00000, 5 } //minigun
};

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
	//ammo lock
	if(!GetPVarInt(playerid,"DSync")) ShotPlayer{playerid} = 1;
	
	//sped up gameplay
	if(weaponid == GetPVarInt(playerid,"lastDamageWeapon"))
	{
		if(GetTickCount() - GetPVarInt(playerid,"lastDamageTime") < WeaponData[weaponid][FireRate] * 0.40)
		{
			discard the shot
			return 0;
		}
	}

	if(weaponid != GetPlayerWeapon(playerid))
	{
		discard the shot
		return 0;
	}
	
	return 1;
}
cessil is offline   Reply With Quote
Old 05/03/2018, 01:08 AM   #18
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: hacker killing everyone

Quote:
Originally Posted by cessil View Post
Show your attempt, I set up my anticheat so everyone is on the same team and I can process all damages and discard or multiply damage to every bullet shot.
It's not something I can just show a small snippet of, like RogueDrifter said, and you should set up a proper anti cheat.

This is a small untested example and is only a small part of what you could do and won't help completely eradicate the problem, I also noticed all the shots are at the same second so having detection for speed of shots should be something you should add too.
It seems like you don't have an anticheat at all.
Also note, this can cause false positives and should only be a temporary measure until you can write a proper anti cheat.
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
  if(!IsPlayerStreamedIn(playerid,damagedid))
  {
    Kick(playerid);
  }
}
What about fake kill?
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 05/03/2018, 01:47 AM   #19
cessil
High-roller
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 1,346
Reputation: 296
Default Re: hacker killing everyone

We're not talking about fake kills, and I said it's a temporary measure that won't get rid of the problem completely.
However fake kills won't trigger it because it's using OnPlayerGiveDamage.
cessil is offline   Reply With Quote
Old 05/03/2018, 01:59 AM   #20
Jefff
Banned
 
Join Date: Dec 2007
Posts: 2,593
Reputation: 326
Default Re: hacker killing everyone

Quote:
Originally Posted by z[D]ark View Post
Has a hacker on my server killing everyone and it's very difficult to detect it. Everyone starts to die and in chatkill and server_log shows that it was suicide. Does anyone have a solution?
Do you have custom damage system?
Jefff is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacker Killing Himself/Fake Kill Guest123 Scripting Help 5 13/06/2013 01:54 PM
[Ajuda] Ant Hacker Andre_Elite Português/Portuguese 17 21/01/2013 01:41 PM
[Ajuda] Ant Hacker Kirikage Português/Portuguese 13 09/11/2012 08:13 PM
Hacker got me :O DaneAMattie General 1 10/08/2010 11:48 AM


All times are GMT. The time now is 05:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.