├── .vscode ├── settings.json └── tasks.json ├── octa-damage.inc ├── octa-anticheat.inc ├── .gitignore ├── README.md └── gamemodes └── test.pwn /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.encoding": "windows1252" 3 | } -------------------------------------------------------------------------------- /octa-damage.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexchwoj/octa-anticheat/HEAD/octa-damage.inc -------------------------------------------------------------------------------- /octa-anticheat.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexchwoj/octa-anticheat/HEAD/octa-anticheat.inc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Shared objects (inc. Windows DLLs) 2 | *.dll 3 | *.so 4 | *.so.* 5 | *.dylib 6 | 7 | # Executables 8 | *.exe 9 | *.out 10 | *.app 11 | *.i*86 12 | *.x86_64 13 | *.hex 14 | *.amx 15 | 16 | # Log files 17 | *.txt 18 | *.log 19 | 20 | # Test server 21 | *.cfg 22 | scriptfiles/ 23 | plugins/ 24 | gamemodes/*.amx 25 | filterscripts/ 26 | compiler/ 27 | !.vscode/tasks.json 28 | commit.bat -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "type": "shell", 4 | "command": "compiler/pawncc.exe", 5 | "problemMatcher": "$pawncc", 6 | "presentation": { 7 | "reveal": "always", 8 | "focus": true, 9 | "panel": "dedicated", 10 | "clear": true 11 | }, 12 | "tasks": [ 13 | { 14 | "label": "Build Octa AntiCheat", 15 | "args": [ 16 | "\"gamemodes/test.pwn\"", 17 | "\"-icompiler/include\"", 18 | "\"-ogamemodes\\test.amx\"" 19 | ], 20 | "group": { 21 | "kind": "build", 22 | "isDefault": true 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](https://i.imgur.com/RwQNuf4.png) 2 | Octa is a powerful anti-cheat service that counteracts cheating in San Andreas Multiplayer, using **Pawn.RakNet**, which makes it **faster** and more **effective** than any classic anti-cheat. 3 | 4 | ⚠️ Warning: this project is no longer supported, I'm not going to update it anymore. 5 | 6 | ## Implementation 7 | 1. Download the latest version in [releases](https://github.com/Hyaxe/octa-anticheat/releases) 8 | 2. Put the Octa's Files file in `pawno/include` 9 | 3. Enter this line in your initial script 10 | ```pawn 11 | #include 12 | #include 13 | ``` 14 | 4. Install [Pawn.RakNet](https://github.com/katursis/Pawn.RakNet) 15 | 16 | ## Usage 17 | Octa calls a function when a cheating attempt is detected, this function contains the identifier number of the cheat and ID of the player. In the `test.pwn` file you have a usage example. 18 | 19 | ```pawn 20 | public OnCheatDetected(playerid, cheat_id, const cheat_name[], cheat_detections) 21 | { 22 | static const fmt_str[] = "[{939393}%i{FFFFFF}] Cheat Detected: {EE5454}%s{FFFFFF} - Detections: {EFD755}%d"; 23 | new string[sizeof(fmt_str) + (-2 + 64) + (-2 + 8)]; 24 | 25 | strunpack(string, ANTICHEAT_INFO[cheat_id][ac_name], sizeof(string)); 26 | format(string, sizeof(string), fmt_str, playerid, string, cheat_detections); 27 | 28 | SendClientMessageToAll(-1, string); 29 | ot_CheatKick(playerid, cheat_id); 30 | return 1; 31 | } 32 | ``` 33 | 34 | ## Credits 35 | * [Atom](https://github.com/RealAtom) - Development leader 36 | * [leHeix](https://github.com/joseepe) - Provide help and programming 37 | * [katursis](https://github.com/katursis) - [Pawn.RakNet](https://github.com/katursis/Pawn.RakNet/) 38 | 39 | ### Discord 40 | [![Hyaxe](https://discordapp.com/api/guilds/586980198910656521/embed.png?style=banner2)](https://www.hyaxe.com/discord) 41 | -------------------------------------------------------------------------------- /gamemodes/test.pwn: -------------------------------------------------------------------------------- 1 | #pragma option -(+ 2 | #pragma option -;+ 3 | //#pragma option -O1 4 | #pragma option -d3 5 | 6 | #include 7 | #include 8 | #include "../../octa-damage.inc" 9 | #include "../../octa-anticheat.inc" 10 | 11 | main() 12 | { 13 | print("\nRunning: Octa Test Server"); 14 | } 15 | 16 | public OnPlayerConnect(playerid) 17 | { 18 | GameTextForPlayer(playerid,"~b~Octa~w~ AntiCheat", 5000, 5); 19 | ResetPlayerWeapons(playerid); 20 | return 1; 21 | } 22 | 23 | public OnPlayerDeath(playerid, killerid, reason) 24 | { 25 | SendDeathMessage(killerid, playerid, reason); 26 | return 1; 27 | } 28 | 29 | public OnCheatDetected(playerid, cheat_id, const cheat_name[], cheat_detections) 30 | { 31 | static const fmt_str[] = "{939393}%s (ID: %i){FFFFFF}: Cheat Detected: {EE5454}%s{FFFFFF} - Detections: {EFD755}%d"; 32 | new 33 | string[144], 34 | name[MAX_PLAYER_NAME] 35 | ; 36 | 37 | GetPlayerName(playerid, name, MAX_PLAYER_NAME); 38 | 39 | strunpack(string, ANTICHEAT_INFO[cheat_id][ac_name], sizeof(string)); 40 | format(string, sizeof(string), fmt_str, name, playerid, string, cheat_detections); 41 | 42 | SendClientMessageToAll(-1, string); 43 | ot_CheatKick(playerid, cheat_id); 44 | return 1; 45 | } 46 | 47 | public OnPlayerDamage(playerid, issuerid, amount, weaponid, bodypart) 48 | { 49 | printf("OnPlayerDamage(playerid: %d, issuerid: %d, amount: %d, weaponid: %d, bodypart: %d)", playerid, issuerid, amount, weaponid, bodypart); 50 | return 1; 51 | } 52 | 53 | public OnPlayerCommandText(playerid, cmdtext[]) 54 | { 55 | if (strcmp("/mp5", cmdtext, true, 10) == 0) 56 | { 57 | GivePlayerWeapon(playerid, 29, 100); 58 | return 1; 59 | } 60 | 61 | if (strcmp("/m4", cmdtext, true, 10) == 0) 62 | { 63 | GivePlayerWeapon(playerid, 31, 100); 64 | return 1; 65 | } 66 | 67 | if (strcmp("/9mm", cmdtext, true, 10) == 0) 68 | { 69 | GivePlayerWeapon(playerid, 22, 100); 70 | return 1; 71 | } 72 | 73 | if (strcmp("/infernus", cmdtext, true, 10) == 0) 74 | { 75 | CreateVehicle(411, 1589.339843, -1054.775756, 23.633340, 90.0, -1, -1, 0, 0); 76 | return 1; 77 | } 78 | return 0; 79 | } 80 | 81 | public OnPlayerRequestClass(playerid, classid) 82 | { 83 | SetSpawnInfo(playerid, 0, 167, 1589.339843, -1054.775756, 23.633340, 90.0, -1, -1, -1, -1, -1, -1); 84 | return 0; 85 | } 86 | 87 | public OnGameModeInit() 88 | { 89 | SetGameModeText("Octa Anti-Cheat"); 90 | UsePlayerPedAnims(); 91 | 92 | Weapon_SetDamage(22, -1, 1); // 9mm Damage (all body): 1 93 | Weapon_SetDamage(29, -1, 50); // MP5 Damage (all body): 50 94 | Weapon_SetDamage(31, 9, 100); // M4 Damage (head): 100 95 | return 1; 96 | } 97 | --------------------------------------------------------------------------------