SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 08/11/2019, 04:48 AM   #1
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,181
Reputation: 397
Default Rogue Anti cheat

Dears, i present to you my polished anti cheat that I've been working on for almost 2 years so far.



Rogue-AC





Github: Click here

This is a combination of all my encounters with cheats that i observed and tried to block on my server, a progress of approximately 2 years of work.

Installation: The Rogue-AC file needs to be included in your gamemode and in all filterscripts, function(s) is/are to be used only within the gamemode.

Version: 8.0

Simply install to your project:

Code:
sampctl package install RogueDrifter/Anti_cheat_pack


Include in your code and begin using the library:
Code:
#include <Rogue-AC>

Usage:

Use the callbacks provided to you by the includes depending on the type of it.

If you're including the pack as a whole you'll need to only use the callback OnPlayerViolate

Details for callback:
Code:
forward OnPlayerViolate(playerid, severity, violationCode, const violationName[]);

Whereas:
Code:
playerid = cheater player id.

severity = how bad cheating is, 
types:
#define SEVERITY_CASE_ONE 0     //Warn then kick
#define SEVERITY_CASE_TWO 1        //Kick
#define SEVERITY_CASE_THREE 2    //Ban

violationcode: which callback was triggered (codes can be found below in the #CONTAINS section.

violationName: basically a string for the cheat name which makes it easier to write a string.


If you use separate includes you can use the respective callbacks in the test.pwn file.
If you want to disable any anti cheat when using the Rogue-AC file, you can put this line before the include:
Code:
#define DISABLE_[anti cheat file name]
For example:
Code:
#define DISABLE_JETPACK
and so on.
Note: If you don't use the callback, my include will do all the work for you.

Testing:

Use the test.pwn file and check the server for client messages/log for printed messages.

Simply run the package:


Code:
sampctl package run

Contains:

Code:
#define VIOLATION_CODE_BUGATTEMPT 0
#define VIOLATION_CODE_LAGOUT 1
#define VIOLATION_CODE_SLIDEBUG 2
#define VIOLATION_CODE_INVALIDMODS 3
#define VIOLATION_CODE_PARTICLESPAM 4
#define VIOLATION_CODE_CARSWING 5
#define VIOLATION_CODE_MONEYHACK 6
#define VIOLATION_CODE_CARTROLL 7
#define VIOLATION_CODE_CARSPAM 8
#define VIOLATION_CODE_AIRBRAKE 9
#define VIOLATION_CODE_SPEEDING 10
#define VIOLATION_CODE_CHATSPAM 11
#define VIOLATION_CODE_JETPACK 12
#define VIOLATION_CODE_FAKECONNECT 13
#define VIOLATION_CODE_FAKEKILL 14
#define VIOLATION_CODE_GODMODE 15
#define VIOLATION_CODE_WEPHACKS 16

How to update:

Simply open your project and run the code:
Code:
sampctl package ensure
I haven't changed the repository name due to the fact that people still search it so yeah, this all started when i was posting my separate includes everywhere until Pottus suggested i grouped everything, so here you go.

Haven't added any debug tools inside either but i plan to do so inside the includes even if it just prints out to your console log the parameters for each callback (Exactly as you can see in the test.pwn file).
__________________
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 online now   Reply With Quote
Old 08/11/2019, 05:18 AM   #2
Nyzenic
Big Clucker
 
Nyzenic's Avatar
 
Join Date: Sep 2017
Location: Philippines
Posts: 86
Reputation: 43
Default Re: Rogue Anti cheat

looks nice, cant wait to test this
__________________
d-rp.net - coming soon

Nyzenic is offline   Reply With Quote
Old 08/11/2019, 08:50 AM   #3
d3Pedro
Huge Clucker
 
d3Pedro's Avatar
 
Join Date: Apr 2012
Location: Los Santos
Posts: 288
Reputation: 80
Default Re: Rogue Anti cheat

Quote:
Originally Posted by Nyzenic View Post
looks nice, cant wait to test this
won't work in philippines

gj fakekill done yet?
__________________
d3Pedro is offline   Reply With Quote
Old 08/11/2019, 10:04 AM   #4
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,181
Reputation: 397
Default Re: Rogue Anti cheat

Quote:
Originally Posted by d3Pedro View Post
won't work in philippines

gj fakekill done yet?
Its not done until i say its done ��

Its the best i can come up with for now, afaik none of the anti cheats i made do false detection (until someone says otherwise) they take extreme cases to be bypassed i'd say but once i come up with an update for any you'll see a new commit on github.

Having any sort of accurate detection is always better than having cheaters rape your server. Ofc if i want to make the anti cheats more sensitive its one line for each but false positives will always happen cuz of sync issues thats why its that tough. My first goal doing this was having 0 dependencies (which is what i achieved) maybe next step would be raknet libraries usage you never know.
__________________
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 online now   Reply With Quote
Old 08/11/2019, 01:33 PM   #5
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,758
Reputation: 840
Default Re: Rogue Anti cheat

Good work here, i know how hard it is to get anti cheats to work universally for any type of gamemode.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 08/11/2019, 03:49 PM   #6
Droxx
Big Clucker
 
Droxx's Avatar
 
Join Date: Dec 2015
Posts: 119
Reputation: 35
Default Re: Rogue Anti cheat

Great work!
Droxx is offline   Reply With Quote
Old 08/11/2019, 07:32 PM   #7
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,181
Reputation: 397
Default Re: Rogue Anti cheat

Quote:
Originally Posted by Gammix View Post
Good work here, i know how hard it is to get anti cheats to work universally for any type of gamemode.
Thanks! Yeahh it is, reason why i used no dependencies and still ppl report me compiling issues cuz of their deprecated a_samp includes lol

@Droxx thanks
__________________
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 online now   Reply With Quote
Old 09/11/2019, 02:18 PM   #8
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 302
Reputation: 37
Default Re: Rogue Anti cheat

What is this for?

Jetpack.inc

Code:
public OnPlayerUpdate(playerid)
{
	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && !s_jetpackProtection{playerid})
	{
		s_jetpackProtection{playerid} = true;
		SetPlayerHealth(playerid, 0.0);
		#if defined OnPlayerJetpackCheat
			OnPlayerJetpackCheat(playerid);
		#endif
	}

	#if defined AJC_OnPlayerUpdate
		return AJC_OnPlayerUpdate(playerid);
	#else
		return 1;
	#endif
}
and what if is the special action set to none (or any other action except jetpack) then the player start cheating jetpack? s_jetpackProtection will protect him. And what if a player picks up a jetpack and his special action not set? It'll cause false report
m4karow is offline   Reply With Quote
Old 09/11/2019, 03:24 PM   #9
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,181
Reputation: 397
Default Re: Rogue Anti cheat

