30.04.2012, 03:47
(
Последний раз редактировалось SuperViper; 14.06.2012 в 20:53.
)
Introduction
This script allows you to select all of the cheats you want protection against, change the settings for the cheats, and give certain people a certain security level to bypass anticheat checks.
Required Plugins and Includes
To use this include, you must have sscanf.
When compiling, if you get an error that sscanf2.inc wasn't found, change
at the top of the script and remove the 2.
Functions
Callbacks
Cheat List
Script Settings
Comment this line if you want to use regular 'for' loops instead of the foreach include by ******. To use this, you must have the foreach include.
Comment this line if you want to use regular 'ALS' hooks instead of the y_hooks include by ******. To use this, you must have the y_hooks include or YSI.
Comment this line if you want to use regular 'strcmp' commands instead of the ZCMD include by Zeex. To use this, you must have the ZCMD include.
Comment this line if you want to disable /acstats, which shows the amount of hackers detected by svCheats.
Comment this line if you want to disable /hh, which checks the specified player for godmode.
This defines how fast the cheat detecting timer is. The faster it is, the slower the server is.
Maximum server ping.
Used interiors separated by a space.
Maximum vehicle speed.
Driveby allowed weapons separated by a space.
Amount of jumps before it's called bunny hopping.
Amount of lines before it's called spam.
Amount of minutes before a person is AFK.
IP of your server.
Optional server domain.
List of all curse words.
Amount of kills in X seconds for spamkill detection
Amount of seconds in X kills for spamkill detection
Security Levels and Toggling Cheats
At the top of the script you'll see a list of all of the cheats with a number next to them. The number next to the cheat is the security level required to bypass it. To disable an anticheat you can either comment the line for it or set the security level of it to 0. If you would like to require everyone to be checked by the detector for that cheat, you must set the security level to -1. Anything besides 0 and -1 will be it's required bypass security level. You can set a player's security level via svCheats_SetPlayerSecurityLevel. If the cheat's security level is 2 and my security level is 2 or above, then I won't be checked for the cheat but if my security level is below 2, I'll be checked for the cheat.
Optional Commands
There are two optional commands, /hh and /acstats. To disable any of them, comment one of the following:
The number after HH_USED specifies which security level can use the command.
/acstats displays the amount of cheaters detected by svCheats.
Bugs and Suggestions
Please reply to this thread with your bug report or suggestion for the include. All of these posts will be reviewed carefully and dealt with.
Versions
The download links and the include itself will be updated occasionally.
Version 1.8 - Pastebin | Mediafire | Assembla Direct Download
Version 1.7 - Pastebin | Mediafire | Assembla Direct Download
Version 1.6 - Pastebin | Mediafire | Assembla Direct Download
Version 1.5 - Pastebin | Mediafire | Assembla Direct Download
Version 1.4 - Pastebin | Mediafire | Assembla Direct Download
Version 1.3 - Pastebin | Mediafire | Assembla Direct Download
Version 1.2 - Pastebin | Mediafire
Version 1.1 - Pastebin | Mediafire
Version 1.0 - Pastebin | Mediafire
Don't want to wait for updates?
I'm currently uploading all of my changes to an Assembla account. Assembla will be updated before updates are released. If you wish to get the files directly from Assembla, use SVN Checkout with this URL: https://subversion.assembla.com/svn/sv-libraries/
My latest updates to Assembla are below:
Changelog
Using
To begin using this include, drag the file to your pawno > includes folder and put
at the top of your script.
Add the following code somewhere in your script:
If you have any filterscripts that set a player's health, armor, vehicle health, or give a player a weapon, you must have svCheats included in that script.
Credits
SuperViper - Creating the script
Cody Jones - Helping test the script
****** - foreach and y_hooks
Zeex - ZCMD
This script allows you to select all of the cheats you want protection against, change the settings for the cheats, and give certain people a certain security level to bypass anticheat checks.
Required Plugins and Includes
To use this include, you must have sscanf.
When compiling, if you get an error that sscanf2.inc wasn't found, change
pawn Код:
#include <sscanf2>
Functions
Function | Action | Returns |
svCheats_Debug(bool: togDebug) | Toggles script debugging | 1 |
svCheats_SetPlayerSecurityLevel(playerid, secLevel) | Sets the player's security level | 1 |
svCheats_GetPlayerSecurityLevel(playerid) | Gets the player's security level | Player's security level |
Callbacks
Callback | Call Time |
svCheats_OnPlayerCheatUpdate(playerid, cheatid) | Called when svCheats detects a cheat |
Cheat List
Cheat Name | Call Time | Notes |
CHEAT_HIGH_PING | Called when the player's ping exceeds MAX_PING | |
CHEAT_WEAPON_SPAWN | Called when a player fires a weapon that wasn't gotten from svCheats_GivePlayerWeapon | |
CHEAT_SPEED_HACK | Called when the vehicle's speed exceeds MAX_SPEED | |
CHEAT_JETPACK_HACK | Called when the player has a jetpack and was not setup for it with svCheats_ToggleJetpack | |
CHEAT_DRIVEBY | Called when the player attempts to enter a vehicle with an invalid driveby weapon | Automatically sets the player's armed weapon to fists |
CHEAT_DDRIVEBY | Called when the player attempts to enter a vehicle as a driver with a weapon | Automatically sets the player's armed weapon to fists |
CHEAT_SWEARING | Called when the player puts a swear word in the chat | Not case sensative |
CHEAT_AIRBREAK_HACK | Called when the player's Z coordinate isn't near the MapAndreas result | Not working right now due to MapAndreas failures |
CHEAT_BUNNYHOP | Called when the amount of repeated real jumps (animation index detected) exceeds BUNNYHOP_AMOUNT | |
CHEAT_FLY_HACK | Called when the player's animation index is equal to one of the fly animation indexes and Z is above 4.0 | |
CHEAT_TELEPORT_HACK | Called when the player enters an invalid interior ID | Only detects going in unused interiors and map right clicking |
CHEAT_VEHICLE_REPAIR | Called when the player repairs their vehicle while not near a mod shop or pay n spray | |
CHEAT_CHATSPAM | Called when the amount of repeated chat lines sent by the player exceeds CHATSPAM_LINES | |
CHEAT_AFK | Called when the amount of minutes the player was AFK is equal to AFK_MINUTES | Resets when a chat message is sent, not when a command is sent |
CHEAT_TABBED | Called when a player has been paused for around 5 seconds | |
CHEAT_GODMODE | Called when /hh returns positive for the specified player | |
CHEAT_NINJAJACK | Called when a player has died from being ninjajacked | |
CHEAT_HEALTHHACK | Called when a player spawns health or armor | |
CHEAT_CARRAM | Called when a player car rams another player | |
CHEAT_HELIBLADE | Called when a player heliblades another player | |
CHEAT_VEHMOD | Called when a player adds a modification to their vehicle in interior 0 | |
CHEAT_SERVERAD | Called when a player types a server IP or domain in chat that isn't SERVER_IP or SERVER_DOMAIN | |
CHEAT_FAKEPLAYER | Called when a fake player connects to flood your server | Untested, may cause issues. Need someone to test |
CHEAT_FAKEKILL | Called when a player isn't streamed in to the player he killed | |
CHEAT_REMOTEJACK | Called when a player remotely jacks another player's vehicle | Untested, may cause issues. Need someone to test |
CHEAT_INVALIDMOD | Called when a player adds an invalid modification to their vehicle | Untested, may cause issues. Need someone to test |
CHEAT_LOCKEDVEH | Called when a player enters a locked vehicle | Untested, may cause issues. Need someone to test |
CHEAT_SPAMKILL | Called when a player does X (DETECT_KILLS) kills in X (DETECT_SECONDS) seconds | Untested, may cause issues. Need someone to test |
Script Settings
pawn Код:
#define USE_FOREACH
pawn Код:
#define USE_YHOOKS
pawn Код:
#define USE_ZCMD
pawn Код:
#define ACSTATS_USED
pawn Код:
#define HH_USED
pawn Код:
#define TIMER_TIME 1250
pawn Код:
#define MAX_PING (750)
pawn Код:
#define USED_INTERIORS "1 2"
pawn Код:
#define MAX_SPEED (198)
pawn Код:
#define DRIVEBY_WEAPONS "28 29 32"
pawn Код:
#define BUNNYHOP_AMOUNT (6)
pawn Код:
#define CHATSPAM_LINES (4)
pawn Код:
#define AFK_MINUTES (10)
pawn Код:
#define SERVER_IP "127.0.0.1"
pawn Код:
#define SERVER_DOMAIN "samp.servername.com"
pawn Код:
new CurseWords[][] = {"ass", "bitch", "shit", "fuck", "nigger", "cunt"};
pawn Код:
#define DETECT_KILLS (5)
pawn Код:
#define DETECT_SECONDS (20)
Security Levels and Toggling Cheats
At the top of the script you'll see a list of all of the cheats with a number next to them. The number next to the cheat is the security level required to bypass it. To disable an anticheat you can either comment the line for it or set the security level of it to 0. If you would like to require everyone to be checked by the detector for that cheat, you must set the security level to -1. Anything besides 0 and -1 will be it's required bypass security level. You can set a player's security level via svCheats_SetPlayerSecurityLevel. If the cheat's security level is 2 and my security level is 2 or above, then I won't be checked for the cheat but if my security level is below 2, I'll be checked for the cheat.
Optional Commands
There are two optional commands, /hh and /acstats. To disable any of them, comment one of the following:
pawn Код:
#define ACSTATS_USED
#define HH_USED (1)
/acstats displays the amount of cheaters detected by svCheats.
Bugs and Suggestions
Please reply to this thread with your bug report or suggestion for the include. All of these posts will be reviewed carefully and dealt with.
Versions
The download links and the include itself will be updated occasionally.
Version 1.8 - Pastebin | Mediafire | Assembla Direct Download
Version 1.7 - Pastebin | Mediafire | Assembla Direct Download
Version 1.6 - Pastebin | Mediafire | Assembla Direct Download
Version 1.5 - Pastebin | Mediafire | Assembla Direct Download
Version 1.4 - Pastebin | Mediafire | Assembla Direct Download
Version 1.3 - Pastebin | Mediafire | Assembla Direct Download
Version 1.2 - Pastebin | Mediafire
Version 1.1 - Pastebin | Mediafire
Version 1.0 - Pastebin | Mediafire
Don't want to wait for updates?
I'm currently uploading all of my changes to an Assembla account. Assembla will be updated before updates are released. If you wish to get the files directly from Assembla, use SVN Checkout with this URL: https://subversion.assembla.com/svn/sv-libraries/
My latest updates to Assembla are below:
Changelog
Version | Change |
Version 1.8 | Added locked vehicle entering and spam kill detection |
Version 1.8 | Improved settings design |
Version 1.8 | Resolved a critical issue for users that didn't use the /hh command |
Version 1.7 | Removed GAMEMODE definition, now uses FILTERSCRIPT definition |
Version 1.6 | Resolved compiling issues |
Version 1.5 | Resolved even more issues with fly hacking being detected upon swimming in certain areas (big thanks Kar) |
Version 1.4 | Remote vehicle jack detection and invalid mod detection |
Version 1.4 | Server advertisement, fake kill, and fake player detection |
Version 1.4 | You no longer have to use svCheats_ToggleJetpack. It is done automatically and hooked on SetPlayerSpecialAction, ClearAnimations, and OnPlayerSpawn |
Version 1.4 | Resolved an issue where the player would be detected as cheating sometimes when paused |
Version 1.4 | Function natives have been added so that you can see the function parameters when you type 'functionName(' and pause for a little bit |
Version 1.4 | Resolved an issue where the player would be detected as fly hacking when swimming a pool or past the Sherman Dam (full fix) |
Version 1.3 | Added car ram, heliblade, and vehicle modification cheat detection |
Version 1.3 | Resolved an issue where the player would be detected as health hacking when using ammunation or a sprunk machine |
Version 1.3 | Resolved an issue where the player would be detected as weapon hacking when jumping out of an aircraft |
Version 1.3 | Resolved an issue where the player would be detected as fly hacking when swimming in a pool |
Version 1.2 | Resolved an issue where the player could be detected as bunny hopping when flying |
Version 1.2 | Resolved an issue where the player could be detected as speed hacking when falling in a car |
Version 1.2 | Better AFK detection (now detects position changes) |
Version 1.2 | Users will no longer have to change GivePlayerWeapon and SetVehicleHealth in their script |
Version 1.2 | Added health and armor hack detection |
Version 1.1 | When a player swears, it will no longer automatically block the chat message |
Version 1.1 | Resolved an issue where players couldn't talk if swearing detection was on |
Version 1.1 | Resolved an issue where CHEAT_TABBED would be called for the player upon connecting |
Version 1.1 | Added ninjajack detection |
Version 1.1 | Added two optional commands, /acstats and /hh |
Version 1.0 | Created the script |
Using
To begin using this include, drag the file to your pawno > includes folder and put
pawn Код:
#include <svCheats>
Add the following code somewhere in your script:
pawn Код:
public svCheats_OnPlayerCheatUpdate(playerid, cheatid)
{
switch(cheatid)
{
case CHEAT_HIGH_PING:
{
}
case CHEAT_WEAPON_SPAWN:
{
}
case CHEAT_SPEED_HACK:
{
}
case CHEAT_JETPACK_HACK:
{
}
case CHEAT_DRIVEBY:
{
}
case CHEAT_DDRIVEBY:
{
}
case CHEAT_SWEARING:
{
}
case CHEAT_AIRBREAK_HACK:
{
}
case CHEAT_BUNNYHOP:
{
}
case CHEAT_FLY_HACK:
{
}
case CHEAT_TELEPORT_HACK:
{
}
case CHEAT_VEHICLE_REPAIR:
{
}
case CHEAT_CHATSPAM:
{
}
case CHEAT_AFK:
{
}
case CHEAT_TABBED:
{
}
case CHEAT_GODMODE:
{
}
case CHEAT_NINJAJACK:
{
}
case CHEAT_HEALTHHACK:
{
}
case CHEAT_CARRAM:
{
}
case CHEAT_HELIBLADE:
{
}
case CHEAT_VEHMOD:
{
}
case CHEAT_SERVERAD:
{
}
case CHEAT_FAKEPLAYER:
{
}
case CHEAT_FAKEKILL:
{
}
case CHEAT_REMOTEJACK:
{
}
case CHEAT_INVALIDMOD:
{
}
case CHEAT_LOCKEDVEH:
{
}
case CHEAT_SPAMKILL:
{
}
}
return 1;
}
Credits
SuperViper - Creating the script
Cody Jones - Helping test the script
****** - foreach and y_hooks
Zeex - ZCMD