05.12.2010, 04:57
(
Последний раз редактировалось MW2_OWN3D; 05.12.2010 в 16:29.
)
OWN3D Anticheat
v1.0
This is my attempt at anticheat. It works when stuff changes that anticheat wasn't told about. Basically, it is server-side stored commands.
Features:
OWN3D Anticheat Checks:
-health
-armour
-money
-weapons
-ammo
-vehicle health
OWN3D Anticheat gives you the ability to kick, ban, message everyone about the detection, or just set their conflicts back to the server stored values.
How to Use:
Detection Options:
Open anticheat.inc. DETECTEDACTION defines what happens when a player gets detected. Check below it for options and how to change them.
Join Message:
Open anticheat.inc. JOINMESSAGE defines what message displays when a player connects. Check below it before changing it.
Checking Delay:
Open anticheat.inc. Number of seconds between checking for cheats. Check below it before changing it.
Add '#include <anticheat>' at the top of your script
Add/merge the following under public OnPlayerStateChange(playerid, newstate, oldstate):
Add/merge the following under public OnPlayerConnect(playerid):
Add/merge the following under public OnPlayerDeath(playerid, killerid, reason):
Add/merge the following under public OnGameModeInit():
Add/merge the following under public OnPlayerSpawn(playerid):
Add/merge the following under public OnPlayerCommandText(playerid, cmdtext[]):
For debug/testing cmds, check the debug_add_to_gamemode text file.:
Replace the following lines with the OWN3D Anticheat versions:
NOTE: Replace all GivePlayerMoney(playerid,-amount) with:
NOTE: Make a folder called 'own3danticheat' in scriptfiles, or your server will crash as soon as it detects a cheater.
New Functions:
acSetPlayerMoney(playerid, amount);
acGetPlayerWeapon(playerid, slot);
acGetPlayerAmmo(playerid, slot);
Enjoy!
If you download this script, you agree that you won't faggotsteal it and you will make the creator's name visible on your server (/oac command).
v1.0
This is my attempt at anticheat. It works when stuff changes that anticheat wasn't told about. Basically, it is server-side stored commands.
Features:
OWN3D Anticheat Checks:
-health
-armour
-money
-weapons
-ammo
-vehicle health
OWN3D Anticheat gives you the ability to kick, ban, message everyone about the detection, or just set their conflicts back to the server stored values.
How to Use:
Detection Options:
Open anticheat.inc. DETECTEDACTION defines what happens when a player gets detected. Check below it for options and how to change them.
Join Message:
Open anticheat.inc. JOINMESSAGE defines what message displays when a player connects. Check below it before changing it.
Checking Delay:
Open anticheat.inc. Number of seconds between checking for cheats. Check below it before changing it.
Add '#include <anticheat>' at the top of your script
Add/merge the following under public OnPlayerStateChange(playerid, newstate, oldstate):
Код:
new Float:tmphealth; if(newstate == PLAYER_STATE_DRIVER) { acVehicleID[playerid] = GetPlayerVehicleID(playerid); GetVehicleHealth(GetPlayerVehicleID(playerid),tmphealth); if(tmphealth > 1000) { SetVehicleHealth(GetPlayerVehicleID(playerid),999); acVehicleHealth[GetPlayerVehicleID(playerid)] = 999; SetTimer("vehiclehealthnormal",CHECKDELAY*1000+1000,false); } else { GetVehicleHealth(GetPlayerVehicleID(playerid),acVehicleHealth[GetPlayerVehicleID(playerid)]); } }
Код:
acPlayerMoney[playerid] = 0; acResetPlayerWeapons(playerid); detectenabled[playerid] = true; playerspawned[playerid] = false; if(strlen(JOINMESSAGE) > 0) SendClientMessage(playerid,COLOR_YELLOW,JOINMESSAGE);
Код:
playerspawned[playerid] = false;
Код:
SetTimer("anticheat",CHECKDELAY*1000,1);
Код:
acPlayerHealth[playerid] = 100; acPlayerArmour[playerid] = 0; playerspawned[playerid] = true;
Код:
if(!strcmp("/oac", cmdtext, true)) { SendClientMessage(playerid,COLOR_YELLOW,"Server uses OWN3D Anticheat. Coded by MW2_OWN3D."); SendClientMessage(playerid,COLOR_YELLOW,"Email: mw2_own3d[at]live[dot]com"); return 1; }
Replace the following lines with the OWN3D Anticheat versions:
Код:
GetVehicleHealth(vehicleid, health) - health = acGetVehicleHealth(vehicleid); SetVehicleHealth(vehicleid, health) - acSetVehicleHealth(vehicleid, health); GetPlayerHealth(playerid, health) - health = acGetPlayerHealth(playerid); SetPlayerHealth(playerid, health) - acSetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour) - armour = acGetPlayerArmour(playerid); SetPlayerArmour(playerid, armour) - acSetPlayerArmour(playerid, armour); GetPlayerMoney(playerid) - acGetPlayerMoney(playerid); GivePlayerMoney(playerid, amount) - acGivePlayerMoney(playerid, amount); ResetPlayerMoney(playerid) - acResetPlayerMoney(playerid); GivePlayerWeapon(playerid, weaponid, ammo) - acGivePlayerWeapon(playerid, weaponid, ammo); ResetPlayerWeapons(playerid) - acResetPlayerWeapons(playerid);
Код:
acTakePlayerMoney(playerid, amount);
New Functions:
acSetPlayerMoney(playerid, amount);
acGetPlayerWeapon(playerid, slot);
acGetPlayerAmmo(playerid, slot);
Enjoy!
If you download this script, you agree that you won't faggotsteal it and you will make the creator's name visible on your server (/oac command).