06.07.2013, 23:08
(
Последний раз редактировалось SuperViper; 03.01.2015 в 00:06.
)
I DON'T CODE FOR/PLAY SAMP ANYMORE, THIS IS PROBABLY VERY BUGGY AND WILL NOT WORK. DO NOT EXPECT ANY UPDATES.
Introduction
FairPlay will help you get rid of the cheaters on your server. I designed it to be easy to use while still being very effective. While it may not detect everything to the fullest extent, it won't give you any false positives.
Required Libraries
To use FairPlay, you must be running sscanf version 2 on your server. If you currently do not have sscanf, you may download it here: https://sampforum.blast.hk/showthread.php?tid=120356
Staff Member Immunity
You might be wondering how to prevent your staff members from getting detected by FairPlay. Well it's simple. You can use the custom SetPlayerFairPlayImmune function after stats are loaded to make a player immune to FairPlay detection.
Example:
Of course you will need to change the playerStaffLevel variable in that example to fit your needs, but you get the point.
Including
To add FairPlay to your script you must download FairPlay.inc and place it in your pawno => include folder. Once you have placed the file in the correct folder, you must add
to the top of your script.
If you are using this in a gamemode, you must put
before including FairPlay.
After Including
After including FairPlay into your script, you will need to add the following callback somewhere in your script:
Every time unfair play is detected, that callback will be called. playerid is the player who is playing unfairly and playType is what the player is doing that is unfair.
Possible playType Values
This is a list of all possible values that playType can be along with a description of when it's called.
* = Will not be called in OnPlayerUnfairPlay
** = Curse words are automatically converted to * characters
*** = Messages with server advertisements will not be sent
Avoiding Filterscript Conflicts
In order to avoid conflicts with other filterscripts forcing FairPlay to give off false positives, you must include this in all loaded filterscripts.
Settings
If you would like to disable detection for anything, you may comment out the line of where the playType is defined.
For example, if you would like to disable checking tabbed players, you would comment out the following line:
There are also some settings that you can change under all of the unfair play definitions.
FP_TIMER_INTERVAL: This is the interval at which the per-player timer will repeat itself. It is recommended that you do not change this unless you know what you are doing.
FP_MAX_PING: This is the maximum amount of ping a user may have before a ping warning is given to them.
FP_DRIVEBY_WEAPONS: These are the weapons (separated with a space) with which a user can driveby with.
FP_SERVER_IP: This is your server IP.
FP_SERVER_DOMAIN: This is your server domain.
FP_CurseWords: This is a list of words (separated by a comma) which are censored and reported as swearing when said.
Issues and Suggestions
If you happen to find an issue with FairPlay or would like to suggest a new feature or to change an existing feature, please reply to this thread with your request and I will get to it shortly.
Download
Version 1.2: Pastebin - Mediafire - Puush
Version 1.1: Pastebin - Mediafire - Puush
Version 1.0: Pastebin - Mediafire - Puush
Changelog
Credits
Scripting: SuperViper/Ricky Phelps
Testing: Chriham3/Alex Shock
Introduction
FairPlay will help you get rid of the cheaters on your server. I designed it to be easy to use while still being very effective. While it may not detect everything to the fullest extent, it won't give you any false positives.
Required Libraries
To use FairPlay, you must be running sscanf version 2 on your server. If you currently do not have sscanf, you may download it here: https://sampforum.blast.hk/showthread.php?tid=120356
Staff Member Immunity
You might be wondering how to prevent your staff members from getting detected by FairPlay. Well it's simple. You can use the custom SetPlayerFairPlayImmune function after stats are loaded to make a player immune to FairPlay detection.
Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(playerStaffLevel[playerid])
{
SetPlayerFairPlayImmune(playerid, 1);
}
return 1;
}
Including
To add FairPlay to your script you must download FairPlay.inc and place it in your pawno => include folder. Once you have placed the file in the correct folder, you must add
pawn Код:
#include <FairPlay>
If you are using this in a gamemode, you must put
pawn Код:
#define FP_MASTER
After Including
After including FairPlay into your script, you will need to add the following callback somewhere in your script:
pawn Код:
public OnPlayerUnfairPlay(playerid, playType)
{
switch(playType)
{
case FP_HIGH_PING:
{
}
case FP_WEAPON_HACK:
{
}
case FP_VEHICLE_SPEED_HACK:
{
}
case FP_JETPACK_HACK:
{
}
case FP_SWEARING:
{
}
case FP_FLY_HACK:
{
}
case FP_CHAT_SPAM:
{
}
case FP_AFK:
{
}
case FP_TABBING:
{
}
case FP_NINJA_JACK:
{
}
case FP_CAR_RAM:
{
}
case FP_HELIBLADE:
{
}
case FP_VEHICLE_MOD_HACK:
{
}
case FP_SERVER_AD:
{
}
case FP_FAKE_KILL:
{
}
case FP_TELEPORT_HACK:
{
}
}
return 1;
}
Possible playType Values
This is a list of all possible values that playType can be along with a description of when it's called.
playType | Description |
FP_HIGH_PING | When the player has reached 3 warnings for having a ping above FP_MAX_PING |
FP_WEAPON_HACK | When the player fires a weapon that was not given to them from the script |
FP_VEHICLE_SPEED_HACK | When a vehicle passes it's speed limit |
FP_JETPACK_HACK | When the player has a jetpack which was not given to them from the script |
FP_DRIVER_DRIVEBY* | Preventing driver drivebys |
FP_DRIVEBY_WEAPONS_RESTRICT* | Restricting driveby weapons to the ones specified in FP_DRIVEBY_WEAPONS |
FP_SWEARING** | When a player says a word that is defined in FP_CurseWords either in a command or in the chat |
FP_FLY_HACK | When a player is flying |
FP_CHAT_SPAM | When a player spams the chat or commands in a short period of time |
FP_AFK | When a player hasn't said anything in the chat, used a command, or moved in 5 minutes |
FP_TABBING | When a player is tabbed out of the game |
FP_NINJA_JACK | When a player jacks a vehicle from another player in a certain way which results in the original driver dying |
FP_CAR_RAM | When a player rams another player with a vehicle |
FP_HELIBLADE | When a player kills another player using the blades of his helicopter |
FP_VEHICLE_MOD_HACK | When a player modifies their vehicle outside of a tuning garage |
FP_SERVER_AD*** | When a player says a server's IP or domain in chat or a command and the IP and/or domain don't correspond to FP_SERVER_IP and FP_SERVER_DOMAIN |
FP_FAKE_KILL | When a player uses a cheat to fake a kill by another player |
FP_TELEPORT_HACK | When a player teleports to a far away location |
** = Curse words are automatically converted to * characters
*** = Messages with server advertisements will not be sent
Avoiding Filterscript Conflicts
In order to avoid conflicts with other filterscripts forcing FairPlay to give off false positives, you must include this in all loaded filterscripts.
Settings
If you would like to disable detection for anything, you may comment out the line of where the playType is defined.
For example, if you would like to disable checking tabbed players, you would comment out the following line:
pawn Код:
#define FP_TABBING (11)
FP_TIMER_INTERVAL: This is the interval at which the per-player timer will repeat itself. It is recommended that you do not change this unless you know what you are doing.
FP_MAX_PING: This is the maximum amount of ping a user may have before a ping warning is given to them.
FP_DRIVEBY_WEAPONS: These are the weapons (separated with a space) with which a user can driveby with.
FP_SERVER_IP: This is your server IP.
FP_SERVER_DOMAIN: This is your server domain.
FP_CurseWords: This is a list of words (separated by a comma) which are censored and reported as swearing when said.
Issues and Suggestions
If you happen to find an issue with FairPlay or would like to suggest a new feature or to change an existing feature, please reply to this thread with your request and I will get to it shortly.
Download
Version 1.2: Pastebin - Mediafire - Puush
Version 1.1: Pastebin - Mediafire - Puush
Version 1.0: Pastebin - Mediafire - Puush
Changelog
Quote:
Version 1.2 (critical update) has been released:
- Added another method to fake kill detection |
Quote:
Version 1.1 has been released:
- Messages that contain server advertisements are now automatically not sent |
Scripting: SuperViper/Ricky Phelps
Testing: Chriham3/Alex Shock