SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 13/06/2019, 12:36 PM   #1
bruxo00's Avatar
Join Date: Oct 2012
Location: Portugal
Posts: 1,120
Reputation: 152
Default bAnticheat [C# Client]



If a server is protected by bAnticheat, a player will only be able to play on it if it has the anticheat client opened in his computer. When a player connects to the server, he will need to input a code that was on the client for authentication purposes. That code will automatically be copied to the player clipboard. After connected, if the player closes the client, uses cheats, or whatever, it will be kicked by the server.

When a player is banned, it's banned through hardware id, meaning it will only be able to join the server if it changes the hardware on the PC. This method can be improved.


The first step is to understand the schema that the anticheat uses. When a player connects the anticheat to the server, the server will return a URL that will hold the schema. In this version, it's possible to detect altered game files (via checksum), forbidden files, forbidden directories and forbidden process. This is a simple scheme that I created so you can understand better:

PHP Code:
"validationFiles": [
"forbiddenFiles": [
"forbiddenDirectories": [
"forbiddenProcesses": [

This is a JSON object that holds the instructions that the anticheat will understand and execute. Gonna explain every field:

gtaRunning - if true, the AC will be constantly monitoring if GTA is running and also if the running GTA instance is the same that was analysed by the anticheat. This will previne that a player can have multiple installs of GTA, one with cheats and the other one without, and will be always forced to use the clean install. Not having the GTA running or not having the GTA running from the "oficial" location, will result in a kick.

sampRunning - if true, the AC will be constantly monitoring if SAMP is running. It probably can be useful for someone, or in future versions.

monitorProcessesConstantly - if true, the AC will be constantly monitoring the running processes in the player computer. If it founds a forbidden one, he will be kicked.

validationFiles - array of files. The AC will compare the checksums of the player files with the checksum you enter in the schema. If the checksums are different, the AC will execute the action defined for that specific file. At this time, there is only one action avaliable, that is PREVENT_CONNECT, that will prevent the AC to connect to the server. In future versions will be more.

forbiddenFiles - array of files. The AC will verify if any of the forbidden files exist in the GTA directory. If it does, the action for that specific file will be executed.

forbiddenDirectories - array of directories. The AC will verify if any of the forbidden directory exist in the GTA directory. If it does, the action for that specific file will be executed.

forbiddenProcesses - array of processes. The AC will check if any forbidden process is being executed. If it does, the action for that specific process will be executed.

For those who are not familiarized with JSON, you can use this site to try to visualize it better:

Site to check files checksum (sha256):


First, you will need to create a folder named bac inside the filterscripts. In that folder, create an empty file named uids.txt.

Change the define SECURITY_CODE to the client checksum (compile the client, go to the site above and get the sha256 checksum), if you done any code changes in the client project.

Change the define SCHEMA_URL to the schema created by you. You will need to host it in some place, I recommend pastebin (raw).



Open the client, enter the server IP and click connect. If you have done everything right, you will now see the message: Validated. Waiting for player to join. You will also see a 5 digit code near the button. That code will need to be introduced in the server. (Just CTRL+V, it's already in your clipboard)



Altered file alert

Banned player

Introduce the join code

If you try to enter without the Anticheat


socket [0.1b] with fixes


/bacban - permanently bans a player
/bacinfo - displays some information about a player




[FS] doxIT!
[GM] Paradise City Roleplay
[TOOL] bAnticheat
[TOOL] Logs Checker
[TUTORIAL] Email confirmation system ·

Last edited by bruxo00; 13/06/2019 at 05:29 PM.
bruxo00 is offline   Reply With Quote

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
[Tool/Web/Other] bAnticheat v2 [C# Client] bruxo00 Lançamentos/Releases 10 19/06/2019 03:06 PM
[Tool/Web/Other] bAntiCheat [C#] bruxo00 Lançamentos/Releases 40 20/04/2016 02:23 AM
Client bug ? JokeyL Bug Reports 2 08/09/2015 02:06 PM
SA-MP Client bug Lorenc_ Bug Reports 3 26/09/2011 06:23 PM

All times are GMT. The time now is 01:33 PM.

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