Quote:
Originally Posted by m4karow View Post
What is this for?

Jetpack.inc

Code:
public OnPlayerUpdate(playerid)
{
	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && !s_jetpackProtection{playerid})
	{
		s_jetpackProtection{playerid} = true;
		SetPlayerHealth(playerid, 0.0);
		#if defined OnPlayerJetpackCheat
			OnPlayerJetpackCheat(playerid);
		#endif
	}

	#if defined AJC_OnPlayerUpdate
		return AJC_OnPlayerUpdate(playerid);
	#else
		return 1;
	#endif
}
and what if is the special action set to none (or any other action except jetpack) then the player start cheating jetpack? s_jetpackProtection will protect him. And what if a player picks up a jetpack and his special action not set? It'll cause false report
1- No one can 'pick up' a jetpack without having their special action set first
2- I kill the player because when a player respawns all jetpacks they see because their special action was set gets removed and also the protection gets removed that i gave him
3- No one will get the protection unless the special action is jetpack, read the code.
__________________
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 online now   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
[FilterScript] Anti-Cheat ANTIFLY\ANTI GOD\ANTI SKIN BUG\ANTI MONEY HACK\ANTI JETPACK HACK\ANTI GODOFCARS\ANTI FAKEKILL RedMF Lançamentos/Releases 15 19/07/2018 07:29 PM
[Ajuda] Alguém conhece um anti cheat ou sabe que cheat é esse? Colgate Português/Portuguese 7 20/05/2017 12:42 AM
Request anti cheat, anti flyhack | anti ammo hack | anti healt hack | anti aimboter Izaki Scripting Help 1 15/06/2015 05:21 PM


All times are GMT. The time now is 12:42 AM.


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