помогите с бан системой очень нужно

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
9
Реакции
-2
Помог
1 раз(а)
Ошибка
античит не хочет банить с FreshBanom и с другими бан системами, он только делает логи, а быть он банит толка с бансистемой mdbBanSystem.amxx МОЖНО КАК ТО его переделать
ОС
Windows
Amx Mod X
AMX Mod X 1.9.0.5249 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 19 2019 13:32:02
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34e
Build ID: 5249:6cecb34e
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.6.0.672-dev
Build date: 17:31:06 Jun 5 2019 (1880)
Build from: https://github.com/dreamstalker/rehlds/commit/0c8d3d7
ReGamedll
ReGameDLL version: 5.9.0.363-dev
Build date: 18:17:20 Jul 8 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/75bdc26
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:14 EET (optimized)
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - safenameandchat. v1.1 ini ANY ANY
[ 2] VoiceTranscoder RUN - voicetranscoder. v2017RC3 ini ANY ANY
[ 3] Reunion RUN - reunion_mm.dll v0.1.0.9 ini Start Never
[ 4] ReAuthCheck RUN - reauthcheck_mm.d v0.1.6 ini Start Never
[ 5] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5 ini Start ANY
[ 6] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm.dll v1.5.696 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm.dl v2.3.9 ini Chlvl ANY
[ 9] AGuard RUN - aguard_mm.dll v1.6 ini Chlvl Never
[10] CStrike RUN - cstrike_amxx.dll v1.9.0.5 pl5 ANY ANY
[11] CSX RUN - csx_amxx.dll v1.9.0.5 pl5 ANY ANY
[12] MySQL RUN - mysql_amxx.dll v1.9.0.5 pl5 ANY ANY
[13] SQLite RUN - sqlite_amxx.dll v1.9.0.5 pl5 ANY ANY
[14] Engine RUN - engine_amxx.dll v1.9.0.5 pl5 ANY ANY
[15] ReAPI RUN - reapi_amxx.dll v5.9.0.1 pl5 ANY Never
[16] ReAimDetector RUN - reaimdetector_am v0.2.2 pl5 ANY Never
[17] FakeMeta RUN - fakemeta_amxx.dl v1.9.0.5 pl5 ANY ANY
[18] GeoIP RUN - geoip_amxx.dll v1.9.0.5 pl5 ANY ANY
[19] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl5 ANY ANY
[20] Fun RUN - fun_amxx.dll v1.9.0.5 pl5 ANY ANY
20 plugins, 20 running
Список плагинов
name                    version     author            file             status
[ 1] FreshBans 1.4.0b kanagava fresh_bans_1.4. running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 4] unknown unknown unknown mapchooser_2.6 bad load
[ 5] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 6] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 7] Players Menu 1.7 neugomon players_menu.am running
[ 8] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 9] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 10] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 11] Restrict Weapons 1.9.0.5249 AMXX Dev Team restmenu.amxx running
[ 12] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 13] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 14] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 15] Say Me & Hp 1.0 Hypa_[KZ] say_me_and_hp.a running
[ 16] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 17] Anti Radio Flood 1.0 Leo_[BH] & AMXX anti_radio_floo running
[ 18] Anti Spam FlashLight 1.3 Leo_[BH] anti_spam_flash running
[ 19] Weapon Icon 1.0 Zenix weapon_icon.amx running
[ 20] HS_Blood 1.1 tuty hs_blood.amxx running
[ 21] Auto Restart 1.0.3 neygomon auto_rr.amxx running
[ 22] DemoRecoder 1.2 neygomon demorecoder.amx running
[ 23] Menus Front-End 1.5 neugomon menufront_end.a running
[ 24] MenuGen 1.0 CrAsH MenuGen.amxx running
[ 25] unknown unknown unknown re_ideal_vip.am bad load
[ 26] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 27] WeaponMenu 1.1 neygomon wmenu.amxx running
[ 28] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 29] ScreenMaker 1.1 neygomon screen_maker.am running
[ 30] Log Connect 1.0 Leo_[BH] log_connect.amx running
[ 31] Fire in the hole 0.1 VEN fire_in_the_hol running
[ 32] Screen_Fade 0.0.5 Vaqtincha screen_fade.amx running
[ 33] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 34] Ping Control 0.3 neygomon ping_control.am running
[ 35] unknown unknown unknown damager.amxx bad load
[ 36] ResetScore and GameNam 1.0 Phantom rs_and_game_nam running
[ 37] Top Awards 0.11c Safety1st top_awards.amxx running
[ 38] Parachute 1.1 ReHLDS Team parachute.amxx running
[ 39] Advert Messages 1.2.2 neygomon adverts.amxx error
[ 40] HUD_Adverts_Deads 1.3.1 pUzzlik hud_message_dea running
[ 41] Block Advert 1.4 neygomon block_advert.am running
[ 42] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 43] Spect Bot 1.4 Jack Daniel`s spect_bot.amxx running
[ 44] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 45] RC BaseChanger 1.0 AMXX rc_basechanger. running
[ 46] ReChecker Logging 1.0 AMXX rc_logging.amxx running
[ 47] Anti-cheat 7.1 KZ Anticheat-exclu running
[ 48] Anti-cheat 7.1 KZ Anticheat.amxx running
[ 49] Knife Round 2.0 Juice SWAP.amxx running
[ 50] Spec Switch 0.1.3 many Spec_Switch.amx running
[ 51] Block WallHack 2019 MaVo block_wallhack. running
[ 52] WH Blocker 2.0 MaVo wh_blocker.amxx running
[ 53] AGuard plugin 1.1 Nikolay <SpooK> aguard-plugin.a running
[ 54] Loading Sound 1.0 Amxx User loadingsound.am running
[ 55] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 56] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 57] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 58] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 59] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
( 4) Load fails: Plugin file open error (plugin "mapchooser_2.6")
( 25) Load fails: Plugin file open error (plugin "re_ideal_vip.amxx")
( 35) Load fails: Plugin file open error (plugin "damager.amxx")
( 39) Error: File "addons/amxmodx/configs/adverts.ini" not found!
59 plugins, 55 running
Автор плагина
Ranarrr
Версия плагина
rAntiCheat v1.7
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>
#include <engine>

#pragma tabsize 0

/*
IDEA CENTER:
*******************************
***** TIME FOR CLEANING!! *****
*******************************

| root -|
|- Bhop -|
|- Look at how jwj works, even jumps or uneven jumps, or both, if both, you can't detect em, but they should be even.
|- Gstrafe |
|- Same here as the one above on Bhop. dwd scripts.

stock LogPlayer(id, szFmt[], any: ...)
{
new iFile;
if ((iFile = fopen(g_szLogFile, "a")))
{
new szTime[22], szName[MAX_NAME_LENGTH], szAuthID[32], szIP[32], szMessage[256];

get_time("%m/%d/%Y - %H:%M:%S", szTime, charsmax(szTime));
get_user_name(id, szName, MAX_NAME_LENGTH - 1);
get_user_authid(id, szAuthID, charsmax(szAuthID));
get_user_ip(id, szIP, charsmax(szIP), 1);

vformat(szMessage, charsmax(szMessage), szFmt, 3);

fprintf(iFile, "L %s: %s<%s><%s> %s^n", szTime, szName, szAuthID, szIP, szMessage);
fclose(iFile);
}
}
*/
/*
0 for alpha (status)
1 for beta (status)
2 for release candidate
3 for (final) release

r = Release
rc = Release Candidate ( meaning possible release version )
a = alpha
b = beta
*/

#define PLUGIN "rAntiCheat"
#define VERSION "1.7"
#define AUTHOR "Ranarrr"

#define magicmovevar 0.704 // 0.707106812

new g_CheckCvar[][] = {
"fps_max","fps_modem","fps_override","cl_sidespeed","sv_cheats","cl_pitchspeed",
"cl_forwardspeed","cl_backspeed","cl_yawspeed","developer","cl_filterstuffcmd"
};

new g_DefaultCvar[][] = {
"fps_max 99.5","fps_modem 0","fps_override 0","cl_sidespeed 400",
"cl_forwardspeed 400","cl_backspeed 400","cl_yawspeed 210","developer 0","cl_pitchspeed 225"
};

new bStrafeOn[33], bPluginPause, bBanned[33];

new Float:m_mx[33], Float:m_yaw[33], Float:m_oldyaw[33], Float:m_oldmx[33];

// For logging a player
new isbeinglogged[33], timetolog[33];

// Detection vars
new helperdetbuttons[33], helperdet[33], scriptdet[33], newstrdet[33], advhelperdet[33], filterstrdet[33]
, strafedetside[33], strafedetforward[33], perfbhopdet1[33], perfbhopdet2[33][2], scriptdet2[33], newstr2det[33];

// bhop variables
new Float:perfbhoppercent[33];
new numbhops[33], numbhops100[33];
// JWJ variables
new NoJumpFrames[33], JWJJumps[33];
// ---------------

// JumpBug detection
new bWouldTakeDMG[33], JumpTiming[33][2], DuckTiming[33][2], Float:flHadChance[33];
new Float:averagefps[33];
new averagefpsnum[33];
new Float:FPSToAverage[33][32];
new Float:DistToAvg[33][32];
// ----------------------------

// Movement
new Float:flForwardMove[33], Float:flSideMove[33];
new Float:flOldForwardmove[33], Float:flOldSideMove[33];
// --------------

// FPS
new Float:UserFPS[33], Float:AVGFPS[33][2];
// -------------------------

public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR );

register_forward( FM_CmdStart, "Player_CmdStart" );
register_forward( FM_PlayerPreThink, "Player_PreThink" );
register_forward( FM_PlayerPostThink, "Player_PostThink" );

bPluginPause = false;

register_clcmd( "rRP", "startrecord", ADMIN_BAN, "Record player movement (sidemove, forwardmove, keys, duck and jump)" );
register_clcmd( "rSRP", "stoprecord", ADMIN_BAN, "Stops recording specific player." );

RegisterHam( Ham_Spawn, "player", "player_spawn", 1 );
RegisterHam( Ham_Killed, "player", "player_spawn", 1 );

set_task( 1.0, "check_cvars", 0, "", 0, "b" );
set_task( 10.0, "bugfix", 0, "", 0, "d" );
return;
}

public Player_PreThink( id ) {
if( !is_user_alive( id ) || pev( id, pev_flags ) & FL_FROZEN || pev( id, pev_maxspeed ) < 210.0 || pev( id, pev_maxspeed ) > 260 || ( get_user_team( id ) != 1 && get_user_team( id ) != 2 )
|| is_user_bot( id ) || bBanned[id] )
return;

static buttons, oldbuttons[33], flags, oldflags[33];
buttons = pev( id, pev_button );
flags = pev( id, pev_flags );

static Float:flClientOldSpeed[33];
new Float:angles[3], Float:oldangles[3];
pev( id, pev_angles, angles );
m_yaw[id] = angles[1];

m_mx[id] = m_yaw[id] - m_oldyaw[id];

if( m_yaw[id] > 0 ) {
m_mx[id] -= m_mx[id] * 2;
}

// -1 == left, 1 == right
if( m_oldyaw[id] < 0 && m_yaw[id] > 0 && m_oldyaw[id] < -170 ) {
m_mx[id] = 1.0;
}
if(m_oldyaw[id] > 0 && m_yaw[id] < 0 && m_oldyaw[id] > 170 ) {
m_mx[id] = -1.0;
}

if( m_mx[id] == m_oldmx[id] && ( flForwardMove[id] != 0 && flSideMove[id] != 0 ) )
bStrafeOn[id] = true;
else if( m_mx[id] != m_oldmx[id] && ( flForwardMove[id] != 0 && flSideMove[id] != 0 ) )
bStrafeOn[id] = false;

new Float:flSpeed[3];
pev( id, pev_velocity, flSpeed );

// Detecting jumpbug hack
// Some credit: NumB
if( DuckTiming[id][0] != 1 ) {
if( oldbuttons[id] & IN_DUCK && !( buttons & IN_DUCK ) ) {
DuckTiming[id][1] = -1;
DuckTiming[id][0] = 1;
}
}
if( DuckTiming[id][0] )
++DuckTiming[id][1];
if( buttons & IN_DUCK )
DuckTiming[id][0] = -1;

// ----------------

if( JumpTiming[id][0] != 1 ) {
if( !( oldbuttons[id] & IN_JUMP ) && buttons & IN_JUMP ) {
JumpTiming[id][1] = -1;
JumpTiming[id][0] = 1;
}
}

if( JumpTiming[id][0] )
++JumpTiming[id][1];
if( !( buttons & IN_JUMP ) )
JumpTiming[id][0] = -1;

// ----------------

if( flSpeed[2] <= -500.0 ) {
bWouldTakeDMG[id] = true;

if( pev( id, pev_flags ) & FL_DUCKING ) {
static Float:flOrigin[3], Float:flOrigin2[3], Float:flUserOrigin[3];
pev( id, pev_origin, flOrigin );
flUserOrigin = flOrigin;

flHadChance[0] = ( 36.0 - 2.0 + 0.03125 ); //36.03125;
flOrigin2 = flOrigin;
flOrigin2[2] -= ( flHadChance[0] * 2.0 );
engfunc( EngFunc_TraceLine, flOrigin, flOrigin2, DONT_IGNORE_MONSTERS, id, 0 );
flOrigin2[2] += flHadChance[0];
get_tr2( 0, TR_flFraction, flUserOrigin[0] );
if( flUserOrigin[0] <= 0.5 ) {
get_tr2( 0, TR_vecEndPos, flOrigin );
flOrigin[0] = ( flOrigin[2] - flOrigin2[2] );
flOrigin[1] = ( flOrigin2[2] - flOrigin[2] );

if( flOrigin[0] <= ( 2.0 - 0.03125 ) && flOrigin[0] >= 0.0 ) {
flHadChance[id] = flOrigin[0];
flHadChance[0] = ( flSpeed[2] * -1.0 );
} else if( flOrigin[1] <= 0.03125 && flOrigin[1] >= 0.0 ) {
flHadChance[id] = flOrigin[1];
flHadChance[0] = ( flSpeed[2] * -1.0 );
}
}

if( flHadChance[id] == 0.0 ) {
if( flUserOrigin[0] != 1.0 ) {
get_tr2( 0, TR_vecEndPos, flOrigin );
}
}
}

flHadChance[0] = flClientOldSpeed[id] = ( flSpeed[2] * -1.0 );

} else {
flHadChance[0] = flClientOldSpeed[id];
flClientOldSpeed[id] = 0.0;

if( bWouldTakeDMG[id] )
{
if( DuckTiming[id][0] && DuckTiming[id][1] )
--DuckTiming[id][1];
else
DuckTiming[id][0] = 0;

if( JumpTiming[id][0] && JumpTiming[id][1] )
--JumpTiming[id][1];
else
JumpTiming[id][0] = 0;
}

bWouldTakeDMG[id] = false;
flHadChance[id] = 0.0;

DuckTiming[id][1] = 0;
JumpTiming[id][1] = 0;

DuckTiming[id][0] = 0;
JumpTiming[id][0] = 0;
}
// ----------------------------------

flSpeed[2] = 0.0;

// Bhop detection by perfect bhops
if( pev( id, pev_movetype ) != MOVETYPE_FLY ) {
static groundframe[33];

if( flags & FL_ONGROUND )
++groundframe[id];
else
groundframe[id] = 0;

if( groundframe[id] <= 5 && groundframe[id] > 0 && buttons & IN_JUMP && ~oldbuttons[id] & IN_JUMP )
++numbhops[id];

if( ~oldflags[id] & FL_ONGROUND & flags & FL_ONGROUND && ~oldbuttons[id] & IN_JUMP && buttons & IN_JUMP && vector_length( flSpeed ) < ( pev( id, pev_maxspeed ) * 1.2 ) ) {
++perfbhopdet1[id];
perfbhoppercent[id] = ( ( float( perfbhopdet1[id] ) / float( numbhops[id] ) ) * 100.0 );

if( numbhops[id] > 99 ) {
++numbhops100[id];
if( perfbhoppercent[id] > 72.0 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Bhop hack (#0001) detected on player %s, IP: %s, SteamID: %s, numbhops: %d, perfpercent: %f, numbhops100: %d", name, IPaddr, SteamID, numbhops[id], perfbhoppercent[id], numbhops100[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0001) detected!^"", get_user_userid( id ) );
}

perfbhoppercent[id] = 0.0;
perfbhopdet1[id] = 0;
numbhops[id] = 0;
}
}

if( vector_length( flSpeed ) >= ( pev( id, pev_maxspeed ) * 1.2 ) && groundframe[id] == 3 && buttons & IN_JUMP ) {
++perfbhopdet1[id];
perfbhoppercent[id] = ( ( float( perfbhopdet1[id] ) / float( numbhops[id] ) ) * 100.0 );

if( ( ++perfbhopdet2[id][0] % 15 ) == 0 ) {
if( ++perfbhopdet2[id][1] >= 3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Bhop hack (#0004) detected on player %s, IP: %s, SteamID: %s, numbhops: %d, perfpercent: %f, numbhops100: %d", name, IPaddr, SteamID, numbhops[id], perfbhoppercent[id], numbhops100[id] );

isbeinglogged[id] = true;
timetolog[id] = 5000;

//bBanned[id] = true;

//server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0004) detected!^"", get_user_userid( id ) );
}
}

if( numbhops[id] > 99 ) {
++numbhops100[id];
if( perfbhoppercent[id] > 72.0 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Bhop hack (#0002) detected on player %s, IP: %s, SteamID: %s, numbhops: %d, perfpercent: %f, numbhops100: %d", name, IPaddr, SteamID, numbhops[id], perfbhoppercent[id], numbhops100[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0002) detected!^"", get_user_userid( id ) );
}

perfbhoppercent[id] = 0.0;
perfbhopdet1[id] = 0;
numbhops[id] = 0;
}
} else {
perfbhopdet2[id][0] = 0;
}
}
// ----------------------------

// HPP bhop hack detect
/*static lastjump[33], bhophppdet[33];

if( ~buttons & IN_JUMP && ~oldbuttons[id] & IN_JUMP )
++lastjump[id];

if( buttons & IN_JUMP && ~oldbuttons[id] & IN_JUMP && lastjump[id] >= 4 ) {
lastjump[id] = 0;

if( distance_to_ground( id ) <= 6 ) {
if( ++bhophppdet[id] > 10 ) {
bhophppdet[id] = 0;

new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Bhop hack (#0005) detected on player %s, IP: %s, SteamID: %s", name, IPaddr, SteamID );

bBanned[id] = true;

//ColorChat( 0, NORMAL, "[^x03rAnti-Cheat^x01] Bhop hack (#0005) detected on player %s!", name )

//server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0005) detected!^"", get_user_userid( id ) );
}
} else
bhophppdet[id] = 0;
}*/
// --------------------------

// Bhop detection by jwj / true wait false wait true bhop hacks
if( buttons & IN_JUMP && ~oldbuttons[id] & IN_JUMP ) {
NoJumpFrames[id] = 0;

++JWJJumps[id];

if( JWJJumps[id] >= 30 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Bhop hack (#0003) detected on player %s, IP: %s, SteamID: %s", name, IPaddr, SteamID );

isbeinglogged[id] = true;
timetolog[id] = 5000;

//bBanned[id] = true;
JWJJumps[id] = 0;

//server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0003) detected!^"", get_user_userid( id ) );
}
} else {
++NoJumpFrames[id];

if( NoJumpFrames[id] >= 5 ) {
JWJJumps[id] = 0;
}
}
// ------------------------------------

// Strafe script detect no movement on pitch axis
if( ( buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT || buttons & IN_FORWARD || buttons & IN_BACK ) && ~flags & FL_ONGROUND && pev( id, pev_movetype ) != MOVETYPE_FLY ) {
if( ( m_mx[id] >= 2.0 || m_mx[id] <= -2.0 ) && angles[0] - oldangles[0] == 0.0 ) {
if( scriptdet2[id] > 15 ) {
client_cmd( id, "-left" );
client_cmd( id, "-right" );
}

if( ++scriptdet2[id] >= 50 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe script (#0002) detected on player %s, IP: %s, SteamID: %s", name, IPaddr, SteamID );

bBanned[id] = true;

server_cmd( "amx_mban #%d 120 ^"[^x03rAnti-Cheat^x01] Strafe script (#0002) detected!^"", get_user_userid( id ) );

scriptdet2[id] = 0;
}
} else
scriptdet2[id] = 0;
}
// ------------------------------------------------

oldangles[0] = angles[0];
oldangles[1] = angles[1];
oldflags[id] = flags;
oldbuttons[id] = buttons;
}

public Player_PostThink( id ) {
if( !is_user_alive( id ) || pev( id, pev_flags ) & FL_FROZEN || pev( id, pev_maxspeed ) < 210.0 || pev( id, pev_maxspeed ) > 260 || ( get_user_team( id ) != 1 && get_user_team( id ) != 2 )
|| is_user_bot( id ) || bPluginPause || bBanned[id] )
return;

/*&& pev( id, pev_button ) & IN_DUCK*/ /*|| pev( id, pev_movetype ) & ( MOVETYPE_FLY | MOVETYPE_NOCLIP )*/

static buttons, oldbuttons[33];
buttons = pev( id, pev_button );

static Float:MovementSqroot;
MovementSqroot = floatsqroot( flForwardMove[id] * flForwardMove[id] + flSideMove[id] * flSideMove[id] );

// Check FPS
static fpsdet[33];

if( UserFPS[id] > 101.0 || UserFPS[id] <= 19.89 ) {
if( ++fpsdet[id] >= 100 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

fpsdet[id] = 0;

log_to_file( "rAntiCheat.log", "FPS %f detected on player %s, IP: %s, SteamID: %s", UserFPS[id], name, IPaddr, SteamID );

bBanned[id] = true;

server_cmd( "amx_mban #%d 120 ^"[^x03rAnti-Cheat^x01] FPS %.2f detected!^"", get_user_userid( id ), UserFPS[id] );
}
} else
fpsdet[id] = 0;
// ---------------------

static Float:fSpeed[3];
pev( id, pev_velocity, fSpeed );

if( UserFPS[id] > 48.0 && UserFPS[id] < 101.0 ) {
AVGFPS[id][0] += UserFPS[id];
++AVGFPS[id][1];
}

// JB detection
if( bWouldTakeDMG[id] ) {
if( distance_to_ground( id ) < ( fSpeed[2] / -10.0 ) ) {
averagefps[id] += UserFPS[id];
FPSToAverage[id][averagefpsnum[id]] = UserFPS[id];
DistToAvg[id][averagefpsnum[id]] = distance_to_ground( id );
++averagefpsnum[id];
}
} else if( !bWouldTakeDMG[id] && averagefpsnum[id] ) {
averagefpsnum[id] = 0;
averagefps[id] = 0.0;
for( new i = 0; i < averagefpsnum[id]; ++i ) {
FPSToAverage[id][i] = 0.0;
DistToAvg[id][i] = 0.0;
}
}

if( bWouldTakeDMG[id] && !( oldbuttons[id] & IN_JUMP ) && buttons & IN_JUMP ) {
JumpTiming[id][1] = 0;

if( oldbuttons[id] & IN_DUCK && !DuckTiming[id][1] ) {
if( !( pev( id, pev_flags ) & FL_DUCKING ) ) {
if( fSpeed[2] > 200.0 ) {
// made jb
static Float:avgfps1[33], Float:avgfps2[33];
avgfps1[id] = ( averagefps[id] / averagefpsnum[id] );
avgfps2[id] = ( AVGFPS[id][0] / AVGFPS[id][1] );

if( avgfps1[id] > 101.6 && averagefpsnum[id] > 1 ) {
new name[32], tempname[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

copy( tempname, charsmax( tempname ), name );
strcat( tempname, "-JB.log", sizeof( tempname ) );
log_to_file( tempname, "Client: %s, %s, %s^n", name, IPaddr, SteamID );
for( new i = 0; i < averagefpsnum[id]; ++i ) {
log_to_file( tempname, "FPS %i: %f, %f", i + 1, FPSToAverage[id][i], DistToAvg[id][i] );
}

log_to_file( "rAntiCheat.log", "JumpBug hack (#0001) detected on player %s, IP: %s, SteamID: %s", name, IPaddr, SteamID );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] JumpBug hack (#0001) detected!^"", get_user_userid( id ) );

} else if( avgfps1[id] < avgfps2[id] - 3.5 && averagefpsnum[id] > 1 ) {
new name[32], tempname[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

copy( tempname, charsmax( tempname ), name );
strcat( tempname, "-JB.log", sizeof( tempname ) );
log_to_file( tempname, "Client: %s, %s, %s^n", name, IPaddr, SteamID );
for( new i = 0; i < averagefpsnum[id]; ++i ) {
log_to_file( tempname, "FPS %i: %f, %f", i + 1, FPSToAverage[id][i], DistToAvg[id][i] );
}

log_to_file( "rAntiCheat.log", "JumpBug hack (#0002) detected on player %s, IP: %s, SteamID: %s", name, IPaddr, SteamID );

bBanned[id] = true;

server_cmd( "amx_mban #%d 300 ^"[^x03rAnti-Cheat^x01] JumpBug hack (#0002) detected!^"", get_user_userid( id ) );
}
}
}
}
}

// -------------------

fSpeed[2] = 0.0;
static value3 = 10;

if( !bStrafeOn[id] ) {
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Strafe helper detector by button checking. idea, no time.
- This works by checking if button presses are active when movement is active, if not, ban.
- If you want to bypass this, just do cmd->buttons |= IN_BUTTON, whenever the correct movement is active.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if ( flSideMove[id] >= ( ( pev( id, pev_maxspeed ) ) * magicmovevar ) && !( buttons & IN_MOVERIGHT ) && vector_length( fSpeed ) > 0 ) {
client_cmd( id, "+mlook" );
if( ++helperdetbuttons[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0001) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0001)^"", get_user_userid( id ) );

helperdetbuttons[id] = 0;
}
} else if( flSideMove[id] <= -( ( pev( id, pev_maxspeed ) ) * magicmovevar ) && !( buttons & IN_MOVELEFT ) && vector_length( fSpeed ) > 0 ) {
client_cmd( id, "+mlook" );
if( ++helperdetbuttons[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0002) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0002)^"", get_user_userid( id ) );

helperdetbuttons[id] = 0;
}
}

if ( flForwardMove[id] >= ( ( pev( id, pev_maxspeed ) ) * magicmovevar ) && ~buttons & IN_FORWARD && vector_length( fSpeed ) > 0 ) {
client_cmd( id, "+mlook" );
if( ++helperdetbuttons[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0003) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0003)^"", get_user_userid( id ) );

helperdetbuttons[id] = 0;
}
} else if( flForwardMove[id] <= -( ( pev( id, pev_maxspeed ) ) * magicmovevar ) && ~buttons & IN_BACK && vector_length( fSpeed ) > 0 ) {
client_cmd( id, "+mlook" );
if( ++helperdetbuttons[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0004) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0004)^"", get_user_userid( id ) );

helperdetbuttons[id] = 0;
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/

/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Simple strafe helper detector
- Just the most simple strafe helper detector. idea, no time.
- This checks limits. You can never have > maxspeed.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
static Float:flMaxSpeed;
pev(id, pev_maxspeed, flMaxSpeed);
if( vector_length( fSpeed ) > 264.0 ) {
if( MovementSqroot > flMaxSpeed || ( MovementSqroot < ( flMaxSpeed * 0.51 ) && MovementSqroot != 0.0 ) || flForwardMove[id] > ( pev( id, pev_maxspeed ) )
|| flSideMove[id] > ( pev( id, pev_maxspeed ) ) || flForwardMove[id] < -( pev( id, pev_maxspeed ) ) || flSideMove[id] < -( pev( id, pev_maxspeed ) ) ) {
if( ++helperdet[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0009) detected on player %s, SteamID: %s, IP: %s", name, SteamID, IPaddr );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0009) detected^"", get_user_userid( id ) );

helperdet[id] = 0;
}
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
} else {
helperdet[id] = 0;
helperdetbuttons[id] = 0;
}

/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Advanced strafe helper idea, no time.
- This works by checking if you are fully pressing one button, you can't be having any other movement.
- So if you press fully D the sidemove is equal to 250.0, thus you can't have any forwardmove.
- Simple fix, don't send any other movement while the other movement is fully active.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if( flSideMove[id] == ( pev( id, pev_maxspeed ) ) && flForwardMove[id] != 0 ) {
if( ++advhelperdet[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0005) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0005)^"", get_user_userid( id ) );

advhelperdet[id] = 0;
}
} else if( flSideMove[id] == -( pev( id, pev_maxspeed ) ) && flForwardMove[id] != 0 ) {
if( ++advhelperdet[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0006) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0006)^"", get_user_userid( id ) );

advhelperdet[id] = 0;
}
}

if( flForwardMove[id] == ( pev( id, pev_maxspeed ) ) && flSideMove[id] != 0 ) {
if( ++advhelperdet[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0007) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0007)^"", get_user_userid( id ) );

advhelperdet[id] = 0;
}
} else if( flForwardMove[id] == -( pev( id, pev_maxspeed ) ) && flSideMove[id] != 0) {
if( ++advhelperdet[id] >= value3 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0008) detected on player %s, SteamID: %s, IP: %s, sidemove: %f, forwardmove: %f", name, SteamID, IPaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper detected (#0008)^"", get_user_userid( id ) );

advhelperdet[id] = 0;
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/


/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Simple logging function, for "recording" a players movement, including jump and ducks.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if( isbeinglogged[id] ) {
static bOnce[33], filename[32], numberofloggedmoves[33];

if( !bOnce[id] ) {
new name[32], ipaddr[32], steamid[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, steamid, charsmax( steamid ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );

new tempname[32];

copy( tempname, sizeof( tempname ), name );

replace_all( name, charsmax( name ), "#", "" );
replace_all( name, charsmax( name ), "+", "" );

copy( filename, sizeof( filename ), name );
strcat( filename, ".log", sizeof( filename ) );

log_to_file( filename, "Client: %s, IP: %s, SteamID: %s^n", tempname, ipaddr, steamid );

bOnce[id] = true;
}

if( numberofloggedmoves[id] > timetolog[id] ) {
isbeinglogged[id] = false;
numberofloggedmoves[id] = 0;
timetolog[id] = 0;
}

log_to_file( filename, "sdmv: %.0f ^t fwmv: %.0f ^t %s %s %s %s ^t %s ^t %s %.2f ^t %.2f"
, flSideMove[id], flForwardMove[id], buttons & IN_FORWARD ? "W" : "-", buttons & IN_MOVELEFT ? "A" : "-", buttons & IN_BACK ? "S" : "-"
, buttons & IN_MOVERIGHT ? "D" : "-", buttons & IN_DUCK ? "DUCK" : "----", buttons & IN_JUMP ? "JUMP" : "----", distance_to_ground( id ), vector_length( fSpeed ) );

++numberofloggedmoves[id];
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/


/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Checks instant button press in other strafing direction.
- Will log player when it detects something suspicious

( P.S This might be buggy, cause it sometimes detect just really good players. ( better to be safe than sorry ) )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
static strafeundetside[33], strafeundetforward[33], value = 4, value2 = 15; // 4 15

if( !( pev( id, pev_flags ) & FL_ONGROUND ) && !isbeinglogged[id] ) {
if( m_mx[id] > 0 ) { // move to the right
if( flSideMove[id] > 0 && flOldSideMove[id] < 0 ) {
if( ++strafedetside[id] > value2 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0010) (CHECK LOGS) detected on player %s, SteamID: %s, IP: %s", name, SteamID, IPaddr );

isbeinglogged[id] = true;
timetolog[id] = 1999;

strafedetside[id] = 0;
}
}

if( flSideMove[id] == 0 ) {
if( ++strafeundetside[id] >= value ) {
strafedetside[id] = 0;
strafeundetside[id] = 0;
}
}

if( flForwardMove[id] > 0 && flOldForwardmove[id] < 0 ) {
if( ++strafedetforward[id] > value2 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0011) (CHECK LOGS) detected on player %s, SteamID: %s, IP: %s", name, SteamID, IPaddr );

isbeinglogged[id] = true;
timetolog[id] = 1999;

strafedetforward[id] = 0;
}
}

if( flForwardMove[id] == 0 ) {
if( ++strafeundetforward[id] > value ) {
strafedetforward[id] = 0;
strafeundetforward[id] = 0;
}
}
} else if( m_mx[id] < 0 ){ // move to the left
if( flSideMove[id] < 0 && flOldSideMove[id] > 0 ) {
if( ++strafedetside[id] > value2 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0012) (CHECK LOGS) detected on player %s, SteamID: %s, IP: %s", name, SteamID, IPaddr );

isbeinglogged[id] = true;
timetolog[id] = 1999;

strafedetside[id] = 0;
}
}

if( flSideMove[id] == 0 ) {
if( ++strafeundetside[id] > value ) {
strafedetside[id] = 0;
strafeundetside[id] = 0;
}
}

if( flForwardMove[id] < 0 && flOldForwardmove[id] > 0 ) {
if( ++strafedetforward[id] > value2 ) {
new name[32], SteamID[32], IPaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_authid( id, SteamID, charsmax( SteamID ) );
get_user_ip( id, IPaddr, charsmax( IPaddr ), 1 );

log_to_file( "rAntiCheat.log", "Strafe helper (#0013) (CHECK LOGS) detected on player %s, SteamID: %s, IP: %s", name, SteamID, IPaddr );

isbeinglogged[id] = true;
timetolog[id] = 1999;

strafedetforward[id] = 0;
}
}

if( flForwardMove[id] == 0 ) {
if( ++strafeundetforward[id] > value ) {
strafedetforward[id] = 0;
strafeundetforward[id] = 0;
}
}
}
if( m_mx[id] == m_oldmx[id] ) {
strafedetside[id] = 0;
strafedetforward[id] = 0;
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/


/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Just a simple strafe script detector on the yaw axis.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
static valueadelay = 50;

if( ~pev( id, pev_flags ) & FL_ONGROUND && m_mx[id] != 0.0 && m_oldmx[id] != 0.0 && pev( id, pev_movetype ) != MOVETYPE_FLY ) {
if( m_mx[id] == m_oldmx[id] && ( m_mx[id] >= 2 || m_mx[id] <= -2 ) ) {
if( scriptdet[id] > 15 ) {
client_cmd( id, "-left" );
client_cmd( id, "-right" );
}

if( ++scriptdet[id] > valueadelay ) {
new name[32];
get_user_name( id, name, charsmax( name ) );

log_to_file( "rAntiCheat.log", "Strafe script (#0001) detected on player %s, m_mx: %f, m_oldmx: %f", name, m_mx[id], m_oldmx[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 120 ^"[^x03rAnti-Cheat^x01] Strafe script (#0001) detected^"", get_user_userid( id ) );

scriptdet[id] = 0;
}
} else
scriptdet[id] = 0;
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/

/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Another new strafe helper 16.01.2017 redone cause it was false detecting filter strafe helper.
- Idea: 13.01.2017, was away, so i couldn't write it. so i notated idea, then made it 15.01.2017, saw some bugs fixed them 16.01.2017 02:40.
- Detects strafe helpers which "filters" bad input.
- Common mistakes with this strafe helper includes ( but is not limited to ):
-> Sets flags, but leaves sidemove/forwardmove to 0. ( this detects that. )
-> Sets sidemove/forwardmove straight from 0 -> 250/-250, leaves the value 200/-200 out of the equation. ( bad mistake coders! )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if( !bStrafeOn[id] ) {
if( buttons & IN_MOVERIGHT && !( buttons & IN_MOVELEFT ) && !( buttons & IN_BACK ) && !( buttons & IN_FORWARD ) && !( flSideMove[id] > 0.0 ) ) {
if( ++filterstrdet[id] > 20 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0015) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f", name, steamid, ipaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0015) detected^"", get_user_userid( id ) );

filterstrdet[id] = 0;
}
} else if( buttons & IN_MOVELEFT && !( buttons & IN_MOVERIGHT ) && !( buttons & IN_BACK ) && !( buttons & IN_FORWARD ) && !( flSideMove[id] < 0.0 ) ) {
if( ++filterstrdet[id] > 20 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0016) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f", name, steamid, ipaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0016) detected^"", get_user_userid( id ) );

filterstrdet[id] = 0;
}
} else if( buttons & IN_FORWARD && !( buttons & IN_BACK ) && !( buttons & IN_MOVELEFT ) && !( buttons & IN_MOVERIGHT ) && !( flForwardMove[id] > 0.0 ) ) {
if( ++filterstrdet[id] > 20 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0017) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f", name, steamid, ipaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0017) detected^"", get_user_userid( id ) );

filterstrdet[id] = 0;
}
} else if( buttons & IN_BACK && !( buttons & IN_FORWARD ) && !( buttons & IN_MOVELEFT ) && !( buttons & IN_MOVERIGHT ) && !( flForwardMove[id] < 0.0 ) ) {
if( ++filterstrdet[id] > 20 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0018) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f", name, steamid, ipaddr, flSideMove[id], flForwardMove[id] );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0018) detected^"", get_user_userid( id ) );

filterstrdet[id] = 0;
}
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/


/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Got this strafe helper idea in the middle of the night working on the anticheat.. ( 16.01.2017 04:24 )
- This works by detecting false button presses made by cheats.
- Works on typical strafe helpers which sends buttons at right timing, but the player keeps strafing, so when strafe helper changes direction
the player doesn't follow, so he presses the other button.
- This is also bad coding from the developers side, you need to block input completely from other side of strafe to avoid being detected on this one.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if( !bStrafeOn[id] ) {
if( buttons & IN_MOVELEFT && buttons & IN_MOVERIGHT && ( flSideMove[id] == pev( id, pev_maxspeed ) || flSideMove[id] == -( pev( id, pev_maxspeed ) ) ) ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );
log_to_file( "rAntiCheat.log", "Strafe helper (#0019) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f %s %s %s %s", name, steamid, ipaddr, flSideMove[id], flForwardMove[id], buttons & IN_FORWARD ? "W" : "-", buttons & IN_MOVELEFT ? "A" : "-", buttons & IN_BACK ? "S" : "-", buttons & IN_MOVERIGHT ? "D" : "-" );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0019) detected^"", get_user_userid( id ) );
} else if( buttons & IN_BACK && buttons & IN_FORWARD && ( flForwardMove[id] == pev( id, pev_maxspeed ) || flForwardMove[id] == -( pev( id, pev_maxspeed ) ) ) ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );
log_to_file( "rAntiCheat.log", "Strafe helper (#0020) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f %s %s %s %s", name, steamid, ipaddr, flSideMove[id], flForwardMove[id], buttons & IN_FORWARD ? "W" : "-", buttons & IN_MOVELEFT ? "A" : "-", buttons & IN_BACK ? "S" : "-", buttons & IN_MOVERIGHT ? "D" : "-" );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0020) detected^"", get_user_userid( id ) );
}

if( buttons & IN_FORWARD && buttons & IN_MOVELEFT && !( buttons & IN_MOVERIGHT ) && !( buttons & IN_BACK ) && ( ( flSideMove[id] == pev( id, pev_maxspeed ) || flSideMove[id] == -( pev( id, pev_maxspeed ) ) )
|| ( flForwardMove[id] == pev( id, pev_maxspeed ) || flForwardMove[id] == -( pev( id, pev_maxspeed ) ) ) ) ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );
log_to_file( "rAntiCheat.log", "Strafe helper (#0021) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f %s %s %s %s", name, steamid, ipaddr, flSideMove[id], flForwardMove[id], buttons & IN_FORWARD ? "W" : "-", buttons & IN_MOVELEFT ? "A" : "-", buttons & IN_BACK ? "S" : "-", buttons & IN_MOVERIGHT ? "D" : "-" );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0021) detected^"", get_user_userid( id ) );
} else if( buttons & IN_BACK && buttons & IN_MOVERIGHT && !( buttons & IN_MOVELEFT ) && !( buttons & IN_FORWARD ) && ( ( flSideMove[id] == pev( id, pev_maxspeed ) || flSideMove[id] == -( pev( id, pev_maxspeed ) ) )
|| ( flForwardMove[id] == pev( id, pev_maxspeed ) || flForwardMove[id] == -( pev( id, pev_maxspeed ) ) ) ) ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );
log_to_file( "rAntiCheat.log", "Strafe helper (#0022) detected on player %s, SteamID: %s, IP: %s, sdmv: %f, fwmv: %f %s %s %s %s", name, steamid, ipaddr, flSideMove[id], flForwardMove[id], buttons & IN_FORWARD ? "W" : "-", buttons & IN_MOVELEFT ? "A" : "-", buttons & IN_BACK ? "S" : "-", buttons & IN_MOVERIGHT ? "D" : "-" );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0022) detected^"", get_user_userid( id ) );
}
}
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/

// New strafe helper 15.01.2017
if( !bStrafeOn[id] ) {
if( !( oldbuttons[id] & IN_BACK ) && !( buttons & IN_BACK ) && !( oldbuttons[id] & IN_MOVELEFT ) && !( buttons & IN_MOVELEFT ) && !( oldbuttons[id] & IN_MOVERIGHT )
&& !( oldbuttons[id] & IN_FORWARD ) && !( buttons & IN_FORWARD ) && buttons & IN_MOVERIGHT && flSideMove[id] == ( pev( id, pev_maxspeed ) ) ) {
if( ++newstrdet[id] > 9 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0023) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0023) detected^"", get_user_userid( id ) );

newstrdet[id] = 0;
}
} else if( !( oldbuttons[id] & IN_BACK ) && !( buttons & IN_BACK ) && !( oldbuttons[id] & IN_MOVELEFT ) && !( oldbuttons[id] & IN_MOVERIGHT ) && !( buttons & IN_MOVERIGHT )
&& !( oldbuttons[id] & IN_FORWARD ) && !( buttons & IN_FORWARD ) && buttons & IN_MOVELEFT && flSideMove[id] == -( pev( id, pev_maxspeed ) ) ) {
if( ++newstrdet[id] > 9 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0024) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0024) detected^"", get_user_userid( id ) );

newstrdet[id] = 0;
}
}

if( !( oldbuttons[id] & IN_BACK ) && !( buttons & IN_BACK ) && !( oldbuttons[id] & IN_MOVELEFT ) && !( buttons & IN_MOVELEFT ) && !( oldbuttons[id] & IN_MOVERIGHT ) && !( buttons & IN_MOVERIGHT )
&& !( oldbuttons[id] & IN_FORWARD ) && buttons & IN_FORWARD && flForwardMove[id] == ( pev( id, pev_maxspeed ) ) ) {
if( ++newstrdet[id] > 9 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0025) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0025) detected^"", get_user_userid( id ) );

newstrdet[id] = 0;
}
} else if( !( oldbuttons[id] & IN_BACK ) && !( oldbuttons[id] & IN_MOVELEFT ) && !( buttons & IN_MOVELEFT ) && !( oldbuttons[id] & IN_MOVERIGHT ) && !( buttons & IN_MOVERIGHT )
&& !( oldbuttons[id] & IN_FORWARD ) && !( buttons & IN_FORWARD ) && buttons & IN_BACK && flForwardMove[id] == -( pev( id, pev_maxspeed ) ) ) {
if( ++newstrdet[id] > 9 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0026) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

bBanned[id] = true;

server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0026) detected^"", get_user_userid( id ) );

newstrdet[id] = 0;
}
}
}
// -----------------------------

/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- New strafe helper idea, got it after testing with senor vac or peersoon.. ( 31.01.2017 21:06 )
- This works by detecting immediate movement, much like #0023 - #0026 does.
- Bypass this by not sending immediately 250/-250 when already doing some strafes. unless it's A D or W S.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/
if( !bStrafeOn[id] && ~pev( id, pev_flags ) & FL_ONGROUND && !isbeinglogged[id] ) {
if( ~oldbuttons[id] & IN_FORWARD && ~oldbuttons[id] & IN_BACK && ~oldbuttons[id] & IN_MOVELEFT && oldbuttons[id] & IN_MOVERIGHT
&& ~buttons & IN_FORWARD && ~buttons & IN_MOVERIGHT && ~buttons & IN_BACK && buttons & IN_MOVELEFT && flSideMove[id] < -200.0 ) {
if( ++newstr2det[id] >= 3 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0027) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

//bBanned[id] = true;

isbeinglogged[id] = true;
timetolog[id] = 1999;

//server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0027) detected^"", get_user_userid( id ) );
}
}

if( ~oldbuttons[id] & IN_FORWARD && ~oldbuttons[id] & IN_BACK && ~oldbuttons[id] & IN_MOVERIGHT && oldbuttons[id] & IN_MOVELEFT
&& ~buttons & IN_FORWARD && ~buttons & IN_MOVELEFT && ~buttons & IN_BACK && buttons & IN_MOVERIGHT && flSideMove[id] > 200.0 ) {
if( ++newstr2det[id] >= 3 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0028) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

//bBanned[id] = true;

isbeinglogged[id] = true;
timetolog[id] = 1999;

//server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0028) detected^"", get_user_userid( id ) );
}
}

if( ~oldbuttons[id] & IN_MOVERIGHT && ~oldbuttons[id] & IN_BACK && ~oldbuttons[id] & IN_MOVELEFT && oldbuttons[id] & IN_FORWARD
&& ~buttons & IN_FORWARD && ~buttons & IN_MOVERIGHT && ~buttons & IN_FORWARD && buttons & IN_BACK && flForwardMove[id] < -200.0 ) {
if( ++newstr2det[id] >= 3 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0029) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

//bBanned[id] = true;

isbeinglogged[id] = true;
timetolog[id] = 1999;

//server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0029) detected^"", get_user_userid( id ) );
}
}

if( ~oldbuttons[id] & IN_MOVERIGHT && ~oldbuttons[id] & IN_MOVELEFT && ~oldbuttons[id] & IN_FORWARD && oldbuttons[id] & IN_BACK
&& ~buttons & IN_BACK && ~buttons & IN_MOVERIGHT && ~buttons & IN_MOVELEFT && buttons & IN_FORWARD && flForwardMove[id] > 200.0 ) {
if( ++newstr2det[id] >= 3 ) {
new name[32], steamid[32], ipaddr[32];
get_user_name( id, name, charsmax( name ) );
get_user_ip( id, ipaddr, charsmax( ipaddr ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );

log_to_file( "rAntiCheat.log", "Strafe helper (#0030) detected on player %s, SteamID: %s, IP: %s", name, steamid, ipaddr );

//bBanned[id] = true;

isbeinglogged[id] = true;
timetolog[id] = 1999;

//server_cmd( "amx_mban #%d 0 ^"[^x03rAnti-Cheat^x01] Strafe helper (#0030) detected^"", get_user_userid( id ) );
}
}
} else if( pev( id, pev_flags ) & FL_ONGROUND )
newstr2det[id] = 0;
/*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
*/

flOldSideMove[id] = flSideMove[id];
flOldForwardmove[id] = flForwardMove[id];
m_oldmx[id] = m_mx[id];
m_oldyaw[id] = m_yaw[id];
oldbuttons[id] = buttons;
return;
}

public Cvars( id, const szVar[], const szValue[] ) {
if( !is_user_connected( id ) || is_user_bot( id ) )
return;

static name[32];
get_user_name( id, name, charsmax( name ) );

if( contain( name, "#" ) == 0 ) {
replace( name, charsmax( name ), "#", "" );
}

new Float:m_szValue = str_to_float( szValue );

if( equal( szVar, "cl_forwardspeed" ) && m_szValue != 400 ) {
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 400)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "cl_sidespeed" ) && m_szValue != 400 ) {
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 400)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "cl_backspeed" ) && m_szValue != 400 ) {
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 400)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "cl_yawspeed" ) && m_szValue != 210 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 210)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "cl_pitchspeed" ) && m_szValue != 225 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 225)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "developer" ) && m_szValue != 0 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 0)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "cl_filterstuffcmd" ) && m_szValue != 0 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 0)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "fps_override" ) && m_szValue != 0 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 0)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "fps_modem" ) && m_szValue != 0 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 0)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "sv_cheats" ) && m_szValue != 0 ){
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal value: 0)^"", get_user_userid( id ), szVar, m_szValue );
}

if( equal( szVar, "fps_max" ) && m_szValue > 101 ) {
server_cmd( "kick #%d ^"Bad cvar detected %s, value %.f, (Legal max value: 101)^"", get_user_userid( id ), szVar, m_szValue );
}

client_cmd( id, "+mlook" );

return;
}

public client_command(id) {
if( !is_user_connected( id ) )
return;

static sArgv[64], sArgv1[64];

read_argv( 0, sArgv, 63 );
read_args( sArgv1, charsmax( sArgv1 ) );
remove_quotes( sArgv );
trim( sArgv );

if( strlen( sArgv ) == 0 )
return;

new szName[32];
get_user_name( id, szName, charsmax( szName ) );

//ColorChat( 0, NORMAL, "Command %s was executed", sArgv );

/*if( TrieKeyExists( BadCommands, sArgv ) ) {
server_cmd( "kick #%d ^"Bad command detected %s^"", get_user_userid( id ), sArgv );
ColorChat( 0, NORMAL, "^3rAnti-Cheat^1 | Bad commands detected! [%s has been kicked]", szName );
}*/
}

public client_connect( id ) {
for( new i = 0; i < sizeof( g_DefaultCvar ); i++ ) {
console_cmd( id, "%s", g_DefaultCvar[i] );
}

static name[32];
get_user_name( id, name, charsmax( name ) );

if( contain( name, "#" ) == 0 ) {
replace( name, charsmax( name ), "#", "" );
}

return;
}

public client_putinserver( id ) {
helperdet[id] = 0;
strafedetforward[id] = 0;
strafedetside[id] = 0;
advhelperdet[id] = 0;
scriptdet[id] = 0;
helperdetbuttons[id] = 0;
filterstrdet[id] = 0;
AVGFPS[id][0] = 0.0;
AVGFPS[id][1] = 0.0;
bBanned[id] = false;

return;
}

public client_disconnect( id ) {
helperdet[id] = 0;
strafedetforward[id] = 0;
strafedetside[id] = 0;
advhelperdet[id] = 0;
scriptdet[id] = 0;
helperdetbuttons[id] = 0;
filterstrdet[id] = 0;
AVGFPS[id][0] = 0.0;
AVGFPS[id][1] = 0.0;
bBanned[id] = false;

if( task_exists( id ) )
remove_task( id );

return;
}

public player_spawn( id ) {
helperdet[id] = 0;
strafedetforward[id] = 0;
strafedetside[id] = 0;
advhelperdet[id] = 0;
scriptdet[id] = 0;
helperdetbuttons[id] = 0;
filterstrdet[id] = 0;

if( is_user_alive( id ) )
ColorChat( id, NORMAL, "^x03rAntiCheat^x01 v%s by ^x04Ranarrr^x01 | ^x04rAntiCheat active", VERSION );

return HAM_IGNORED;
}

public check_cvars() {
static players[32], num, id;
get_players( players, num, "ch" );
for( new i = 0; i < num; i++ ) {
id = players[i];
for( new j = 0; j < sizeof( g_CheckCvar ); j++ )
query_client_cvar( id, g_CheckCvar[j], "Cvars" );
}
return;
}

public Player_CmdStart( id, uc_handle ) {

if( !is_user_alive( id ) || pev( id, pev_flags ) & FL_FROZEN || pev( id, pev_maxspeed ) < 210.0 || pev( id, pev_maxspeed ) > 260 || get_user_team( id ) == 3 || get_user_team( id ) == 0 || get_user_team( id ) == -1
|| is_user_bot( id ) )
return FMRES_IGNORED;

UserFPS[id] = ( 1 / ( get_uc( uc_handle, UC_Msec ) * 0.001 ) );

get_uc( uc_handle, UC_SideMove, flSideMove[id] );
get_uc( uc_handle, UC_ForwardMove, flForwardMove[id] );

return FMRES_IGNORED;
}

public bugfix() {
bPluginPause = true;
return;
}

public stoprecord( id ) {
if( read_argc() != 2 ) {
client_cmd( id, "echo rStopRecordPlayer usage: rStopRecordPlayer #userid/^"name^"" );
client_cmd( id, "echo Players being recorded:" );
for( new i = 0; i <= 32; ++i ) {
if( isbeinglogged[i] ) {
new name[32];
get_user_name( i, name, charsmax( name ) );

client_cmd( id, "echo ^t%s, userid: %i", name, get_user_userid( i ) );
}
}
return;
}

static name[33], playerid;

read_argv( 1, name, charsmax( name ) );

if( contain( name, "#" ) == 0 ) {
// Userid
playerid = find_player( "hk", str_to_num( name[1] ) );
if( !playerid ) {
client_cmd( id, "echo Could not find player with userid %s", name[1] );
return;
}
} else {
// Name
playerid = find_player( "ah", name );
if( !playerid )
playerid = find_player( "bhl", name );

if( !playerid ) {
client_cmd( id, "echo Could not find player with substring or full name %s", name );
return;
}
}

if( !playerid ) {
client_cmd( id, "echo Could not find player" );
return;
}

isbeinglogged[playerid] = false;

get_user_name( playerid, name, charsmax( name ) );
client_cmd( id, "echo Stopped recording player %s", name );

return;
}

public startrecord( id ) {
if( read_argc() > 3 || read_argc() < 2 ) {
client_cmd( id, "echo rRecordPlayer usage: rRecordPlayer #userid/^"name^" <time in ticks, default: 1999>" );
return;
}

static name[33], playerid, time[32];

read_argv( 1, name, charsmax( name ) );

if( contain( name, "#" ) == 0 ) {
// Userid
playerid = find_player( "hk", str_to_num( name[1] ) );
if( !playerid ) {
client_cmd( id, "echo Could not find player with userid %s", name[1] );
return;
}
} else {
// Name
playerid = find_player( "ah", name );
if( !playerid )
playerid = find_player( "bhl", name );

if( !playerid ) {
client_cmd( id, "echo Could not find player with substring or full name %s", name );
return;
}
}

if( !playerid ) {
client_cmd( id, "echo Could not find player" );
return;
}

get_user_name( playerid, name, charsmax( name ) );

if( read_argc() == 2 ) {
timetolog[playerid] = 1999;
} else {
read_argv( 2, time, sizeof( time ) );
if( str_to_num( time ) > 20000 )
timetolog[playerid] = 20000;
else if( str_to_num( time ) < 10 )
timetolog[playerid] = 10;

timetolog[playerid] = str_to_num( time );
}

isbeinglogged[playerid] = true;
client_cmd( id, "echo Recording player %s", name );
return;
}

// Credits to ConnorMcLeod
Float:distance_to_ground( id ) {
new Float:start[3], Float:end[3];
entity_get_vector( id, EV_VEC_origin, start );
if( entity_get_int( id, EV_INT_flags ) & FL_DUCKING ) {
start[2] += 18.0;
}

end[0] = start[0];
end[1] = start[1];
end[2] = start[2] - 9999.0;

new ptr = create_tr2();
engfunc( EngFunc_TraceHull, start, end, IGNORE_MONSTERS, HULL_HUMAN, id, ptr );
new Float:fraction;
get_tr2( ptr, TR_flFraction, fraction );
free_tr2( ptr );

return ( fraction * 9999.0 );
}
античит не хочет банить с FreshBanom и с другими бан системами, он только делает логи, а быть он банит толка с бансистемой mdbBanSystem.amxx МОЖНО КАК ТО его переделать для FreshBans?
15 Авг 2019
если кто знает проста напишите мне какую строчку надо заменить и на што заменить
 
В этой теме было размещено решение! Перейти к решению.

Download all Attachments

Сообщения
3,257
Реакции
1,437
Помог
121 раз(а)
LILO, заменить все строки с amx_mban на бан от FB, формат: fb_ban <время> <#userid> <причина>
 
Сообщения
9
Реакции
-2
Помог
1 раз(а)
LILO, заменить все строки с amx_mban на бан от FB, формат: fb_ban <время> <#userid> <причина>
да я видел это где то на форуме но сам такое изменить немогу для меня эта не понятно можно пример

server_cmd( "amx_mban #%d 1440 ^"[^x03rAnti-Cheat^x01] Bhop hack (#0001) detected!^"", get_user_userid( id ) );
и как тут прописат fb_ban <время> <#userid> <причина>
 
Сообщения
3,257
Реакции
1,437
Помог
121 раз(а)
LILO, server_cmd( "fb_ban 1440 #%d ^"[^x03rAnti-Cheat^x01] Bhop hack (#0001) detected!^"", get_user_userid( id ) );
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу