Raised This Month: $19 Target: $400
 4% 

[Request] Edit UAC.sma


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Whoisnext
Member
Join Date: Apr 2020
Old 04-16-2021 , 12:43   [Request] Edit UAC.sma
Reply With Quote #1

Hi , I need this to be edited, i don't know how to do it can someone do it for me ?
i don't want this to be shown or anytype of advertisment about the AC . I want to turn it off.
-This
[/uaca Authors Are: Milutinke (ByM) and Ilham Sakura]

-And this
[This Server is Protected by Ultimate Anti Cheat [v1.6]! By: Milutinke (ByM) and Ilham Sakura]

And if there is more also turn it off

-Also Plugin works but for some reason i got this spamming in console How to fix it by the way no errors in logs

[Could not execute privileged command alias _special plop558482] EDIT In my console is that not on server console it spams to everyone who joins Help please

- Ultimate has a bug mp3 sounds like glock and glock has no snd and i don't know hhow to fix it .. someone fix it ! / WH blocker and Rechecker works fine
-Full plugin
[https://github.com/milutinke/Ultimate-Anti-Cheat-UAC]

Thanks in advanced !
Attached Files
File Type: sma Get Plugin or Get Source (ByM_UltimateAntiCheat.sma - 9 views - 55.4 KB)

Last edited by Whoisnext; 04-16-2021 at 16:00.
Whoisnext is offline
Culverton smith
Junior Member
Join Date: Apr 2021
Old 04-16-2021 , 13:34   Re: [Request] Edit UAC.sma
Reply With Quote #2

PHP Code:
// Based on the original: Sakura's AntiCheat (https://forums.alliedmods.net/showthread.php?t=78765)

// Enabled: More Optimized
#define USE_BYM_API        1

#if defined  USE_BYM_API
#include < bym_api >
#else
#include < amxmodx >
#include < hamsandwich >
#endif

#include < amxmisc >
#include < fakemeta_util >
#include < dhudmessage >
#include < cstrike >
#include < engine >
#include < nvault >

#define PLUGIN             "Ultimate Anti-Cheat"
#define VERSION         "1.6"
#define AUTHOR             "Milutinke (ByM) and Ilham Sakura"

#define MAX_FLASHBUG_ZONES     20
#define ADVERTISING_TIME     240.0

#define FM_HITGROUP_HEAD     ( 1 << 1 )
#define FM_TEAM_OFFSET         114

#define TASK_RECAPTCHA        7624543
#define TASK_MILF        7624544
#define TASK_PLAYER_AD        7624545

#define ADMIN_IGNORE_FLAG     ADMIN_BAN

// Disabled: Very Optimized
//#define USE_TASKS        1
//#define USE_FAKEMETA        1

enum _:iStructSettings {
    
PLUGIN_STATUS 0,
    
PLUGIN_ADVERSTRIMENT,
    
PLUGIN_LOG_ACTIONS,
    
    
PUNISH_TYPE,
    
BAN_TYPE,
    
BAN_TIME,
    
IGNORE_ADMINS,
    
    
SPEEDHACK_SECURE,
    
    
BAN_COMMAND,
    
KICK_COMMAND,
    
    
CHECK_RAPIDFIRE,
    
CHECK_SPINHACK,
    
CHECK_SPEEDHACK,
    
CHECK_SHAKE,
    
CHECK_LOWRECOIL,
    
CHECK_AIMBOT,
    
CHECK_BHOP,
    
    
CHECK_MOVEKEYS,
    
CHECK_DOUBLEATTACK,
    
    
CHECK_FLASHBUG,

    
BLOCK_NOFLASH,
    
    
CHECK_FASTNAME,
    
CHECK_NAME,
    
CHECK_NAME_SYMBOLS,
    
CNS_SHOW_REASON,
    
CHECK_IPS,
    
ANTIBOT_ENABLED,
    
BYM_RECAPTCHA,
    
BYM_RECAPTCHA_TIME,
    
BYM_RECAPTCHA_TRYS,
    
BYM_RECAPTCHA_REMEMBER,
    
MILF_ANTICHEAT_BINDS,
    
MILF_ANTICHEAT_KEYS,
    
MILF_ANTICHEAT_PUNISHMENT,
    
MILF_ANTICHEAT_TIME,
    
MILF_ANTICHEAT_REASON,
    
    
RAPID_FIRE_PUNISH_NUMBER,
    
SPINHACK_WARNING_NUMBER,
    
SPINHACK_PUNISH_NUMBER,
    
SPEEDHACK_WARNING_NUMBER,
    
SPEEDHACK_PUNISH_NUMBER,
    
SHAKE_WARNING_NUMBER,
    
SHAKE_PUNISH_NUMBER,
    
LOWRECOILL_WARNING_NUMBER,
    
LOWRECOILL_PUNISH_NUMBER,
    
AIMBOT_WARNING_NUMBER,
    
AIMBOT_PUNISH_NUMBER,
    
FAST_NAME_CHANING_NUMBER
};

enum _:Cheats {
    
RAPIDFIRE 0,
    
SPINHACK,
    
SPEEDHACK,
    
SHAKE,
    
RECOIL,
    
AIMBOT
};

new const 
g_szSettingsName[ ][ ] = {
    
"Plugin_Status",
    
"Plugin_Adverstriment",
    
"Plugin_Log_Actions",
    
"Punish_Type",
    
"Punish_Ban_Type",
    
"Punish_Bantime",
    
"Ignore_Admins",
    
"Speedhack_Secure",
    
"Ban_Command",
    
"Kick_Command",
    
"Check_Rapidfire",
    
"Check_Spinhack",
    
"Check_Speedhack",
    
"Check_Shake",
    
"Check_Lowrecoil",
    
"Check_Aimbot",
    
"Check_Bhop",
    
"Check_Movekeys",
    
"Check_Doubleattack",
    
"Check_Flashbug",
    
"Block_NoFlash",
    
"Check_Name_Fastchange",
    
"Check_Name",
    
"Check_Name_Symbols",
    
"CNS_Show_Reason",
    
"Check_IPs",
    
"AntiBot_Enabled",
    
"ByM_ReCaptcha_Enabled",
    
"ByM_ReCaptcha_Secounds",
    
"ByM_ReCaptcha_NumberOfTrys",
    
"ByM_ReCaptcha_Remeber_Time",
    
"Milf_AntiCheat",
    
"Milf_AntiCheat_Keys",
    
"Milf_AntiCheat_Punishment",
    
"Milf_AntiCheat_BanTime",
    
"Milf_AntiCheat_Reason",
    
    
"Rapid_Punish_Number",
    
"SpinHack_Warning_Number",
    
"SpinHack_Punish_Number",
    
"SpeedHack_Warning_Number",
    
"SpeedHack_Punish_Number",
    
"Shake_Warning_Number",
    
"Shake_Punish_Number",
    
"LowRecoill_Warning_Number",
    
"LowRecoill_Punish_Number",
    
"AimBot_Warning_Number",
    
"AimBot_Punish_Number",
    
"Fast_Name_Changing_Number"
};

new const 
g_szOldCheats[ ][ ] = {
    
"EcstaticCheat",
    
"TeKilla",
    
"MicCheat",
    
"AlphaCheat",
    
"PimP",
    
"LCD",
    
"Chapman",
    
"_PRJVDC"
};

new const 
g_szGunsEvents[ ][ ] = {
    
"events/awp.sc",
    
"events/g3sg1.sc",
    
"events/ak47.sc",
    
"events/scout.sc",
    
"events/m249.sc",
    
"events/m4a1.sc",
    
"events/sg552.sc",
    
"events/aug.sc",
    
"events/sg550.sc",
    
"events/m3.sc",
    
"events/xm1014.sc",
    
"events/usp.sc",
    
"events/mac10.sc",
    
"events/ump45.sc",
    
"events/fiveseven.sc",
    
"events/p90.sc",
    
"events/deagle.sc",
    
"events/p228.sc",
    
"events/glock18.sc",
    
"events/mp5n.sc",
    
"events/tmp.sc",
    
"events/elite_left.sc",
    
"events/elite_right.sc",
    
"events/galil.sc",
    
"events/famas.sc"
};

new 
g_szGunsEventsIdsizeof g_szGunsEvents ];
new 
g_iSettingsiStructSettings ] = { 0, ... };
new 
g_szMapName32 ];
new 
g_szBanCommand512 ];
new 
g_szKickCommand512 ];
new 
g_iFlashVectorsMAX_FLASHBUG_ZONES ][ ];
new 
g_iFlashZones;
new 
boolg_iIsDetected33 ];
new 
g_iDetections33 ][ Cheats ];
new 
g_iBhopScript32 ];
new 
g_iNamesChangesNumber33 ];
new 
g_szRestrictedSymbols32 ];
new 
g_szReCaptchaText33 ][ ];
new 
g_iReCaptcaTrys33 ];
new 
g_iPassedReCaptcha33 ];
new 
g_iHasSecounds33 ];
new 
g_iCheckedCaptchaExipration33 ];
new 
g_szMilfReason128 ];
new 
g_iIgnoreAim33 ];
new 
g_iIgnoreRapid33 ];
new 
g_iIgnoreNoRecoil33 ];
new 
g_iIgnoreSpeedHack33 ];
new 
g_iIgnoreShake33 ];
new 
g_szMilfKeys128 ];

new 
Floatg_fOldAimAngles33 ][ ];
new 
Floatg_fLastAngles33 ][ ];
new 
Floatg_fTotalAngle33 ];
new 
Floatg_fRecoilLastAngles33 ][ ];
new 
Floatg_fLastOrigin33 ][ ];
new 
Floatg_fAimOrigin33 ][ ];
new 
Floatg_fNextAimCheck33 ];
new 
Floatg_fFlashedUntil33 ];

new 
Trieg_tMaliciousIPs;
new 
Trieg_tExcludedIPs;
new 
g_iMessageScreenFade;
new 
g_iMessageChat;

new 
g_iCaptchaVault;

const 
Floatg_fReverse = -1.0;
const 
Floatg_fFraction 9999.0;


public 
plugin_init( ) {
    
// Register plugin
    #if defined USE_BYM_API
        // Initialise ByM API and Register Plugin
        
ByM::Initialiseregister_pluginPLUGINVERSIONAUTHOR ) );
    
#else
        
register_pluginPLUGINVERSIONAUTHOR )
    
#endif

    // Tracking cvar
    
register_cvar"ByM_UltimateAntiCheat""1.6"FCVAR_SERVER );
    
    
// Load lang phrases
    
register_dictionary"UltimateAntiCheat.txt" );
    
    
// Fake Meta module forwards
    
register_forwardFM_Think"fw_FmThink" );
    
register_forwardFM_PlayerPostThink"fw_FmPlayerPostThink" );
    
register_forwardFM_PlayerPreThink"fw_PlayerPreThink" );
    
register_forwardFM_PlaybackEvent"g_fwPlayBackEvent" );
    
register_forwardFM_TraceLine"fw_FmTraceLine" );
    
register_forwardFM_AddToFullPack"fw_FmAddFullToPack");
    
    
// Engine events
    
register_event"ScreenFade""fw_EventPlayerFlashed""b""7=255" );
    
register_event"HLTV""fw_EventNewRound""a""1=0""2=0" );
    
    
// Register Commands
    
formatexg_iBhopScriptcharsmaxg_iBhopScript ), "plop%d%d%d"random100 ), random100 ), random100 ) );
    
register_clcmdg_iBhopScript"fw_CommandCheckBHop" );
    
register_clcmd"say /uaca""ShowAuthors" );
    
register_clcmd"say_team /uaca""ShowAuthors" );
    
register_clcmd"say""fw_ChatCommand" );
    
register_clcmd"say_team""fw_ChatCommand" );

    
// Register messages
    
g_iMessageScreenFade get_user_msgid"ScreenFade" );
    
g_iMessageChat get_user_msgid"SayText" );
}

public 
plugin_precache( ) {
    for( new 
iIterator2 iIterator2 sizeof g_szGunsEvents iIterator2 ++ )
        
g_szGunsEventsIdiIterator2 ] = engfuncEngFunc_PrecacheEvent1g_szGunsEventsiIterator2 ] );
}

public 
plugin_cfg( ) {
    static 
szBaseDir128 ], szUltimateAntiCheatDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszUltimateAntiCheatDircharsmaxszUltimateAntiCheatDir ), "%s/configs/UltimateAntiCheat"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/Settings.cfg"szUltimateAntiCheatDir );
    
    if( !
dir_existsszUltimateAntiCheatDir ) )
        
mkdirszUltimateAntiCheatDir );
    
    if( !
file_existsszFile ) ) {
        
server_print"%L"LANG_SERVER"PRINT_SRV_ERROR" );
        return;
    } else 
server_print"%L"LANG_PLAYER"SUCC_LOADED" );
    
    static 
iFileszBuffer512 ], szKey128 ], szStatus128 ];
    
iFile fopenszFile"rt" );
    
    while( !
feofiFile ) ) {
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || ( szBuffer] == ';' ) || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        
strtokszBufferszKeycharsmaxszKey ), szStatuscharsmaxszStatus ), '=');
        
        for( new 
iIterator PLUGIN_STATUSiIterator <= FAST_NAME_CHANING_NUMBERiIterator ++ ) {
            if( 
equalig_szSettingsNameiIterator ], szKey ) ) {
                if( 
equaliszKey"Ban_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szBanCommandcharsmaxg_szBanCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Kick_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szKickCommandcharsmaxg_szKickCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Check_Name_Symbols" ) ) {
                    
trimszStatus );
                    
formatexg_szRestrictedSymbolscharsmaxg_szRestrictedSymbols ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Keys" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfKeyscharsmaxg_szMilfKeys ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Reason" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfReasoncharsmaxg_szMilfReason ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } 

                
replace_allszStatuscharsmaxszStatus ), "=""" );
                
trimszStatus );
                
g_iSettingsiIterator ] = str_to_numszStatus );
                
                if( 
iIterator >= RAPID_FIRE_PUNISH_NUMBER && iIterator <= FAST_NAME_CHANING_NUMBER )
                    
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], szStatus );
                else 
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], g_iSettingsiIterator ] ? "Enabled" "Disabled" );
            }
        }
    }

    
fcloseiFile );
    
    if( 
g_iSettingsBYM_RECAPTCHA ] ) {
        if( !
g_iSettingsBYM_RECAPTCHA_TIME ] )
            
g_iSettingsBYM_RECAPTCHA_TIME ] = 20;
    }
    
    
LoadFlashBugVectors( );

    
formatexszFilecharsmaxszFile ), "%s/Blocked_IPs.ini"szUltimateAntiCheatDir );
    
LoadMaliciousIPsszFile );
    
    
szFile] = EOS;
    
formatexszFilecharsmaxszFile ), "%s/ByM_AntiBot_Excluded_IPs.ini"szUltimateAntiCheatDir );
    
LoadExcludedIPsszFile );
    
    if( !
g_iSettingsPLUGIN_STATUS ] ) {
        
pause"a" );
        return;
    }
    
    if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] )
        
g_iCaptchaVault nvault_open(  "ByM_ReCaptcha" );

    
//set_task( ADVERTISING_TIME, "Adverstiment", random( 1337 ), "", 0, "b", 0 );

    #if defined USE_TASKS
    
if( g_iSettingsCHECK_RAPIDFIRE ] )
        
set_task1.0"CheckRapidFire"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPINHACK ] )
        
set_task1.0"CheckSpinTotal"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPEEDHACK ] )
        
set_task0.5"CheckSpeedHack"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_LOWRECOIL ] )
        
set_task1.0"ClearRecoil"random1337 ), ""0"b");
    
#else
    
CreateGlobalThinker( );
    
CreateSpeedHackThinker( );
    
#endif
}

#if !defined USE_TASKS
CreateGlobalThinker( ) {
    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_GlobalThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    
register_think"UAC_GlobalThinker""fw_GlobalThink" );
}

public 
fw_GlobalThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers(); iPlayer ++ ) {
        
#if defined USE_BYM_API
        
if( !IsPlayer->ConnectediPlayer ) )
            continue;
        
#else
        
if( !is_user_connectediPlayer ) )
            continue;
        
#endif

        
if( g_iSettingsCHECK_RAPIDFIRE ] && !g_iIgnoreRapidiPlayer ] )
            
CheckRapidFireiPlayer );

        if( 
g_iSettingsCHECK_SPINHACK ] )
            
CheckSpinTotaliPlayer );

        if( 
g_iSettingsCHECK_LOWRECOIL ] )
            
ClearRecoiliPlayer );
    }
}

CreateSpeedHackThinker( ) {
    if( !
g_iSettingsCHECK_SPEEDHACK ] )
        return;

    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_SpeedHackThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    
register_think"UAC_SpeedHackThinker""fw_SpeedHackThink" );
}

public 
fw_SpeedHackThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers( ); iPlayer ++ ) {
        if( !
g_iIgnoreSpeedHackiPlayer ] )
            
CheckSpeedHackiPlayer );
    }
}
#endif

/*public Adverstiment( ) {
    if( !g_iSettings[ PLUGIN_ADVERSTRIMENT ] )
        return;
    
    if( !( random_num( 1, 300 ) == 1 ) )
        return;
    
    set_dhudmessage( 0, 255, 255, -1.0, 0.45, 0, 6.0, 10.0 );
    show_dhudmessage( 0, "This Server is Protected by Ultimate Anti Cheat [v%s]!^nAuthors:^n%s", VERSION, AUTHOR );

    PrintToChat( 0, "!gThis Server is Protected by Ultimate Anti Cheat! - Say !t/uaca !gto see the autors." );
}*/

/*public PlayerConnectedAdv( iTask )
    PrintToChat( iTask - TASK_PLAYER_AD, "!gThis Server is Protected by Ultimate Anti Cheat [v%s]! By: %s", VERSION, AUTHOR );*/

public ShowAuthorsiPlayer )
    
PrintToChatiPlayer"!rAuthors Are: !g%s"AUTHOR );

public 
fw_ChatCommandiPlayer ) {
    if( !
g_iSettingsBYM_RECAPTCHA ] )
        return 
0;

    if( 
g_iPassedReCaptchaiPlayer ] )
        return 
0;

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#else
    
if( !is_user_connectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#endif

    
static szSaid32 ];
    
read_argsszSaidcharsmaxszSaid ) );
    
remove_quotesszSaid );
    
    if( !
szSaid] )
        return 
2;

    if( !
g_iPassedReCaptchaiPlayer ] ) {
        if( 
equaliszSaidg_szReCaptchaTextiPlayer ] ) ) {
            
PrintToChatiPlayer"%L"iPlayer"CORRECT_CAPTCHA" );
            
g_iPassedReCaptchaiPlayer ] = 1;
            
            if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] ) {
                new 
szSteamID64 ];
                
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
            
                new 
szData12 ];
                
num_to_strget_systime( ) + g_iSettingsBYM_RECAPTCHA_REMEMBER ], szDatacharsmaxszData ) );
            
                
nvault_setg_iCaptchaVaultszSteamIDszData );
                
g_iCheckedCaptchaExiprationiPlayer ] = 1;
            }
        } else {
            
PrintToChatiPlayer"%L"iPlayer"WRONG_CAPTCHA"g_iSettingsBYM_RECAPTCHA_TRYS ] - g_iReCaptcaTrysiPlayer ] );
            
g_iReCaptcaTrysiPlayer ] ++;
            
            if( 
g_iReCaptcaTrysiPlayer ] >= g_iSettingsBYM_RECAPTCHA_TRYS ] )
                
PunishUseriPlayer"Fake Player" );
        }
    }

    return 
2;
}

public 
client_connectiPlayer ) {
    for( new 
iIterator iIterator sizeofg_iDetections[ ] ); iIterator ++ )
        
g_iDetectionsiPlayer ][ iIterator ] = 0;
    
    
g_iIsDetectediPlayer ] = false;
    
g_iNamesChangesNumberiPlayer ] = 0;
    
g_iReCaptcaTrysiPlayer ] = 0;
    
g_szReCaptchaTextiPlayer ][ ] = EOS;
    
g_iPassedReCaptchaiPlayer ] = 0;
    
g_iHasSecoundsiPlayer ] = 0;
    
g_iCheckedCaptchaExiprationiPlayer ] = 0;
    
g_iIgnoreAimiPlayer ] = 0;
    
g_iIgnoreRapidiPlayer ] = 0;
    
g_iIgnoreNoRecoiliPlayer ] = 0;
    
g_iIgnoreSpeedHackiPlayer ] = 0;
    
    if( 
g_iSettingsMILF_ANTICHEAT_BINDS ] ) {
        
ExecuteCommandiPlayer"bind del ^"amx_chat [MILF AntiCheatDelete pressed!^"" );
        
ExecuteCommandiPlayer"bind ins ^"amx_chat [MILF AntiCheatInsert pressed!^"" );
        
ExecuteCommandiPlayer"bind pgup ^"amx_chat [MILF AntiCheatPageUP pressed!^"" );
        
ExecuteCommandiPlayer"bind pgdn ^"amx_chat [MILF AntiCheatPageDown pressed!^"" );
        
ExecuteCommandiPlayer"bind end ^"amx_chat [MILF AntiCheatEnd pressed!^"" );
        
ExecuteCommandiPlayer"bind f12 ^"amx_chat [MILF AntiCheatf12 pressed!^"" );
        
ExecuteCommandiPlayer"bind f11 ^"amx_chat [MILF AntiCheatf11 pressed!^"" );
        
ExecuteCommandiPlayer"bind f10 ^"amx_chat [MILF AntiCheatf10 pressed!^"" );
        
ExecuteCommandiPlayer"bind f9 ^"amx_chat [MILF AntiCheatf9 pressed!^"" );
        
ExecuteCommandiPlayer"bind f8 ^"amx_chat [MILF AntiCheatf8 pressed!^"" );
        
ExecuteCommandiPlayer"bind f7 ^"amx_chat [MILF AntiCheatf7 pressed!^"" );
        
ExecuteCommandiPlayer"bind f6 ^"amx_chat [MILF AntiCheatf6 pressed!^"" );
        
ExecuteCommandiPlayer"bind f4 ^"amx_chat [MILF AntiCheatf4 pressed!^"" );
        
ExecuteCommandiPlayer"bind f3 ^"amx_chat [MILF AntiCheatf3 pressed!^"" );
        
ExecuteCommandiPlayer"rebuy;wait:wait:bind f2 ^"amx_chat [MILF AntiCheatf2 pressed!^"" );
        
ExecuteCommandiPlayer"autobuy;wait;wait;bind f1 ^"amx_chat [MILF AntiCheatf1 pressed!^"" );
    }
    

    if( 
task_existsiPlayer TASK_RECAPTCHA ) )
        
remove_taskiPlayer TASK_RECAPTCHA );
        
    if( 
task_existsiPlayer TASK_PLAYER_AD ) )
        
remove_taskiPlayer TASK_PLAYER_AD );
    
    if( 
g_iSettingsCHECK_NAME ] ) {
        static 
szName32 ];
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
        for( new 
iSymbols iSymbols strleng_szRestrictedSymbols ); iSymbols ++ ) {
            for( new 
iNameCharacters iNameCharacters strlenszName ); iNameCharacters ++ ) {
                if( 
szNameiNameCharacters ] == g_szRestrictedSymbolsiSymbols ] ) {
                    
server_cmd"kick #%d ^"%L^""get_user_useridiPlayer ), LANG_PLAYER"WRONG_CH" );
                    
                    if( 
g_iSettingsCNS_SHOW_REASON ] )
                        
PrintToChat0"%L"LANG_PLAYER"KICK_WR_CH"szName );
    
                    break;
                }
            }
        }
    }

    if( 
g_iSettingsCHECK_IPS ] ) {
        if( 
IsMaliciousIPiPlayer ) )
            
server_cmd"kick #%d ^"%L^""get_user_useridiPlayer ), LANG_PLAYER"WRONG_IP" );
    }

    return 
0;
}

public 
client_putinserveriPlayer ) {
    static 
szInfo];
    for( new 
iIterator 0iIterator sizeofg_szOldCheats ); iIterator ++ ) {
        
get_user_infoiPlayerg_szOldCheatsiIterator ], szInfocharsmaxszInfo ) );
        
        if( 
strlenszInfo ) > ) {
            
PunishUseriPlayer"Illegal Symbols in Name" );
            return 
1;
        }
    }

    
#if defined USE_BYM_API
    
ByM::PlayerConnectediPlayer );
    
#endif

    
if( g_iSettingsBYM_RECAPTCHA ] ) {
        
GenerateReCaptchag_szReCaptchaTextiPlayer ], charsmaxg_szReCaptchaText[ ] ) );
        
g_iHasSecoundsiPlayer ] = g_iSettingsBYM_RECAPTCHA_TIME ];
        
set_task3.0"DisplayReCaptcha"iPlayer TASK_RECAPTCHA );
    }
    
    if( 
task_existsiPlayer +  TASK_MILF ) )
        
remove_taskiPlayer +  TASK_MILF );
        
    
//set_task( 20.0, "PlayerConnectedAdv", iPlayer + TASK_PLAYER_AD );
    
return 0;
}

public 
DisplayReCaptchaiTask ) {
    new 
iPlayer iTask TASK_RECAPTCHA;
    
    if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] && !g_iCheckedCaptchaExiprationiPlayer ] ) {
        
g_iCheckedCaptchaExiprationiPlayer ] = 1;
        
        new 
szSteamID64 ];
        
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
        
        new 
szData12 ];
        
nvault_getg_iCaptchaVaultszSteamIDszDatacharsmaxszData ) );
        
        if( 
get_systime( ) < str_to_numszData ) )
            return;
    }

    
g_iHasSecoundsiPlayer ] --;

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) || IsPlayer->BotiPlayer ) || g_iPassedReCaptchaiPlayer ] )
        return;
    
#else
    
if( !is_user_connectediPlayer ) || is_user_botiPlayer ) || g_iPassedReCaptchaiPlayer ] )
        return;
    
#endif

    
if( g_iHasSecoundsiPlayer ] <= ) {
        
PunishUseriPlayer"Fake Player" );
        return;
    }

    
set_dhudmessage0255255, -1.00.206.00.7 );
    
show_dhudmessageiPlayer"%L"iPlayer"BYM_RECAPTCHA_TEXT"g_iHasSecoundsiPlayer ], g_szReCaptchaTextiPlayer ] );

    
set_task1.0"DisplayReCaptcha"iPlayer TASK_RECAPTCHA );
}

stock GenerateReCaptchaszOutput[ ], const iLen ) {
    new 
szChar;
    for( new 
iIterator 0iIterator iLeniIterator ++ ) {
        switch( 
random) ) {
            case 
0szChar random_num'a''z' );
            case 
1szChar random_num'A''Z' );
            case 
2szChar random_num'0''9' );
        }

        
formatexszOutputiIterator ], iLen"%c"szChar );
    }
}

public 
client_authorizediPlayer ) {
    if( !
g_iSettingsANTIBOT_ENABLED ] || is_user_botiPlayer ) )
        return;

    new 
szIP32 ];
    new 
szSteamID64 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
    
    if( !
strlenszIP ) )
        return;
        
    if( !
IsExcludedIPiPlayer ) ) {
        new 
iNumberOfIPs 0;
        new 
szIP232 ];
        
ForEachPlayeriPlayers ) {
            
get_user_ipiPlayersszIP2charsmaxszIP2 ), );
            
            if( 
equalszIPszIP2 ) )
                
iNumberOfIPs ++;
        }
        
        if( 
iNumberOfIPs ) {
            
server_cmd"kick ^"#%d^" ^"There is someone with the same IP on this is server already playing!^"", get_user_userid( iPlayer ) );
            
return;
        }
    }

    if( !
strlenszSteamID ) || containiszSteamID"BOT" ) != -)
        return;
        
    new 
iNumberSteamID 0;
    new 
szSteamID232 ];
    
ForEachPlayeriPlayers ) {
        
get_user_authidiPlayersszSteamID2charsmaxszSteamID2 ) );
        
        if( 
equalszSteamIDszSteamID2 ) )
            
iNumberSteamID ++;
    }
    
    if( 
iNumberSteamID ) {
        
server_cmd"kick ^"#%d^" ^"There is someone with the same Steam ID on this server is already playing!^"", get_user_userid( iPlayer ) );
        
return;
    }
}

public 
client_disconnectediPlayer ) {
    
#if defined USE_BYM_API
    
ByM::PlayerDisconnectediPlayer );
    
#endif
    
    
if( task_existsiPlayer TASK_PLAYER_AD ) )
        
remove_taskiPlayer TASK_PLAYER_AD );
    
    if( 
task_existsiPlayer TASK_RECAPTCHA ) )
        
remove_taskiPlayer TASK_RECAPTCHA );

    if( 
task_existsiPlayer +  TASK_MILF ) )
        
remove_taskiPlayer +  TASK_MILF );
        
    for( new 
iIterator iIterator sizeofg_iDetections[ ] ); iIterator ++ )
        
g_iDetectionsiPlayer ][ iIterator ] = 0;
    
    
g_iIsDetectediPlayer ] = false;
    
g_iNamesChangesNumberiPlayer ] = 0;
    
g_iReCaptcaTrysiPlayer ] = 0;
    
g_szReCaptchaTextiPlayer ][ ] = EOS;
    
g_iPassedReCaptchaiPlayer ] = 0;
    
g_iHasSecoundsiPlayer ] = 0;
    
g_iCheckedCaptchaExiprationiPlayer ] = 0;
    
g_iIgnoreAimiPlayer ] = 0;
    
g_iIgnoreRapidiPlayer ] = 0;
    
g_iIgnoreNoRecoiliPlayer ] = 0;
    
g_iIgnoreSpeedHackiPlayer ] = 0;
}

public 
client_commandiPlayer ) {
    if( !
g_iSettingsMILF_ANTICHEAT_BINDS ] )
        return 
PLUGIN_CONTINUE;
    
    new 
szCommand20 ];
    
read_argv0szCommandcharsmaxszCommand ) );
    
    new 
szParams96 ]
    
read_argsszParamscharsmaxszParams ) );
    
    if( 
equaliszCommand"amx_chat" ) ) {
        if( 
containiszParams"MILF AntiCheat" ) != -) {
            
replace_allszParamscharsmaxszParams ), "[MILF AntiCheat]""" );
            
replace_allszParamscharsmaxszParams ), "pressed!""" );
            
replace_allszParamscharsmaxszParams ), " """ );
            
trimszParams );
            
            new const 
g_szButtons[ ][ ] = { "Delete""Insert""PageUP""PageDown""End""F12""F11""F10""F9""F8""F7""F6""F4""F3""F2""F1" };
            new 
szButtonPressed32 ];
            
szButtonPressed] = EOS;
            
            for( new 
iButtons 0iButtons sizeofg_szButtons ); iButtons ++ ) {
                if( 
containiszParamsg_szButtonsiButtons ] ) != -) {
                    
copyszButtonPressedcharsmaxszButtonPressed ), g_szButtonsiButtons ] );
                    break;
                }
            }
            
            if( 
szButtonPressed] == EOS )
                return 
PLUGIN_CONTINUE;
        
            
// Screenshot on Steam, skip steam players
            
if( IsSteamPlayeriPlayer ) && containiszButtonPressed"F12" ) != -)
                return 
PLUGIN_CONTINUE;
                
            if( !( 
containig_szMilfKeysszButtonPressed ) != -) )
                return 
PLUGIN_CONTINUE;
            
            new 
szTime32 ];
            
get_time"%d.%m.%Y %H:%M:%S"szTimecharsmaxszTime ) );
            
            
PrintToChatiPlayer"!g--------------------------" );
            
PrintToChatiPlayer"!gTime of button %s press: !t%s",szButtonPressedszTime );
            
PrintToChatiPlayer"!g--------------------------" );
            
client_cmdiPlayer"snapshot" );
            
            new 
szReason96 ];
            
formatexszReasoncharsmaxszReason ), "Forbidden button %s pressed!"szButtonPressed );
            
            
WriteToLogiPlayerg_iSettingsPUNISH_TYPE ], ""szReason );
            
            if( 
task_existsiPlayer +  TASK_MILF ) )
                
remove_taskiPlayer +  TASK_MILF );
                
            
set_task2.0"MilfPunishment"iPlayer +  TASK_MILF );
        }
    }
    
    return 
PLUGIN_CONTINUE;
}    

public 
MilfPunishmentiTask ) {
    new 
iPlayer iTask TASK_MILF;
    
    if( !
is_user_connectediPlayer ) )
        return;
    
    
client_cmdiPlayer"snapshot" );
    
    new 
szTime32 ];
    
get_time"%d.%m.%Y %H:%M:%S"szTimecharsmaxszTime ) );
    
    new 
szSteamID64 ];
    
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
            
    
PrintToChatiPlayer"!g--------------------------" );
    
PrintToChatiPlayer"!gTime of ban: !t%s"szTime );
    
PrintToChatiPlayer"!g--------------------------" );
    
    if( !
g_iSettingsMILF_ANTICHEAT_PUNISHMENT ] ) {
        new 
szCommand512 ];
        
copyszCommandcharsmaxszCommand ), g_szKickCommand );
        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
        
replace_allszCommandcharsmaxszCommand ), "[reason]"g_szMilfReason );
        
        
server_print"%s"szCommand );
        
server_cmd"%s"szCommand );
    } else {
        new 
szCommand512 ];
        
copyszCommandcharsmaxszCommand ), g_szBanCommand );
        
        new 
szTime32 ];
        
num_to_strg_iSettingsMILF_ANTICHEAT_TIME ], szTimecharsmaxszTime ) );
        
        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
        
replace_allszCommandcharsmaxszCommand ), "[time]"szTime );
        
replace_allszCommandcharsmaxszCommand ), "[reason]"g_szMilfReason );
        
        
server_print"%s"szCommand );
        
server_cmd"%s"szCommand );
    }
}

public 
LoadFlashBugVectors( ) {
    static 
szBaseDir64 ], szUltimateAntiCheatDir64 ], szFile64 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
get_mapnameg_szMapNamecharsmaxg_szMapName ) );
    
    
formatexszUltimateAntiCheatDircharsmaxszUltimateAntiCheatDir ), "%s/UltimateAntiCheat"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/FlashBug/%s.ini"szUltimateAntiCheatDirg_szMapName );
    
    if( !
file_existsszFile ) ) {
        
server_print"%L"LANG_SERVER"LD_VECTORS"g_szMapName );
        return;
    }
    
    static 
iFileszBuffer128 ], szTemp][ 32 ], iIterator;
    
iFile fopenszFile"rt" );
    
    while( !
feofiFile ) ) {
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( ( 
szBuffer] == ';' ) || ( szBuffer] == '/' && szBuffer] == '/' ) || strlenszBuffer ) < )
            continue;
        
        if( 
parseszBufferszTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ) ) != ) {
            
server_print"%L"LANG_SERVER"SV_PRINT_VEC"g_szMapName );
            continue;
        }
        
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
        
iIterator ++;
    }

    
fcloseiFile );
    
    
g_iFlashZones iIterator;
    
    
server_print"%L"LANG_SERVER"SUC_VEC_LOAD"g_iFlashZonesg_szMapName );
}

public 
fw_EventPlayerFlashediPlayer ) {
    if( !
g_iSettingsBLOCK_NOFLASH ] )
        return 
PLUGIN_CONTINUE

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) )
        return 
PLUGIN_CONTINUE
    
#else
    
if( !is_user_connectediPlayer ) )
        return 
PLUGIN_CONTINUE
    
#endif

    
g_fFlashedUntiliPlayer ] = read_data) / 4096.0 get_gametime( );

    
message_beginMSG_ONE_UNRELIABLEg_iMessageScreenFade, { 00}, iPlayer );
    
write_short);
    
write_short);
    
write_short);
    
write_byte);
    
write_byte);
    
write_byte);
    
write_byte);
    
message_end( );    
    
    return 
PLUGIN_CONTINUE

}

public 
fw_EventNewRound( ) {
    static 
iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];

        
#if defined USE_BYM_API
        
if( g_iSettingsCHECK_SPEEDHACK ] && IsPlayer->AliveiPlayer ) ) {
        
#else
        
if( g_iSettingsCHECK_SPEEDHACK ] && is_user_aliveiPlayer ) ) {
        
#endif
            
static FloatfOrigin];
            
#if defined USE_FAKEMETA
            
peviPlayerpev_originfOrigin );
            
#else
            
entity_get_vectoriPlayerEV_VEC_originfOrigin );
            
#endif
            
            
CopyVectorfOriging_fLastOriginiPlayer ] );
        }
    }
}

public 
fw_FmThinkiEntity ) {
    
#if defined USE_FAKEMETA
    
if( !pev_validiEntity ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_valid_entiEntity ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( !g_iSettingsCHECK_FLASHBUG ] )
        return 
FMRES_IGNORED;
    
    static 
FloatfOrigin], iOrigin], iBugZone];
    static 
szModel32 ];
    
    
#if defined USE_FAKEMETA
    
peviEntitypev_modelszModelcharsmaxszModel ) ); 
    
#else
    
entity_get_stringiEntityEV_SZ_modelszModelcharsmaxszModel ) );
    
#endif
    
    
if( !equaliszModel"models/w_flashbang.mdl" ) )
        return 
FMRES_IGNORED;
    
    static 
iPlayer;
    
#if defined USE_FAKEMETA
    
iPlayer peviEntitypev_owner );
    
#else
    
iPlayer entity_get_edictiEntityEV_ENT_owner );
    
#endif
    
    #if defined USE_FAKEMETA
    
peviEntitypev_originfOrigin );
    
#else
    
entity_get_vectoriEntityEV_VEC_originfOrigin );
    
#endif

    
iOrigin] = floatroundfOrigin] );
    
iOrigin] = floatroundfOrigin] );
    
iOrigin] = floatroundfOrigin] );
    
    for( new 
iIterator 0iIterator g_iFlashZonesiIterator ++ ) {
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
        if( 
get_distanceiOriginiBugZone ) <=  g_iFlashVectorsiIterator ][ ] ) {
            
PrintToChat0"%L"LANG_PLAYER"SUCC_RMV_FLB"iOrigin], iOrigin], iOrigin] );
            
engfuncEngFunc_RemoveEntityiEntity );
            
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"ILG_MAP_EXPLOIT" );
            
            
SlapUseriPlayer10.0 );
            return 
FMRES_SUPERCEDE;
        }
    }

    return 
FMRES_IGNORED;
}

public 
fw_PlayerPreThinkiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || IsPlayer->BotiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) || is_user_botiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iSettingsCHECK_MOVEKEYS ] )
        
CheckScriptBlockiPlayer );
    
    if( 
g_iSettingsCHECK_BHOP ] ) {
        
#if defined USE_FAKEMETA
        
if( !( peviPlayerpev_flags ) & FL_ONGROUND ) && ( !( peviPlayer,pev_button ) & IN_JUMP ) || peviPlayerpev_oldbuttons ) & IN_JUMP ) )
        
#else
        
if( !( entity_get_intiPlayerEV_INT_flags ) & FL_ONGROUND ) && ( !( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) || entity_get_intiPlayerEV_INT_oldbuttons ) & IN_JUMP ) )
        
#endif
        
        
client_cmdiPlayer";alias _special %s"g_iBhopScript );
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_FmPlayerPostThinkiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || IsPlayer->BotiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) || is_user_botiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iSettingsCHECK_SPINHACK ] )
        
CheckSpinHack_PostiPlayer );

    if( 
g_iSettingsCHECK_SHAKE ] )
        
CheckShakeiPlayer );
    
    return 
FMRES_IGNORED;
}

public 
fw_FmAddFullToPackiESiEiEntityiHostiFlagsiPlayeriSet ) {
    if( !
g_iSettingsBLOCK_NOFLASH ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiHost ) || IsPlayer->BotiHost ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiHost ) || is_user_botiHost ) )
        return 
FMRES_IGNORED;
    
#endif
        
    
if( iPlayer ) {
        
#if defined USE_BYM_API
        
if( !IsPlayer->AliveiEntity ) || iEntity == iHost )
            return 
FMRES_IGNORED;
        
#else
        
if( !is_user_aliveiEntity ) || iEntity == iHost )
            return 
FMRES_IGNORED;
        
#endif
    
} else {
        
#if defined USE_FAKEMETA
        
if( pev_validiEntity ) ) {
            static 
szClassName33 ];
            
peviEntitypev_classnameszClassNamecharsmaxszClassName ) );
            
            if( !( 
strcmpszClassName"grenade" ) == ) || peviEntitypev_owner ) == iHost )
                return 
FMRES_IGNORED;
        }
        
#else
        
if( is_valid_entiEntity ) ) {
            static 
szClassName33 ];
            
entity_get_stringiEntityEV_SZ_classnameszClassNamecharsmaxszClassName ) );
            
            if( !( 
strcmpszClassName"grenade" ) == ) || entity_get_edictiEntityEV_ENT_owner ) == iHost )
                return 
FMRES_IGNORED;
        }
        
#endif

        
return FMRES_IGNORED;
    }
    
    if( 
get_gametime( ) < g_fFlashedUntiliHost ] ) {
        
forward_returnFMV_CELL);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

}

public 
fw_CommandCheckBHopiPlayer ) {
    if( !
g_iSettingsCHECK_BHOP ] )
        return 
1;

    
#if defined USE_FAKEMETA
    
if( !( peviPlayerpev_flags ) & FL_ONGROUND ) && ( !( peviPlayerpev_button ) & IN_JUMP ) || peviPlayerpev_oldbuttons ) & IN_JUMP ) )
    
#else
    
if( !( entity_get_intiPlayerEV_INT_flags ) & FL_ONGROUND ) && ( !( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) || entity_get_intiPlayerEV_INT_oldbuttons ) & IN_JUMP ) )
    
#endif
        
return 1;
    
    return 
0;
}

public 
CheckShakeiPlayer ) {
    if( 
g_iIgnoreShakeiPlayer ] )
        return 
FMRES_IGNORED;

    static 
FloatfAimAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAimAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
    
#endif
    
    
static iWeaponiTrash;
    
iWeapon get_user_weaponiPlayeriTrashiTrash );
    
    if( 
iWeapon == CSW_M249 )
        return 
FMRES_IGNORED;
    
    
#if defined USE_FAKEMETA
    
if( ( ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) && ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) ) || ( peviPlayerpev_button ) & IN_JUMP ) ) {
    
#else
    
if( ( ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) && ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) ) || ( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) ) {
    
#endif
        
g_iDetectionsiPlayer ][ SHAKE ] -= 10;
        
        if( 
g_iDetectionsiPlayer ][ SHAKE ] < )
            
g_iDetectionsiPlayer ][ SHAKE ] = 0;
    } else 
g_iDetectionsiPlayer ][ SHAKE ]++;
    
    if( 
g_iDetectionsiPlayer ][ SHAKE ] > g_iSettingsSHAKE_WARNING_NUMBER ] ) {
        
set_hudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"SHAKE_WARN" );
    }

    if( 
g_iDetectionsiPlayer ][ SHAKE ] > g_iSettingsSHAKE_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Shake" );
    
    
CopyVectorfAimAnglesg_fOldAimAnglesiPlayer ] );
    return 
FMRES_IGNORED;
}

public 
CheckSpinHack_PostiPlayer ) {
    static 
FloatfAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAngles );
    
#endif
    
    
g_fTotalAngleiPlayer ] += vector_distanceg_fLastAnglesiPlayer ], fAngles );
    
    
CopyVectorfAnglesg_fLastAnglesiPlayer ] );
    
    static 
iButton;
    
#if defined USE_FAKEMETA
    
iButton peviPlayerpev_button );
    
#else
    
iButton entity_get_intiPlayerEV_INT_button );
    
#endif
    
    
if( ( iButton IN_LEFT ) || ( iButton IN_RIGHT ) )
        
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
}

public 
g_fwPlayBackEventiFlagsiPlayeriEventIndex ) {
    if( !
g_iSettingsCHECK_RAPIDFIRE ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iIgnoreNoRecoiliPlayer ] )
        return 
FMRES_IGNORED;
    
    for( new 
iEvents 0iEvents sizeofg_szGunsEvents ); iEvents ++ ) {
        if( 
iEventIndex == g_szGunsEventsIdiEvents ] ) {
            static 
iWeaponiTrash;
            
iWeapon get_user_weaponiPlayeriTrashiTrash );
            
            static 
FloatfAimAngles];
            
#if defined USE_FAKEMETA
            
peviPlayerpev_anglesfAimAngles );
            
#else
            
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
            
#endif
            
            
if( iWeapon == CSW_GLOCK18 || iWeapon == CSW_P90 )
                return 
FMRES_IGNORED;
            
            if( 
g_iSettingsCHECK_RAPIDFIRE ] && !g_iIgnoreRapidiPlayer ] )
                
g_iDetectionsiPlayer ][ RAPIDFIRE ] ++;
            
            if( 
g_iSettingsCHECK_LOWRECOIL ] ) {
                if( ( 
fAimAngles] == g_fRecoilLastAnglesiPlayer ][ ] ) && g_fRecoilLastAnglesiPlayer ][ ] != 0.0 )
                    
g_iDetectionsiPlayer ][ RECOIL ] ++;
                else 
g_iDetectionsiPlayer ][ RECOIL ] --;
                
                
g_fRecoilLastAnglesiPlayer ][ ] = fAimAngles];
                
                if( 
g_iDetectionsiPlayer ][ RECOIL ] > g_iSettingsLOWRECOILL_WARNING_NUMBER ] ) {
                    
set_dhudmessage25500, -1.00.306.03.0 );
                    
show_dhudmessageiPlayer"%L"LANG_PLAYER"LOW_RECOIL" );
                }

                if( 
g_iDetectionsiPlayer ][ RECOIL ] > g_iSettingsLOWRECOILL_PUNISH_NUMBER ] )
                    
PunishUseriPlayer"No Recoil" );
            }
        }
    }

    return 
FMRES_IGNORED;
}

#if defined USE_TASKS
public ClearRecoil( ) {
#else
public ClearRecoiliPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreNoRecoiliPlayer ] )
            continue;

        
g_iDetectionsiPlayer ][ RECOIL ] -= 10;
        
        if( 
g_iDetectionsiPlayer ][ RECOIL ] < )
            
g_iDetectionsiPlayer ][ RECOIL ] = 0;
    }
    
#else
    
g_iDetectionsiPlayer ][ RECOIL ] -= 10;
        
    if( 
g_iDetectionsiPlayer ][ RECOIL ] < )
        
g_iDetectionsiPlayer ][ RECOIL ] = 0;
    
#endif
}

#if defined USE_TASKS
public CheckSpeedHack( ) {
#else
public CheckSpeedHackiPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreSpeedHackiPlayer ] )
            continue;

        
#if defined USE_BYM_API
        
if( !IsPlayer->AliveiPlayer ) )
            continue;
        
#else
        
if( !is_user_aliveiPlayer ) )
            continue;
        
#endif
        
        
static FloatfOrigin], FloatfOldOrigin], FloatfDistance;
        
#if defined USE_FAKEMETA
        
peviPlayerpev_originfOrigin );
        
#else
        
entity_get_vectoriPlayerEV_VEC_originfOrigin );
        
#endif
        
        
CopyVectorg_fLastOriginiPlayer ], fOldOrigin );
        
        if( 
g_iSettingsSPEEDHACK_SECURE ] ) {
            
fOrigin] = 0.0;
            
fOldOrigin] = 0.0;
        }
        
        
fDistance get_distance_ffOriginfOldOrigin );
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] >= )
            
g_iDetectionsiPlayer ][ SPEEDHACK ]--;
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] < )
            
g_iDetectionsiPlayer ][ SPEEDHACK ] = 0;
        
        if( 
fDistance >= 240.0 )
            
g_iDetectionsiPlayer ][ SPEEDHACK ] += 3;
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_WARNING_NUMBER ] ) {
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPEED_HACK" );
            
            
client_cmdiPlayer"spk %s"g_szWarningSounds] );
        }
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Speed Hack" );
        
        
CopyVectorfOriging_fLastOriginiPlayer ] );
    }
    
#else
    
    #if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || !IsPlayer->ConnectediPlayer ) )
        return;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return;
    
#endif
        
    
static FloatfOrigin], FloatfOldOrigin], FloatfDistance;
    
#if defined USE_FAKEMETA
    
peviPlayerpev_originfOrigin );
    
#else
    
entity_get_vectoriPlayerEV_VEC_originfOrigin );
    
#endif
        
    
CopyVectorg_fLastOriginiPlayer ], fOldOrigin );
        
    if( 
g_iSettingsSPEEDHACK_SECURE ] ) {
        
fOrigin] = 0.0;
        
fOldOrigin] = 0.0;
    }
        
    
fDistance get_distance_ffOriginfOldOrigin );
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] >= )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] --;
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] < )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] = 0;
        
    if( 
fDistance >= 350.0 )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] += 3;
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_WARNING_NUMBER ] ) {
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPEED_HACK" );
    }
    
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Speed Hack" );
        
    
CopyVectorfOriging_fLastOriginiPlayer ] );
    
#endif
}

#if defined USE_TASKS
public CheckSpinTotal( ) {
#else
public CheckSpinTotaliPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );
    
    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_fTotalAngleiPlayer ] >= 1500.0 ) {        
            if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_WARNING_NUMBER ] ) {
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPIN_HACK" );
                
                
client_cmdiPlayer"spk %s"g_szWarningSounds] );
            }
            if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_PUNISH_NUMBER ] )
                
PunishUseriPlayer"Spin Bot" );
            
            
g_iDetectionsiPlayer ][ SPINHACK ] ++;
        }
        else 
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
        
        
g_fTotalAngleiPlayer ] = 0.0;
    }
    
#else
    
if( g_fTotalAngleiPlayer ] >= 1500.0 ) {        
        if( 
g_iDetectionsiPlayer ][ SPINHACK ] >= g_iSettingsSPINHACK_WARNING_NUMBER ] ) {
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPIN_HACK" );
                
            
//client_cmd( iPlayer, "spk %s", g_szWarningSounds[ 1 ] );
        
}
        
        if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Spin Bot" );
            
        
g_iDetectionsiPlayer ][ SPINHACK ] ++;
    }
    else 
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
    
    
g_fTotalAngleiPlayer ] = 0.0;
    
#endif
}

#if defined USE_TASKS
public CheckRapidFire( ) {
#else
public CheckRapidFireiPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );
    
    for( new 
iIterator 0iIterator iNumberiIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreRapidiPlayer ] )
            continue;
        
        if( 
g_iDetectionsiPlayer ][ RAPIDFIRE ] >= g_iSettingsRAPID_FIRE_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Rapid" );
        
        
g_iDetectionsiPlayer ][ RAPIDFIRE ] = 0;
    }
    
#else
    
if( g_iDetectionsiPlayer ][ RAPIDFIRE ] >= g_iSettingsRAPID_FIRE_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Rapid" );
        
    
g_iDetectionsiPlayer ][ RAPIDFIRE ] = 0;
    
#endif
}

public 
CheckScriptBlockiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif

    
static FloatfAimAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAimAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
    
#endif
    
    
CopyVectorfAimAnglesg_fAimOriginiPlayer ] );
    
    static 
iButton;
    
#if defined USE_FAKEMETA
    
iButton peviPlayerpev_button );
    
#else
    
iButton entity_get_intiPlayerEV_INT_button );
    
#endif
    
    
if( iButton IN_LEFT ) {
        
client_cmdiPlayer"-left" );
        
        
CopyVectorg_fAimOriginiPlayer ], fAimAngles );
        
        
#if defined USE_FAKEMETA
        
peviPlayerpev_anglesfAimAngles );
        
#else
        
entity_set_vectoriPlayerEV_VEC_anglesfAimAngles );
        
#endif

        
set_peviPlayerpev_fixangle);
        
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"LF_R_L_KEYS" );
    }
    else if( 
iButton IN_RIGHT ) {
        
client_cmdiPlayer"-right" );
        
        
CopyVectorg_fAimOriginiPlayer ], fAimAngles );
        
        
#if defined USE_FAKEMETA
        
set_peviPlayerpev_anglesfAimAngles );
        
#else
        
entity_set_vectoriPlayerEV_VEC_anglesfAimAngles );
        
#endif

        
set_peviPlayerpev_fixangle);
        
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"LF_R_L_KEYS" );
    }
    
    if( 
g_iSettingsCHECK_DOUBLEATTACK ] ) {
        if( ( 
iButton IN_ATTACK ) && ( iButton IN_ATTACK2 ) ) {
            
iButton iButton & ~IN_ATTACK2;

            
#if defined USE_FAKEMETA
            
set_peviPlayerpev_buttoniButton );
            
#else
            
entity_set_intiPlayerEV_INT_buttoniButton );
            
#endif
            
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"DUAL_ATTACK" );
            
            return 
FMRES_SUPERCEDE;
        }
    }

    return 
FMRES_IGNORED;
}

public 
client_infochangediPlayer ) {
    static 
szNewName32 ], szOldName32 ];
    
    
get_user_nameiPlayerszOldNamecharsmaxszOldName ) );
    
get_user_infoiPlayer"name"szNewNamecharsmaxszNewName ) );
    
    if( !
equaliszNewNameszOldName ) ) {
        if( !
g_iSettingsCHECK_FASTNAME ] )
            return 
1;
        
        
g_iNamesChangesNumberiPlayer ] ++;
        
        if( 
g_iNamesChangesNumberiPlayer ] >= g_iSettingsFAST_NAME_CHANING_NUMBER ] )
            
PunishUseriPlayer"Fast Name Changing" );
        
        if( !
task_existsiPlayer ) )
            
set_task4.0"ClearChangesNum"iPlayer );
    }

    return 
0;
}

public 
ClearChangesNumiPlayer )
    
g_iNamesChangesNumberiPlayer ] = 0;

public 
fw_FmTraceLineFloatfStartPos], FloatfEndPos], iSkipMonstersiPlayeriTrace ) {
    if( !
g_iSettingsCHECK_AIMBOT ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iIgnoreAimiPlayer ] )
        return 
FMRES_IGNORED;
    
    static 
FloatfGameTime;
    
fGameTime get_gametime( );
    
    if( 
g_fNextAimCheckiPlayer ] < fGameTime ) {
        static 
iTargetiHitGroupiButton;

        
iTarget get_tr2iTraceTR_pHit );
        
iHitGroup = ( << get_tr2iTraceTR_iHitgroup ) );

        
#if defined USE_FAKEMETA
        
iButton peviPlayerpev_button );
        
#else
        
iButton entity_get_intiPlayerEV_INT_button );
        
#endif
        
        
        #if defined USE_BYM_API
        
if( !IsPlayer->AliveiTarget ) )
            return 
FMRES_IGNORED;
        
#else
        
if( !is_user_aliveiTarget ) )
            return 
FMRES_IGNORED;
        
#endif
        
        
if( get_pdata_intiPlayerFM_TEAM_OFFSET ) != get_pdata_intiTargetFM_TEAM_OFFSET ) ) {
            if( ( 
iHitGroup FM_HITGROUP_HEAD ) && ( iButton != ) )
                
g_iDetectionsiPlayer ][ AIMBOT ] ++;

            else if( !( 
iHitGroup FM_HITGROUP_HEAD ) || ( iButton <= ) )
                
g_iDetectionsiPlayer ][ AIMBOT ] = 0;
            
            if( 
g_iDetectionsiPlayer ][ AIMBOT ] > g_iSettingsAIMBOT_WARNING_NUMBER ] ) {
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"AIM_BOT" );            }

            if( 
g_iDetectionsiPlayer ][ AIMBOT ] > g_iSettingsAIMBOT_PUNISH_NUMBER ] )
                
PunishUseriPlayer"AIM BOT" );
            
            
g_fNextAimCheckiPlayer ] = fGameTime 0.5;
        }
    }

    return 
FMRES_IGNORED;
}

stock CountCheaters( ) {
    static 
szBaseDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszFilecharsmaxszFile ), "%s/configs/UltimateAntiCheat/NumberOfDetects.txt"szBaseDir );
    
    if( !
file_existsszFile ) )
        
write_fileszFile"; Ultimate Anticheat number of players detected.", -);
        
    static 
iLineiLengthszBuffer16 ];
    
iLine read_fileszFileiLineszBuffercharsmaxszBuffer ), iLength );
    
    static 
iNumber;
    
iNumber str_to_numszBuffer );
    
    
iNumber ++;
    
    
num_to_striNumberszBuffercharsmaxszBuffer ) );
    
    
write_fileszFileszBuffer);
}

stock SlapUseriPlayerFloatfDamage 0.0 ) {
    
#if defined USE_FAKEMETA
    
static FloatfPunchangle];
    
peviPlayerpev_punchanglefPunchangle );
    
    
fPunchangle] += random_float( -8.08.0 );
    
fPunchangle] += random_float( -8.08.0 );
    
    
set_peviPlayerpev_punchanglefPunchangle );
    
    static 
FloatfVelocity];
    
peviPlayerpev_velocityfVelocity );
    
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
    
set_peviPlayerpev_basevelocityfVelocity );
    
#else
    
static FloatfPunchangle];
    
entity_get_vectoriPlayerEV_VEC_punchanglefPunchangle );
    
    
fPunchangle] += random_float( -8.08.0 );
    
fPunchangle] += random_float( -8.08.0 );
    
    
entity_set_vectoriPlayerEV_VEC_punchanglefPunchangle );
    
    static 
FloatfVelocity];
    
entity_get_vectoriPlayerEV_VEC_velocityfVelocity );
    
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
    
entity_set_vectoriPlayerEV_VEC_basevelocityfVelocity );
    
#endif
    
    
fm_fakedamageiPlayer"worldspawn"fDamage);
    
    return 
1;
}

stock PunishUseriPlayer, const szCheat[ ] ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) )
        return;
    
#else
    
if( !is_user_connectediPlayer ) )
        return;
    
#endif
    
    
if( g_iSettingsIGNORE_ADMINS ] ) {
        if( 
accessiPlayerADMIN_IGNORE_FLAG ) ) {
            
WriteToLogiPlayer0"""" );
            return;
        }
    }
    
    if( !
g_iIsDetectediPlayer ] ) {
        static 
szName32 ], szSteamID32 ], iUid;
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
        
iUid get_user_useridiPlayer );
        
        switch( 
g_iSettingsPUNISH_TYPE ] ) {
            case 
0: {    
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"HACK_DETECT"szCheat );
                
                
PrintToChat0"%L"LANG_PLAYER"ID_WITH_HACK"szNameszCheat );
            }
            case 
1: {
                
server_cmd"kick #%d ^"%L^""iUidLANG_PLAYER"HACK_DETECT"szCheat );
                
                
PrintToChat0"%L"LANG_PLAYER"KICK_HAVE_CHEAT"szNameszCheat );
            } 
            case 
2: {        
                switch( 
g_iSettingsBAN_TYPE ] ) {
                    
// STEAM ID
                    
case 0: {
                        
server_cmd"kick #%d;wait;wait;wait;banid %d ^"%s^";wait;wait;wait;writeid"iUidg_iSettingsBAN_TIME ], szSteamIDszCheat );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                    
                    
// IP
                    
case 1: {
                        static 
szIp32 ];
                        
get_user_ipiPlayerszIpcharsmaxszIp ), );
                        
                        
server_cmd"kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;writeip"iUidg_iSettingsBAN_TIME ], szIpszCheat );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                    
                    
// Ban Command
                    
case 2: {
                        new 
szCommand512 ];
                        
copyszCommandcharsmaxszCommand ), g_szBanCommand );
        
                        new 
szTime32 ];
                        
num_to_strg_iSettingsBAN_TIME ], szTimecharsmaxszTime ) );
        
                        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
                        
replace_allszCommandcharsmaxszCommand ), "[time]"szTime );
                        
                        new 
szReason64 ];
                        
formatexszReasoncharsmaxszReason ), "Cheat Detected: %s"szCheat );
                        
replace_allszCommandcharsmaxszCommand ), "[reason]"szReason );
        
                        
server_cmd"%s"szCommand );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                }
            }
        }
        
        
CountCheaters( );
        
WriteToLogiPlayerg_iSettingsPUNISH_TYPE ], ""szCheat );
        
        
g_iIsDetectediPlayer ] = true;
    }
}

stock CopyVectorFloatfVector1], FloatfVector2] ) {
    
fVector2] = fVector1];
    
fVector2] = fVector1];
    
fVector2] = fVector1];
}

stock WriteToLogiPlayer_:iType, const szString[ ], const szCheat[ ] ) {
    if( !
g_iSettingsPLUGIN_LOG_ACTIONS ] )
        return;
    
    static 
szBaseDir128 ], szLogsDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszLogsDircharsmaxszLogsDir ), "%s/configs/UltimateAntiCheat/Logs"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/UltimateAntiCheat.log"szLogsDir );
    
    if( !
dir_existsszLogsDir ) )
        
mkdirszLogsDir );
    
    if( !
file_existsszFile ) )
        
write_fileszFile"; Ultimate Anti Cheat Logs file.", -);
    
    static 
szName32 ], szIp32 ];
    
    if( 
iType != -) {
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
get_user_ipiPlayerszIpcharsmaxszIp ), );
    }
    
    switch( 
iType ) {
        case -
: { log_to_fileszFile"%s"szString ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_1"szIpszNameszCheat ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_2"szIpszNameszCheat ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_3"szIpszNameszCheat ); }
    }
}

stock boolIsMaliciousIPiPlayer ) {
    new 
szIP32 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
    return 
boolTrieKeyExistsg_tMaliciousIPsszIP );
}

stock LoadMaliciousIPs( const szFile[ ] ) {
    if( 
g_tMaliciousIPs )
        
TrieDestroyg_tMaliciousIPs );

    
g_tMaliciousIPs TrieCreate( );

    new 
iFile fopenszFile"rt" );
    
    if( !
iFile )
        
write_fileszFile"", -);
    
    while( !
feofiFile ) ) {
        static 
szBuffer64 ];
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || szBuffer] == ';' || szBuffer] == '#' || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        if( !
TrieKeyExistsg_tMaliciousIPsszBuffer ) )
            
TrieSetStringg_tMaliciousIPsszBufferszBuffer );
    }

    
fcloseiFile );
}

stock boolIsExcludedIPiPlayer ) {
    new 
szIP32 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
    return 
boolTrieKeyExistsg_tExcludedIPsszIP );
}

stock LoadExcludedIPs( const szFile[ ] ) {
    if( 
g_tExcludedIPs )
        
TrieDestroyg_tExcludedIPs );

    
g_tExcludedIPs TrieCreate( );

    new 
iFile fopenszFile"rt" );
    
    if( !
iFile )
        
write_fileszFile"", -);
    
    while( !
feofiFile ) ) {
        static 
szBuffer64 ];
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || szBuffer] == ';' || szBuffer] == '#' || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        if( !
TrieKeyExistsg_tExcludedIPsszBuffer ) )
            
TrieSetStringg_tExcludedIPsszBufferszBuffer );
    }

    
fcloseiFile );
}

stock PrintToChatiPlayer, const szInput[ ], any:... ) {
    static 
szMessage191 ];
    
vformatszMessagecharsmaxszMessage ), szInput);
    
replace_allszMessagecharsmaxszMessage ), "!g""^4" );
    
replace_allszMessagecharsmaxszMessage ), "!t""^3" );
    
replace_allszMessagecharsmaxszMessage ), "!r""^2" );
    
replace_allszMessagecharsmaxszMessage ), "!n""^1" );
     
    if( 
iPlayer == ) {
        
ForEachPlayeriTarget ) {
            
#if defined USE_BYM_API
            
if( !IsPlayer->ConnectediTarget ) || IsPlayer->BotiTarget ) )
                return;
            
#else
            
if( !is_user_connectediTarget ) || is_user_botiTarget ) )
                return;
            
#endif
            
            
message_beginMSG_ONE_UNRELIABLEg_iMessageChat_iTarget );
            
write_byteiTarget );
            
write_stringszMessage );
            
message_end( );
        }
    } else {
        
#if defined USE_BYM_API
            
if( !IsPlayer->ConnectediPlayer ) || IsPlayer->BotiPlayer ) )
                return;
            
#else
            
if( !is_user_connectediPlayer ) || is_user_botiPlayer ) )
                return;
            
#endif
        
        
message_beginMSG_ONE_UNRELIABLEg_iMessageChat_iPlayer );
        
write_byteiPlayer );
        
write_stringszMessage );
        
message_end( );
    }
}

ExecuteCommandiPlayer, const szCommand[ ], any:... ) {
    new 
szText256 ];
    
vformatszTextcharsmaxszText ), szCommand);
    
    
message_beginMSG_ONESVC_DIRECTOR_iPlayer );
    
write_bytestrlenszText ) + );
    
write_byte10 );
    
write_stringszText );
    
message_end( );
}

stock boolIsSteamPlayeriPlayer ) {
    new 
iDpPointer;
    
    if( 
iDpPointer || ( iDpPointer get_cvar_pointer"dp_r_id_provider" ) ) ) {
        
server_cmd"dp_clientinfo %d"iPlayer );
        
server_exec( );
        return ( 
get_pcvar_numiDpPointer ) == ) ? true false
    
}
    
    return 
false
}

public 
plugin_natives( ) {
    
register_native"uac_set_ignore_aim""NativeSetIgnoreAim");
    
register_native"uac_set_ignore_rapid""NativeSetIgnoreRapid");
    
register_native"uac_set_ignore_norecoil""NativeSetIgnoreNoRecoil");
    
register_native"uac_set_ignore_speedhack""NativeSetIgnoreSpeed");
    
register_native"uac_set_ignore_shake""NativeSetIgnoreShake");
}

public 
NativeSetIgnoreAimiPlayeriValue )
    
g_iIgnoreAimiPlayer ] = iValue;
    
public 
NativeSetIgnoreRapidiPlayeriValue )
    
g_iIgnoreRapidiPlayer ] = iValue;
    
public 
NativeSetIgnoreNoRecoiliPlayeriValue )
    
g_iIgnoreNoRecoiliPlayer ] = iValue;
    
public 
NativeSetIgnoreSpeediPlayeriValue )
    
g_iIgnoreSpeedHackiPlayer ] = iValue;

public 
NativeSetIgnoreShakeiPlayeriValue )
    
g_iIgnoreShakeiPlayer ] = iValue;

public 
plugin_end( ) {
    if( 
g_tMaliciousIPs )
        
TrieDestroyg_tMaliciousIPs );
        
    if( 
g_iCaptchaVault )
        
nvault_closeg_iCaptchaVault );

Culverton smith is offline
Whoisnext
Member
Join Date: Apr 2020
Old 04-16-2021 , 13:45   Re: [Request] Edit UAC.sma
Reply With Quote #3

Did you turn off the Advertisments? / And do you know how to fix the error in console?
Whoisnext is offline
Whoisnext
Member
Join Date: Apr 2020
Old 04-16-2021 , 15:45   Re: [Request] Edit UAC.sma
Reply With Quote #4

Quote:
Originally Posted by Culverton smith View Post
PHP Code:
// Based on the original: Sakura's AntiCheat (https://forums.alliedmods.net/showthread.php?t=78765)

// Enabled: More Optimized
#define USE_BYM_API        1

#if defined  USE_BYM_API
#include < bym_api >
#else
#include < amxmodx >
#include < hamsandwich >
#endif

#include < amxmisc >
#include < fakemeta_util >
#include < dhudmessage >
#include < cstrike >
#include < engine >
#include < nvault >

#define PLUGIN             "Ultimate Anti-Cheat"
#define VERSION         "1.6"
#define AUTHOR             "Milutinke (ByM) and Ilham Sakura"

#define MAX_FLASHBUG_ZONES     20
#define ADVERTISING_TIME     240.0

#define FM_HITGROUP_HEAD     ( 1 << 1 )
#define FM_TEAM_OFFSET         114

#define TASK_RECAPTCHA        7624543
#define TASK_MILF        7624544
#define TASK_PLAYER_AD        7624545

#define ADMIN_IGNORE_FLAG     ADMIN_BAN

// Disabled: Very Optimized
//#define USE_TASKS        1
//#define USE_FAKEMETA        1

enum _:iStructSettings {
    
PLUGIN_STATUS 0,
    
PLUGIN_ADVERSTRIMENT,
    
PLUGIN_LOG_ACTIONS,
    
    
PUNISH_TYPE,
    
BAN_TYPE,
    
BAN_TIME,
    
IGNORE_ADMINS,
    
    
SPEEDHACK_SECURE,
    
    
BAN_COMMAND,
    
KICK_COMMAND,
    
    
CHECK_RAPIDFIRE,
    
CHECK_SPINHACK,
    
CHECK_SPEEDHACK,
    
CHECK_SHAKE,
    
CHECK_LOWRECOIL,
    
CHECK_AIMBOT,
    
CHECK_BHOP,
    
    
CHECK_MOVEKEYS,
    
CHECK_DOUBLEATTACK,
    
    
CHECK_FLASHBUG,

    
BLOCK_NOFLASH,
    
    
CHECK_FASTNAME,
    
CHECK_NAME,
    
CHECK_NAME_SYMBOLS,
    
CNS_SHOW_REASON,
    
CHECK_IPS,
    
ANTIBOT_ENABLED,
    
BYM_RECAPTCHA,
    
BYM_RECAPTCHA_TIME,
    
BYM_RECAPTCHA_TRYS,
    
BYM_RECAPTCHA_REMEMBER,
    
MILF_ANTICHEAT_BINDS,
    
MILF_ANTICHEAT_KEYS,
    
MILF_ANTICHEAT_PUNISHMENT,
    
MILF_ANTICHEAT_TIME,
    
MILF_ANTICHEAT_REASON,
    
    
RAPID_FIRE_PUNISH_NUMBER,
    
SPINHACK_WARNING_NUMBER,
    
SPINHACK_PUNISH_NUMBER,
    
SPEEDHACK_WARNING_NUMBER,
    
SPEEDHACK_PUNISH_NUMBER,
    
SHAKE_WARNING_NUMBER,
    
SHAKE_PUNISH_NUMBER,
    
LOWRECOILL_WARNING_NUMBER,
    
LOWRECOILL_PUNISH_NUMBER,
    
AIMBOT_WARNING_NUMBER,
    
AIMBOT_PUNISH_NUMBER,
    
FAST_NAME_CHANING_NUMBER
};

enum _:Cheats {
    
RAPIDFIRE 0,
    
SPINHACK,
    
SPEEDHACK,
    
SHAKE,
    
RECOIL,
    
AIMBOT
};

new const 
g_szSettingsName[ ][ ] = {
    
"Plugin_Status",
    
"Plugin_Adverstriment",
    
"Plugin_Log_Actions",
    
"Punish_Type",
    
"Punish_Ban_Type",
    
"Punish_Bantime",
    
"Ignore_Admins",
    
"Speedhack_Secure",
    
"Ban_Command",
    
"Kick_Command",
    
"Check_Rapidfire",
    
"Check_Spinhack",
    
"Check_Speedhack",
    
"Check_Shake",
    
"Check_Lowrecoil",
    
"Check_Aimbot",
    
"Check_Bhop",
    
"Check_Movekeys",
    
"Check_Doubleattack",
    
"Check_Flashbug",
    
"Block_NoFlash",
    
"Check_Name_Fastchange",
    
"Check_Name",
    
"Check_Name_Symbols",
    
"CNS_Show_Reason",
    
"Check_IPs",
    
"AntiBot_Enabled",
    
"ByM_ReCaptcha_Enabled",
    
"ByM_ReCaptcha_Secounds",
    
"ByM_ReCaptcha_NumberOfTrys",
    
"ByM_ReCaptcha_Remeber_Time",
    
"Milf_AntiCheat",
    
"Milf_AntiCheat_Keys",
    
"Milf_AntiCheat_Punishment",
    
"Milf_AntiCheat_BanTime",
    
"Milf_AntiCheat_Reason",
    
    
"Rapid_Punish_Number",
    
"SpinHack_Warning_Number",
    
"SpinHack_Punish_Number",
    
"SpeedHack_Warning_Number",
    
"SpeedHack_Punish_Number",
    
"Shake_Warning_Number",
    
"Shake_Punish_Number",
    
"LowRecoill_Warning_Number",
    
"LowRecoill_Punish_Number",
    
"AimBot_Warning_Number",
    
"AimBot_Punish_Number",
    
"Fast_Name_Changing_Number"
};

new const 
g_szOldCheats[ ][ ] = {
    
"EcstaticCheat",
    
"TeKilla",
    
"MicCheat",
    
"AlphaCheat",
    
"PimP",
    
"LCD",
    
"Chapman",
    
"_PRJVDC"
};

new const 
g_szGunsEvents[ ][ ] = {
    
"events/awp.sc",
    
"events/g3sg1.sc",
    
"events/ak47.sc",
    
"events/scout.sc",
    
"events/m249.sc",
    
"events/m4a1.sc",
    
"events/sg552.sc",
    
"events/aug.sc",
    
"events/sg550.sc",
    
"events/m3.sc",
    
"events/xm1014.sc",
    
"events/usp.sc",
    
"events/mac10.sc",
    
"events/ump45.sc",
    
"events/fiveseven.sc",
    
"events/p90.sc",
    
"events/deagle.sc",
    
"events/p228.sc",
    
"events/glock18.sc",
    
"events/mp5n.sc",
    
"events/tmp.sc",
    
"events/elite_left.sc",
    
"events/elite_right.sc",
    
"events/galil.sc",
    
"events/famas.sc"
};

new 
g_szGunsEventsIdsizeof g_szGunsEvents ];
new 
g_iSettingsiStructSettings ] = { 0, ... };
new 
g_szMapName32 ];
new 
g_szBanCommand512 ];
new 
g_szKickCommand512 ];
new 
g_iFlashVectorsMAX_FLASHBUG_ZONES ][ ];
new 
g_iFlashZones;
new 
boolg_iIsDetected33 ];
new 
g_iDetections33 ][ Cheats ];
new 
g_iBhopScript32 ];
new 
g_iNamesChangesNumber33 ];
new 
g_szRestrictedSymbols32 ];
new 
g_szReCaptchaText33 ][ ];
new 
g_iReCaptcaTrys33 ];
new 
g_iPassedReCaptcha33 ];
new 
g_iHasSecounds33 ];
new 
g_iCheckedCaptchaExipration33 ];
new 
g_szMilfReason128 ];
new 
g_iIgnoreAim33 ];
new 
g_iIgnoreRapid33 ];
new 
g_iIgnoreNoRecoil33 ];
new 
g_iIgnoreSpeedHack33 ];
new 
g_iIgnoreShake33 ];
new 
g_szMilfKeys128 ];

new 
Floatg_fOldAimAngles33 ][ ];
new 
Floatg_fLastAngles33 ][ ];
new 
Floatg_fTotalAngle33 ];
new 
Floatg_fRecoilLastAngles33 ][ ];
new 
Floatg_fLastOrigin33 ][ ];
new 
Floatg_fAimOrigin33 ][ ];
new 
Floatg_fNextAimCheck33 ];
new 
Floatg_fFlashedUntil33 ];

new 
Trieg_tMaliciousIPs;
new 
Trieg_tExcludedIPs;
new 
g_iMessageScreenFade;
new 
g_iMessageChat;

new 
g_iCaptchaVault;

const 
Floatg_fReverse = -1.0;
const 
Floatg_fFraction 9999.0;


public 
plugin_init( ) {
    
// Register plugin
    #if defined USE_BYM_API
        // Initialise ByM API and Register Plugin
        
ByM::Initialiseregister_pluginPLUGINVERSIONAUTHOR ) );
    
#else
        
register_pluginPLUGINVERSIONAUTHOR )
    
#endif

    // Tracking cvar
    
register_cvar"ByM_UltimateAntiCheat""1.6"FCVAR_SERVER );
    
    
// Load lang phrases
    
register_dictionary"UltimateAntiCheat.txt" );
    
    
// Fake Meta module forwards
    
register_forwardFM_Think"fw_FmThink" );
    
register_forwardFM_PlayerPostThink"fw_FmPlayerPostThink" );
    
register_forwardFM_PlayerPreThink"fw_PlayerPreThink" );
    
register_forwardFM_PlaybackEvent"g_fwPlayBackEvent" );
    
register_forwardFM_TraceLine"fw_FmTraceLine" );
    
register_forwardFM_AddToFullPack"fw_FmAddFullToPack");
    
    
// Engine events
    
register_event"ScreenFade""fw_EventPlayerFlashed""b""7=255" );
    
register_event"HLTV""fw_EventNewRound""a""1=0""2=0" );
    
    
// Register Commands
    
formatexg_iBhopScriptcharsmaxg_iBhopScript ), "plop%d%d%d"random100 ), random100 ), random100 ) );
    
register_clcmdg_iBhopScript"fw_CommandCheckBHop" );
    
register_clcmd"say /uaca""ShowAuthors" );
    
register_clcmd"say_team /uaca""ShowAuthors" );
    
register_clcmd"say""fw_ChatCommand" );
    
register_clcmd"say_team""fw_ChatCommand" );

    
// Register messages
    
g_iMessageScreenFade get_user_msgid"ScreenFade" );
    
g_iMessageChat get_user_msgid"SayText" );
}

public 
plugin_precache( ) {
    for( new 
iIterator2 iIterator2 sizeof g_szGunsEvents iIterator2 ++ )
        
g_szGunsEventsIdiIterator2 ] = engfuncEngFunc_PrecacheEvent1g_szGunsEventsiIterator2 ] );
}

public 
plugin_cfg( ) {
    static 
szBaseDir128 ], szUltimateAntiCheatDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszUltimateAntiCheatDircharsmaxszUltimateAntiCheatDir ), "%s/configs/UltimateAntiCheat"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/Settings.cfg"szUltimateAntiCheatDir );
    
    if( !
dir_existsszUltimateAntiCheatDir ) )
        
mkdirszUltimateAntiCheatDir );
    
    if( !
file_existsszFile ) ) {
        
server_print"%L"LANG_SERVER"PRINT_SRV_ERROR" );
        return;
    } else 
server_print"%L"LANG_PLAYER"SUCC_LOADED" );
    
    static 
iFileszBuffer512 ], szKey128 ], szStatus128 ];
    
iFile fopenszFile"rt" );
    
    while( !
feofiFile ) ) {
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || ( szBuffer] == ';' ) || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        
strtokszBufferszKeycharsmaxszKey ), szStatuscharsmaxszStatus ), '=');
        
        for( new 
iIterator PLUGIN_STATUSiIterator <= FAST_NAME_CHANING_NUMBERiIterator ++ ) {
            if( 
equalig_szSettingsNameiIterator ], szKey ) ) {
                if( 
equaliszKey"Ban_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szBanCommandcharsmaxg_szBanCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Kick_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szKickCommandcharsmaxg_szKickCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Check_Name_Symbols" ) ) {
                    
trimszStatus );
                    
formatexg_szRestrictedSymbolscharsmaxg_szRestrictedSymbols ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Keys" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfKeyscharsmaxg_szMilfKeys ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Reason" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfReasoncharsmaxg_szMilfReason ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } 

                
replace_allszStatuscharsmaxszStatus ), "=""" );
                
trimszStatus );
                
g_iSettingsiIterator ] = str_to_numszStatus );
                
                if( 
iIterator >= RAPID_FIRE_PUNISH_NUMBER && iIterator <= FAST_NAME_CHANING_NUMBER )
                    
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], szStatus );
                else 
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], g_iSettingsiIterator ] ? "Enabled" "Disabled" );
            }
        }
    }

    
fcloseiFile );
    
    if( 
g_iSettingsBYM_RECAPTCHA ] ) {
        if( !
g_iSettingsBYM_RECAPTCHA_TIME ] )
            
g_iSettingsBYM_RECAPTCHA_TIME ] = 20;
    }
    
    
LoadFlashBugVectors( );

    
formatexszFilecharsmaxszFile ), "%s/Blocked_IPs.ini"szUltimateAntiCheatDir );
    
LoadMaliciousIPsszFile );
    
    
szFile] = EOS;
    
formatexszFilecharsmaxszFile ), "%s/ByM_AntiBot_Excluded_IPs.ini"szUltimateAntiCheatDir );
    
LoadExcludedIPsszFile );
    
    if( !
g_iSettingsPLUGIN_STATUS ] ) {
        
pause"a" );
        return;
    }
    
    if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] )
        
g_iCaptchaVault nvault_open(  "ByM_ReCaptcha" );

    
//set_task( ADVERTISING_TIME, "Adverstiment", random( 1337 ), "", 0, "b", 0 );

    #if defined USE_TASKS
    
if( g_iSettingsCHECK_RAPIDFIRE ] )
        
set_task1.0"CheckRapidFire"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPINHACK ] )
        
set_task1.0"CheckSpinTotal"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPEEDHACK ] )
        
set_task0.5"CheckSpeedHack"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_LOWRECOIL ] )
        
set_task1.0"ClearRecoil"random1337 ), ""0"b");
    
#else
    
CreateGlobalThinker( );
    
CreateSpeedHackThinker( );
    
#endif
}

#if !defined USE_TASKS
CreateGlobalThinker( ) {
    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_GlobalThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    
register_think"UAC_GlobalThinker""fw_GlobalThink" );
}

public 
fw_GlobalThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers(); iPlayer ++ ) {
        
#if defined USE_BYM_API
        
if( !IsPlayer->ConnectediPlayer ) )
            continue;
        
#else
        
if( !is_user_connectediPlayer ) )
            continue;
        
#endif

        
if( g_iSettingsCHECK_RAPIDFIRE ] && !g_iIgnoreRapidiPlayer ] )
            
CheckRapidFireiPlayer );

        if( 
g_iSettingsCHECK_SPINHACK ] )
            
CheckSpinTotaliPlayer );

        if( 
g_iSettingsCHECK_LOWRECOIL ] )
            
ClearRecoiliPlayer );
    }
}

CreateSpeedHackThinker( ) {
    if( !
g_iSettingsCHECK_SPEEDHACK ] )
        return;

    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_SpeedHackThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    
register_think"UAC_SpeedHackThinker""fw_SpeedHackThink" );
}

public 
fw_SpeedHackThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers( ); iPlayer ++ ) {
        if( !
g_iIgnoreSpeedHackiPlayer ] )
            
CheckSpeedHackiPlayer );
    }
}
#endif

/*public Adverstiment( ) {
    if( !g_iSettings[ PLUGIN_ADVERSTRIMENT ] )
        return;
    
    if( !( random_num( 1, 300 ) == 1 ) )
        return;
    
    set_dhudmessage( 0, 255, 255, -1.0, 0.45, 0, 6.0, 10.0 );
    show_dhudmessage( 0, "This Server is Protected by Ultimate Anti Cheat [v%s]!^nAuthors:^n%s", VERSION, AUTHOR );

    PrintToChat( 0, "!gThis Server is Protected by Ultimate Anti Cheat! - Say !t/uaca !gto see the autors." );
}*/

/*public PlayerConnectedAdv( iTask )
    PrintToChat( iTask - TASK_PLAYER_AD, "!gThis Server is Protected by Ultimate Anti Cheat [v%s]! By: %s", VERSION, AUTHOR );*/

public ShowAuthorsiPlayer )
    
PrintToChatiPlayer"!rAuthors Are: !g%s"AUTHOR );

public 
fw_ChatCommandiPlayer ) {
    if( !
g_iSettingsBYM_RECAPTCHA ] )
        return 
0;

    if( 
g_iPassedReCaptchaiPlayer ] )
        return 
0;

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#else
    
if( !is_user_connectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#endif

    
static szSaid32 ];
    
read_argsszSaidcharsmaxszSaid ) );
    
remove_quotesszSaid );
    
    if( !
szSaid] )
        return 
2;

    if( !
g_iPassedReCaptchaiPlayer ] ) {
        if( 
equaliszSaidg_szReCaptchaTextiPlayer ] ) ) {
            
PrintToChatiPlayer"%L"iPlayer"CORRECT_CAPTCHA" );
            
g_iPassedReCaptchaiPlayer ] = 1;
            
            if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] ) {
                new 
szSteamID64 ];
                
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
            
                new 
szData12 ];
                
num_to_strget_systime( ) + g_iSettingsBYM_RECAPTCHA_REMEMBER ], szDatacharsmaxszData ) );
            
                
nvault_setg_iCaptchaVaultszSteamIDszData );
                
g_iCheckedCaptchaExiprationiPlayer ] = 1;
            }
        } else {
            
PrintToChatiPlayer"%L"iPlayer"WRONG_CAPTCHA"g_iSettingsBYM_RECAPTCHA_TRYS ] - g_iReCaptcaTrysiPlayer ] );
            
g_iReCaptcaTrysiPlayer ] ++;
            
            if( 
g_iReCaptcaTrysiPlayer ] >= g_iSettingsBYM_RECAPTCHA_TRYS ] )
                
PunishUseriPlayer"Fake Player" );
        }
    }

    return 
2;
}

public 
client_connectiPlayer ) {
    for( new 
iIterator iIterator sizeofg_iDetections[ ] ); iIterator ++ )
        
g_iDetectionsiPlayer ][ iIterator ] = 0;
    
    
g_iIsDetectediPlayer ] = false;
    
g_iNamesChangesNumberiPlayer ] = 0;
    
g_iReCaptcaTrysiPlayer ] = 0;
    
g_szReCaptchaTextiPlayer ][ ] = EOS;
    
g_iPassedReCaptchaiPlayer ] = 0;
    
g_iHasSecoundsiPlayer ] = 0;
    
g_iCheckedCaptchaExiprationiPlayer ] = 0;
    
g_iIgnoreAimiPlayer ] = 0;
    
g_iIgnoreRapidiPlayer ] = 0;
    
g_iIgnoreNoRecoiliPlayer ] = 0;
    
g_iIgnoreSpeedHackiPlayer ] = 0;
    
    if( 
g_iSettingsMILF_ANTICHEAT_BINDS ] ) {
        
ExecuteCommandiPlayer"bind del ^"amx_chat [MILF AntiCheatDelete pressed!^"" );
        
ExecuteCommandiPlayer"bind ins ^"amx_chat [MILF AntiCheatInsert pressed!^"" );
        
ExecuteCommandiPlayer"bind pgup ^"amx_chat [MILF AntiCheatPageUP pressed!^"" );
        
ExecuteCommandiPlayer"bind pgdn ^"amx_chat [MILF AntiCheatPageDown pressed!^"" );
        
ExecuteCommandiPlayer"bind end ^"amx_chat [MILF AntiCheatEnd pressed!^"" );
        
ExecuteCommandiPlayer"bind f12 ^"amx_chat [MILF AntiCheatf12 pressed!^"" );
        
ExecuteCommandiPlayer"bind f11 ^"amx_chat [MILF AntiCheatf11 pressed!^"" );
        
ExecuteCommandiPlayer"bind f10 ^"amx_chat [MILF AntiCheatf10 pressed!^"" );
        
ExecuteCommandiPlayer"bind f9 ^"amx_chat [MILF AntiCheatf9 pressed!^"" );
        
ExecuteCommandiPlayer"bind f8 ^"amx_chat [MILF AntiCheatf8 pressed!^"" );
        
ExecuteCommandiPlayer"bind f7 ^"amx_chat [MILF AntiCheatf7 pressed!^"" );
        
ExecuteCommandiPlayer"bind f6 ^"amx_chat [MILF AntiCheatf6 pressed!^"" );
        
ExecuteCommandiPlayer"bind f4 ^"amx_chat [MILF AntiCheatf4 pressed!^"" );
        
ExecuteCommandiPlayer"bind f3 ^"amx_chat [MILF AntiCheatf3 pressed!^"" );
        
ExecuteCommandiPlayer"rebuy;wait:wait:bind f2 ^"amx_chat [MILF AntiCheatf2 pressed!^"" );
        
ExecuteCommandiPlayer"autobuy;wait;wait;bind f1 ^"amx_chat [MILF AntiCheatf1 pressed!^"" );
    }
    

    if( 
task_existsiPlayer TASK_RECAPTCHA ) )
        
remove_taskiPlayer TASK_RECAPTCHA );
        
    if( 
task_existsiPlayer TASK_PLAYER_AD ) )
        
remove_taskiPlayer TASK_PLAYER_AD );
    
    if( 
g_iSettingsCHECK_NAME ] ) {
        static 
szName32 ];
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
        for( new 
iSymbols iSymbols strleng_szRestrictedSymbols ); iSymbols ++ ) {
            for( new 
iNameCharacters iNameCharacters strlenszName ); iNameCharacters ++ ) {
                if( 
szNameiNameCharacters ] == g_szRestrictedSymbolsiSymbols ] ) {
                    
server_cmd"kick #%d ^"%L^""get_user_useridiPlayer ), LANG_PLAYER"WRONG_CH" );
                    
                    if( 
g_iSettingsCNS_SHOW_REASON ] )
                        
PrintToChat0"%L"LANG_PLAYER"KICK_WR_CH"szName );
    
                    break;
                }
            }
        }
    }

    if( 
g_iSettingsCHECK_IPS ] ) {
        if( 
IsMaliciousIPiPlayer ) )
            
server_cmd"kick #%d ^"%L^""get_user_useridiPlayer ), LANG_PLAYER"WRONG_IP" );
    }

    return 
0;
}

public 
client_putinserveriPlayer ) {
    static 
szInfo];
    for( new 
iIterator 0iIterator sizeofg_szOldCheats ); iIterator ++ ) {
        
get_user_infoiPlayerg_szOldCheatsiIterator ], szInfocharsmaxszInfo ) );
        
        if( 
strlenszInfo ) > ) {
            
PunishUseriPlayer"Illegal Symbols in Name" );
            return 
1;
        }
    }

    
#if defined USE_BYM_API
    
ByM::PlayerConnectediPlayer );
    
#endif

    
if( g_iSettingsBYM_RECAPTCHA ] ) {
        
GenerateReCaptchag_szReCaptchaTextiPlayer ], charsmaxg_szReCaptchaText[ ] ) );
        
g_iHasSecoundsiPlayer ] = g_iSettingsBYM_RECAPTCHA_TIME ];
        
set_task3.0"DisplayReCaptcha"iPlayer TASK_RECAPTCHA );
    }
    
    if( 
task_existsiPlayer +  TASK_MILF ) )
        
remove_taskiPlayer +  TASK_MILF );
        
    
//set_task( 20.0, "PlayerConnectedAdv", iPlayer + TASK_PLAYER_AD );
    
return 0;
}

public 
DisplayReCaptchaiTask ) {
    new 
iPlayer iTask TASK_RECAPTCHA;
    
    if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] && !g_iCheckedCaptchaExiprationiPlayer ] ) {
        
g_iCheckedCaptchaExiprationiPlayer ] = 1;
        
        new 
szSteamID64 ];
        
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
        
        new 
szData12 ];
        
nvault_getg_iCaptchaVaultszSteamIDszDatacharsmaxszData ) );
        
        if( 
get_systime( ) < str_to_numszData ) )
            return;
    }

    
g_iHasSecoundsiPlayer ] --;

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) || IsPlayer->BotiPlayer ) || g_iPassedReCaptchaiPlayer ] )
        return;
    
#else
    
if( !is_user_connectediPlayer ) || is_user_botiPlayer ) || g_iPassedReCaptchaiPlayer ] )
        return;
    
#endif

    
if( g_iHasSecoundsiPlayer ] <= ) {
        
PunishUseriPlayer"Fake Player" );
        return;
    }

    
set_dhudmessage0255255, -1.00.206.00.7 );
    
show_dhudmessageiPlayer"%L"iPlayer"BYM_RECAPTCHA_TEXT"g_iHasSecoundsiPlayer ], g_szReCaptchaTextiPlayer ] );

    
set_task1.0"DisplayReCaptcha"iPlayer TASK_RECAPTCHA );
}

stock GenerateReCaptchaszOutput[ ], const iLen ) {
    new 
szChar;
    for( new 
iIterator 0iIterator iLeniIterator ++ ) {
        switch( 
random) ) {
            case 
0szChar random_num'a''z' );
            case 
1szChar random_num'A''Z' );
            case 
2szChar random_num'0''9' );
        }

        
formatexszOutputiIterator ], iLen"%c"szChar );
    }
}

public 
client_authorizediPlayer ) {
    if( !
g_iSettingsANTIBOT_ENABLED ] || is_user_botiPlayer ) )
        return;

    new 
szIP32 ];
    new 
szSteamID64 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
    
    if( !
strlenszIP ) )
        return;
        
    if( !
IsExcludedIPiPlayer ) ) {
        new 
iNumberOfIPs 0;
        new 
szIP232 ];
        
ForEachPlayeriPlayers ) {
            
get_user_ipiPlayersszIP2charsmaxszIP2 ), );
            
            if( 
equalszIPszIP2 ) )
                
iNumberOfIPs ++;
        }
        
        if( 
iNumberOfIPs ) {
            
server_cmd"kick ^"#%d^" ^"There is someone with the same IP on this is server already playing!^"", get_user_userid( iPlayer ) );
            
return;
        }
    }

    if( !
strlenszSteamID ) || containiszSteamID"BOT" ) != -)
        return;
        
    new 
iNumberSteamID 0;
    new 
szSteamID232 ];
    
ForEachPlayeriPlayers ) {
        
get_user_authidiPlayersszSteamID2charsmaxszSteamID2 ) );
        
        if( 
equalszSteamIDszSteamID2 ) )
            
iNumberSteamID ++;
    }
    
    if( 
iNumberSteamID ) {
        
server_cmd"kick ^"#%d^" ^"There is someone with the same Steam ID on this server is already playing!^"", get_user_userid( iPlayer ) );
        
return;
    }
}

public 
client_disconnectediPlayer ) {
    
#if defined USE_BYM_API
    
ByM::PlayerDisconnectediPlayer );
    
#endif
    
    
if( task_existsiPlayer TASK_PLAYER_AD ) )
        
remove_taskiPlayer TASK_PLAYER_AD );
    
    if( 
task_existsiPlayer TASK_RECAPTCHA ) )
        
remove_taskiPlayer TASK_RECAPTCHA );

    if( 
task_existsiPlayer +  TASK_MILF ) )
        
remove_taskiPlayer +  TASK_MILF );
        
    for( new 
iIterator iIterator sizeofg_iDetections[ ] ); iIterator ++ )
        
g_iDetectionsiPlayer ][ iIterator ] = 0;
    
    
g_iIsDetectediPlayer ] = false;
    
g_iNamesChangesNumberiPlayer ] = 0;
    
g_iReCaptcaTrysiPlayer ] = 0;
    
g_szReCaptchaTextiPlayer ][ ] = EOS;
    
g_iPassedReCaptchaiPlayer ] = 0;
    
g_iHasSecoundsiPlayer ] = 0;
    
g_iCheckedCaptchaExiprationiPlayer ] = 0;
    
g_iIgnoreAimiPlayer ] = 0;
    
g_iIgnoreRapidiPlayer ] = 0;
    
g_iIgnoreNoRecoiliPlayer ] = 0;
    
g_iIgnoreSpeedHackiPlayer ] = 0;
}

public 
client_commandiPlayer ) {
    if( !
g_iSettingsMILF_ANTICHEAT_BINDS ] )
        return 
PLUGIN_CONTINUE;
    
    new 
szCommand20 ];
    
read_argv0szCommandcharsmaxszCommand ) );
    
    new 
szParams96 ]
    
read_argsszParamscharsmaxszParams ) );
    
    if( 
equaliszCommand"amx_chat" ) ) {
        if( 
containiszParams"MILF AntiCheat" ) != -) {
            
replace_allszParamscharsmaxszParams ), "[MILF AntiCheat]""" );
            
replace_allszParamscharsmaxszParams ), "pressed!""" );
            
replace_allszParamscharsmaxszParams ), " """ );
            
trimszParams );
            
            new const 
g_szButtons[ ][ ] = { "Delete""Insert""PageUP""PageDown""End""F12""F11""F10""F9""F8""F7""F6""F4""F3""F2""F1" };
            new 
szButtonPressed32 ];
            
szButtonPressed] = EOS;
            
            for( new 
iButtons 0iButtons sizeofg_szButtons ); iButtons ++ ) {
                if( 
containiszParamsg_szButtonsiButtons ] ) != -) {
                    
copyszButtonPressedcharsmaxszButtonPressed ), g_szButtonsiButtons ] );
                    break;
                }
            }
            
            if( 
szButtonPressed] == EOS )
                return 
PLUGIN_CONTINUE;
        
            
// Screenshot on Steam, skip steam players
            
if( IsSteamPlayeriPlayer ) && containiszButtonPressed"F12" ) != -)
                return 
PLUGIN_CONTINUE;
                
            if( !( 
containig_szMilfKeysszButtonPressed ) != -) )
                return 
PLUGIN_CONTINUE;
            
            new 
szTime32 ];
            
get_time"%d.%m.%Y %H:%M:%S"szTimecharsmaxszTime ) );
            
            
PrintToChatiPlayer"!g--------------------------" );
            
PrintToChatiPlayer"!gTime of button %s press: !t%s",szButtonPressedszTime );
            
PrintToChatiPlayer"!g--------------------------" );
            
client_cmdiPlayer"snapshot" );
            
            new 
szReason96 ];
            
formatexszReasoncharsmaxszReason ), "Forbidden button %s pressed!"szButtonPressed );
            
            
WriteToLogiPlayerg_iSettingsPUNISH_TYPE ], ""szReason );
            
            if( 
task_existsiPlayer +  TASK_MILF ) )
                
remove_taskiPlayer +  TASK_MILF );
                
            
set_task2.0"MilfPunishment"iPlayer +  TASK_MILF );
        }
    }
    
    return 
PLUGIN_CONTINUE;
}    

public 
MilfPunishmentiTask ) {
    new 
iPlayer iTask TASK_MILF;
    
    if( !
is_user_connectediPlayer ) )
        return;
    
    
client_cmdiPlayer"snapshot" );
    
    new 
szTime32 ];
    
get_time"%d.%m.%Y %H:%M:%S"szTimecharsmaxszTime ) );
    
    new 
szSteamID64 ];
    
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
            
    
PrintToChatiPlayer"!g--------------------------" );
    
PrintToChatiPlayer"!gTime of ban: !t%s"szTime );
    
PrintToChatiPlayer"!g--------------------------" );
    
    if( !
g_iSettingsMILF_ANTICHEAT_PUNISHMENT ] ) {
        new 
szCommand512 ];
        
copyszCommandcharsmaxszCommand ), g_szKickCommand );
        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
        
replace_allszCommandcharsmaxszCommand ), "[reason]"g_szMilfReason );
        
        
server_print"%s"szCommand );
        
server_cmd"%s"szCommand );
    } else {
        new 
szCommand512 ];
        
copyszCommandcharsmaxszCommand ), g_szBanCommand );
        
        new 
szTime32 ];
        
num_to_strg_iSettingsMILF_ANTICHEAT_TIME ], szTimecharsmaxszTime ) );
        
        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
        
replace_allszCommandcharsmaxszCommand ), "[time]"szTime );
        
replace_allszCommandcharsmaxszCommand ), "[reason]"g_szMilfReason );
        
        
server_print"%s"szCommand );
        
server_cmd"%s"szCommand );
    }
}

public 
LoadFlashBugVectors( ) {
    static 
szBaseDir64 ], szUltimateAntiCheatDir64 ], szFile64 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
get_mapnameg_szMapNamecharsmaxg_szMapName ) );
    
    
formatexszUltimateAntiCheatDircharsmaxszUltimateAntiCheatDir ), "%s/UltimateAntiCheat"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/FlashBug/%s.ini"szUltimateAntiCheatDirg_szMapName );
    
    if( !
file_existsszFile ) ) {
        
server_print"%L"LANG_SERVER"LD_VECTORS"g_szMapName );
        return;
    }
    
    static 
iFileszBuffer128 ], szTemp][ 32 ], iIterator;
    
iFile fopenszFile"rt" );
    
    while( !
feofiFile ) ) {
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( ( 
szBuffer] == ';' ) || ( szBuffer] == '/' && szBuffer] == '/' ) || strlenszBuffer ) < )
            continue;
        
        if( 
parseszBufferszTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ), szTemp], charsmaxszTemp[ ] ) ) != ) {
            
server_print"%L"LANG_SERVER"SV_PRINT_VEC"g_szMapName );
            continue;
        }
        
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
g_iFlashVectorsiIterator ][ ] = str_to_numszTemp] );
        
        
iIterator ++;
    }

    
fcloseiFile );
    
    
g_iFlashZones iIterator;
    
    
server_print"%L"LANG_SERVER"SUC_VEC_LOAD"g_iFlashZonesg_szMapName );
}

public 
fw_EventPlayerFlashediPlayer ) {
    if( !
g_iSettingsBLOCK_NOFLASH ] )
        return 
PLUGIN_CONTINUE

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) )
        return 
PLUGIN_CONTINUE
    
#else
    
if( !is_user_connectediPlayer ) )
        return 
PLUGIN_CONTINUE
    
#endif

    
g_fFlashedUntiliPlayer ] = read_data) / 4096.0 get_gametime( );

    
message_beginMSG_ONE_UNRELIABLEg_iMessageScreenFade, { 00}, iPlayer );
    
write_short);
    
write_short);
    
write_short);
    
write_byte);
    
write_byte);
    
write_byte);
    
write_byte);
    
message_end( );    
    
    return 
PLUGIN_CONTINUE

}

public 
fw_EventNewRound( ) {
    static 
iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];

        
#if defined USE_BYM_API
        
if( g_iSettingsCHECK_SPEEDHACK ] && IsPlayer->AliveiPlayer ) ) {
        
#else
        
if( g_iSettingsCHECK_SPEEDHACK ] && is_user_aliveiPlayer ) ) {
        
#endif
            
static FloatfOrigin];
            
#if defined USE_FAKEMETA
            
peviPlayerpev_originfOrigin );
            
#else
            
entity_get_vectoriPlayerEV_VEC_originfOrigin );
            
#endif
            
            
CopyVectorfOriging_fLastOriginiPlayer ] );
        }
    }
}

public 
fw_FmThinkiEntity ) {
    
#if defined USE_FAKEMETA
    
if( !pev_validiEntity ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_valid_entiEntity ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( !g_iSettingsCHECK_FLASHBUG ] )
        return 
FMRES_IGNORED;
    
    static 
FloatfOrigin], iOrigin], iBugZone];
    static 
szModel32 ];
    
    
#if defined USE_FAKEMETA
    
peviEntitypev_modelszModelcharsmaxszModel ) ); 
    
#else
    
entity_get_stringiEntityEV_SZ_modelszModelcharsmaxszModel ) );
    
#endif
    
    
if( !equaliszModel"models/w_flashbang.mdl" ) )
        return 
FMRES_IGNORED;
    
    static 
iPlayer;
    
#if defined USE_FAKEMETA
    
iPlayer peviEntitypev_owner );
    
#else
    
iPlayer entity_get_edictiEntityEV_ENT_owner );
    
#endif
    
    #if defined USE_FAKEMETA
    
peviEntitypev_originfOrigin );
    
#else
    
entity_get_vectoriEntityEV_VEC_originfOrigin );
    
#endif

    
iOrigin] = floatroundfOrigin] );
    
iOrigin] = floatroundfOrigin] );
    
iOrigin] = floatroundfOrigin] );
    
    for( new 
iIterator 0iIterator g_iFlashZonesiIterator ++ ) {
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
iBugZone] = g_iFlashVectorsiIterator ][ ];
        
        if( 
get_distanceiOriginiBugZone ) <=  g_iFlashVectorsiIterator ][ ] ) {
            
PrintToChat0"%L"LANG_PLAYER"SUCC_RMV_FLB"iOrigin], iOrigin], iOrigin] );
            
engfuncEngFunc_RemoveEntityiEntity );
            
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"ILG_MAP_EXPLOIT" );
            
            
SlapUseriPlayer10.0 );
            return 
FMRES_SUPERCEDE;
        }
    }

    return 
FMRES_IGNORED;
}

public 
fw_PlayerPreThinkiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || IsPlayer->BotiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) || is_user_botiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iSettingsCHECK_MOVEKEYS ] )
        
CheckScriptBlockiPlayer );
    
    if( 
g_iSettingsCHECK_BHOP ] ) {
        
#if defined USE_FAKEMETA
        
if( !( peviPlayerpev_flags ) & FL_ONGROUND ) && ( !( peviPlayer,pev_button ) & IN_JUMP ) || peviPlayerpev_oldbuttons ) & IN_JUMP ) )
        
#else
        
if( !( entity_get_intiPlayerEV_INT_flags ) & FL_ONGROUND ) && ( !( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) || entity_get_intiPlayerEV_INT_oldbuttons ) & IN_JUMP ) )
        
#endif
        
        
client_cmdiPlayer";alias _special %s"g_iBhopScript );
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_FmPlayerPostThinkiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || IsPlayer->BotiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) || is_user_botiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iSettingsCHECK_SPINHACK ] )
        
CheckSpinHack_PostiPlayer );

    if( 
g_iSettingsCHECK_SHAKE ] )
        
CheckShakeiPlayer );
    
    return 
FMRES_IGNORED;
}

public 
fw_FmAddFullToPackiESiEiEntityiHostiFlagsiPlayeriSet ) {
    if( !
g_iSettingsBLOCK_NOFLASH ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiHost ) || IsPlayer->BotiHost ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiHost ) || is_user_botiHost ) )
        return 
FMRES_IGNORED;
    
#endif
        
    
if( iPlayer ) {
        
#if defined USE_BYM_API
        
if( !IsPlayer->AliveiEntity ) || iEntity == iHost )
            return 
FMRES_IGNORED;
        
#else
        
if( !is_user_aliveiEntity ) || iEntity == iHost )
            return 
FMRES_IGNORED;
        
#endif
    
} else {
        
#if defined USE_FAKEMETA
        
if( pev_validiEntity ) ) {
            static 
szClassName33 ];
            
peviEntitypev_classnameszClassNamecharsmaxszClassName ) );
            
            if( !( 
strcmpszClassName"grenade" ) == ) || peviEntitypev_owner ) == iHost )
                return 
FMRES_IGNORED;
        }
        
#else
        
if( is_valid_entiEntity ) ) {
            static 
szClassName33 ];
            
entity_get_stringiEntityEV_SZ_classnameszClassNamecharsmaxszClassName ) );
            
            if( !( 
strcmpszClassName"grenade" ) == ) || entity_get_edictiEntityEV_ENT_owner ) == iHost )
                return 
FMRES_IGNORED;
        }
        
#endif

        
return FMRES_IGNORED;
    }
    
    if( 
get_gametime( ) < g_fFlashedUntiliHost ] ) {
        
forward_returnFMV_CELL);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

}

public 
fw_CommandCheckBHopiPlayer ) {
    if( !
g_iSettingsCHECK_BHOP ] )
        return 
1;

    
#if defined USE_FAKEMETA
    
if( !( peviPlayerpev_flags ) & FL_ONGROUND ) && ( !( peviPlayerpev_button ) & IN_JUMP ) || peviPlayerpev_oldbuttons ) & IN_JUMP ) )
    
#else
    
if( !( entity_get_intiPlayerEV_INT_flags ) & FL_ONGROUND ) && ( !( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) || entity_get_intiPlayerEV_INT_oldbuttons ) & IN_JUMP ) )
    
#endif
        
return 1;
    
    return 
0;
}

public 
CheckShakeiPlayer ) {
    if( 
g_iIgnoreShakeiPlayer ] )
        return 
FMRES_IGNORED;

    static 
FloatfAimAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAimAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
    
#endif
    
    
static iWeaponiTrash;
    
iWeapon get_user_weaponiPlayeriTrashiTrash );
    
    if( 
iWeapon == CSW_M249 )
        return 
FMRES_IGNORED;
    
    
#if defined USE_FAKEMETA
    
if( ( ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) && ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) ) || ( peviPlayerpev_button ) & IN_JUMP ) ) {
    
#else
    
if( ( ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) && ( fAimAngles] ==  g_fOldAimAnglesiPlayer ][ ] ) ) || ( entity_get_intiPlayerEV_INT_button ) & IN_JUMP ) ) {
    
#endif
        
g_iDetectionsiPlayer ][ SHAKE ] -= 10;
        
        if( 
g_iDetectionsiPlayer ][ SHAKE ] < )
            
g_iDetectionsiPlayer ][ SHAKE ] = 0;
    } else 
g_iDetectionsiPlayer ][ SHAKE ]++;
    
    if( 
g_iDetectionsiPlayer ][ SHAKE ] > g_iSettingsSHAKE_WARNING_NUMBER ] ) {
        
set_hudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"SHAKE_WARN" );
    }

    if( 
g_iDetectionsiPlayer ][ SHAKE ] > g_iSettingsSHAKE_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Shake" );
    
    
CopyVectorfAimAnglesg_fOldAimAnglesiPlayer ] );
    return 
FMRES_IGNORED;
}

public 
CheckSpinHack_PostiPlayer ) {
    static 
FloatfAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAngles );
    
#endif
    
    
g_fTotalAngleiPlayer ] += vector_distanceg_fLastAnglesiPlayer ], fAngles );
    
    
CopyVectorfAnglesg_fLastAnglesiPlayer ] );
    
    static 
iButton;
    
#if defined USE_FAKEMETA
    
iButton peviPlayerpev_button );
    
#else
    
iButton entity_get_intiPlayerEV_INT_button );
    
#endif
    
    
if( ( iButton IN_LEFT ) || ( iButton IN_RIGHT ) )
        
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
}

public 
g_fwPlayBackEventiFlagsiPlayeriEventIndex ) {
    if( !
g_iSettingsCHECK_RAPIDFIRE ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iIgnoreNoRecoiliPlayer ] )
        return 
FMRES_IGNORED;
    
    for( new 
iEvents 0iEvents sizeofg_szGunsEvents ); iEvents ++ ) {
        if( 
iEventIndex == g_szGunsEventsIdiEvents ] ) {
            static 
iWeaponiTrash;
            
iWeapon get_user_weaponiPlayeriTrashiTrash );
            
            static 
FloatfAimAngles];
            
#if defined USE_FAKEMETA
            
peviPlayerpev_anglesfAimAngles );
            
#else
            
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
            
#endif
            
            
if( iWeapon == CSW_GLOCK18 || iWeapon == CSW_P90 )
                return 
FMRES_IGNORED;
            
            if( 
g_iSettingsCHECK_RAPIDFIRE ] && !g_iIgnoreRapidiPlayer ] )
                
g_iDetectionsiPlayer ][ RAPIDFIRE ] ++;
            
            if( 
g_iSettingsCHECK_LOWRECOIL ] ) {
                if( ( 
fAimAngles] == g_fRecoilLastAnglesiPlayer ][ ] ) && g_fRecoilLastAnglesiPlayer ][ ] != 0.0 )
                    
g_iDetectionsiPlayer ][ RECOIL ] ++;
                else 
g_iDetectionsiPlayer ][ RECOIL ] --;
                
                
g_fRecoilLastAnglesiPlayer ][ ] = fAimAngles];
                
                if( 
g_iDetectionsiPlayer ][ RECOIL ] > g_iSettingsLOWRECOILL_WARNING_NUMBER ] ) {
                    
set_dhudmessage25500, -1.00.306.03.0 );
                    
show_dhudmessageiPlayer"%L"LANG_PLAYER"LOW_RECOIL" );
                }

                if( 
g_iDetectionsiPlayer ][ RECOIL ] > g_iSettingsLOWRECOILL_PUNISH_NUMBER ] )
                    
PunishUseriPlayer"No Recoil" );
            }
        }
    }

    return 
FMRES_IGNORED;
}

#if defined USE_TASKS
public ClearRecoil( ) {
#else
public ClearRecoiliPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreNoRecoiliPlayer ] )
            continue;

        
g_iDetectionsiPlayer ][ RECOIL ] -= 10;
        
        if( 
g_iDetectionsiPlayer ][ RECOIL ] < )
            
g_iDetectionsiPlayer ][ RECOIL ] = 0;
    }
    
#else
    
g_iDetectionsiPlayer ][ RECOIL ] -= 10;
        
    if( 
g_iDetectionsiPlayer ][ RECOIL ] < )
        
g_iDetectionsiPlayer ][ RECOIL ] = 0;
    
#endif
}

#if defined USE_TASKS
public CheckSpeedHack( ) {
#else
public CheckSpeedHackiPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );

    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreSpeedHackiPlayer ] )
            continue;

        
#if defined USE_BYM_API
        
if( !IsPlayer->AliveiPlayer ) )
            continue;
        
#else
        
if( !is_user_aliveiPlayer ) )
            continue;
        
#endif
        
        
static FloatfOrigin], FloatfOldOrigin], FloatfDistance;
        
#if defined USE_FAKEMETA
        
peviPlayerpev_originfOrigin );
        
#else
        
entity_get_vectoriPlayerEV_VEC_originfOrigin );
        
#endif
        
        
CopyVectorg_fLastOriginiPlayer ], fOldOrigin );
        
        if( 
g_iSettingsSPEEDHACK_SECURE ] ) {
            
fOrigin] = 0.0;
            
fOldOrigin] = 0.0;
        }
        
        
fDistance get_distance_ffOriginfOldOrigin );
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] >= )
            
g_iDetectionsiPlayer ][ SPEEDHACK ]--;
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] < )
            
g_iDetectionsiPlayer ][ SPEEDHACK ] = 0;
        
        if( 
fDistance >= 240.0 )
            
g_iDetectionsiPlayer ][ SPEEDHACK ] += 3;
        
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_WARNING_NUMBER ] ) {
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPEED_HACK" );
            
            
client_cmdiPlayer"spk %s"g_szWarningSounds] );
        }
        if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Speed Hack" );
        
        
CopyVectorfOriging_fLastOriginiPlayer ] );
    }
    
#else
    
    #if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) || !IsPlayer->ConnectediPlayer ) )
        return;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return;
    
#endif
        
    
static FloatfOrigin], FloatfOldOrigin], FloatfDistance;
    
#if defined USE_FAKEMETA
    
peviPlayerpev_originfOrigin );
    
#else
    
entity_get_vectoriPlayerEV_VEC_originfOrigin );
    
#endif
        
    
CopyVectorg_fLastOriginiPlayer ], fOldOrigin );
        
    if( 
g_iSettingsSPEEDHACK_SECURE ] ) {
        
fOrigin] = 0.0;
        
fOldOrigin] = 0.0;
    }
        
    
fDistance get_distance_ffOriginfOldOrigin );
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] >= )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] --;
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] < )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] = 0;
        
    if( 
fDistance >= 350.0 )
        
g_iDetectionsiPlayer ][ SPEEDHACK ] += 3;
        
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_WARNING_NUMBER ] ) {
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPEED_HACK" );
    }
    
    if( 
g_iDetectionsiPlayer ][ SPEEDHACK ] > g_iSettingsSPEEDHACK_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Speed Hack" );
        
    
CopyVectorfOriging_fLastOriginiPlayer ] );
    
#endif
}

#if defined USE_TASKS
public CheckSpinTotal( ) {
#else
public CheckSpinTotaliPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );
    
    for( new 
iIterator 0iIterator iNumber iIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_fTotalAngleiPlayer ] >= 1500.0 ) {        
            if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_WARNING_NUMBER ] ) {
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPIN_HACK" );
                
                
client_cmdiPlayer"spk %s"g_szWarningSounds] );
            }
            if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_PUNISH_NUMBER ] )
                
PunishUseriPlayer"Spin Bot" );
            
            
g_iDetectionsiPlayer ][ SPINHACK ] ++;
        }
        else 
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
        
        
g_fTotalAngleiPlayer ] = 0.0;
    }
    
#else
    
if( g_fTotalAngleiPlayer ] >= 1500.0 ) {        
        if( 
g_iDetectionsiPlayer ][ SPINHACK ] >= g_iSettingsSPINHACK_WARNING_NUMBER ] ) {
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"SPIN_HACK" );
                
            
//client_cmd( iPlayer, "spk %s", g_szWarningSounds[ 1 ] );
        
}
        
        if( 
g_iDetectionsiPlayer ][ SPINHACK ] > g_iSettingsSPINHACK_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Spin Bot" );
            
        
g_iDetectionsiPlayer ][ SPINHACK ] ++;
    }
    else 
g_iDetectionsiPlayer ][ SPINHACK ] = 0;
    
    
g_fTotalAngleiPlayer ] = 0.0;
    
#endif
}

#if defined USE_TASKS
public CheckRapidFire( ) {
#else
public CheckRapidFireiPlayer ) {
#endif
    #if defined USE_TASKS
    
static iPlayers32 ], iNumberiPlayer;
    
get_playersiPlayersiNumber"ach" );
    
    for( new 
iIterator 0iIterator iNumberiIterator ++ ) {
        
iPlayer iPlayersiIterator ];
        
        if( 
g_iIgnoreRapidiPlayer ] )
            continue;
        
        if( 
g_iDetectionsiPlayer ][ RAPIDFIRE ] >= g_iSettingsRAPID_FIRE_PUNISH_NUMBER ] )
            
PunishUseriPlayer"Rapid" );
        
        
g_iDetectionsiPlayer ][ RAPIDFIRE ] = 0;
    }
    
#else
    
if( g_iDetectionsiPlayer ][ RAPIDFIRE ] >= g_iSettingsRAPID_FIRE_PUNISH_NUMBER ] )
        
PunishUseriPlayer"Rapid" );
        
    
g_iDetectionsiPlayer ][ RAPIDFIRE ] = 0;
    
#endif
}

public 
CheckScriptBlockiPlayer ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif

    
static FloatfAimAngles];
    
#if defined USE_FAKEMETA
    
peviPlayerpev_anglesfAimAngles );
    
#else
    
entity_get_vectoriPlayerEV_VEC_anglesfAimAngles );
    
#endif
    
    
CopyVectorfAimAnglesg_fAimOriginiPlayer ] );
    
    static 
iButton;
    
#if defined USE_FAKEMETA
    
iButton peviPlayerpev_button );
    
#else
    
iButton entity_get_intiPlayerEV_INT_button );
    
#endif
    
    
if( iButton IN_LEFT ) {
        
client_cmdiPlayer"-left" );
        
        
CopyVectorg_fAimOriginiPlayer ], fAimAngles );
        
        
#if defined USE_FAKEMETA
        
peviPlayerpev_anglesfAimAngles );
        
#else
        
entity_set_vectoriPlayerEV_VEC_anglesfAimAngles );
        
#endif

        
set_peviPlayerpev_fixangle);
        
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"LF_R_L_KEYS" );
    }
    else if( 
iButton IN_RIGHT ) {
        
client_cmdiPlayer"-right" );
        
        
CopyVectorg_fAimOriginiPlayer ], fAimAngles );
        
        
#if defined USE_FAKEMETA
        
set_peviPlayerpev_anglesfAimAngles );
        
#else
        
entity_set_vectoriPlayerEV_VEC_anglesfAimAngles );
        
#endif

        
set_peviPlayerpev_fixangle);
        
        
set_dhudmessage25500, -1.00.306.03.0 );
        
show_dhudmessageiPlayer"%L"LANG_PLAYER"LF_R_L_KEYS" );
    }
    
    if( 
g_iSettingsCHECK_DOUBLEATTACK ] ) {
        if( ( 
iButton IN_ATTACK ) && ( iButton IN_ATTACK2 ) ) {
            
iButton iButton & ~IN_ATTACK2;

            
#if defined USE_FAKEMETA
            
set_peviPlayerpev_buttoniButton );
            
#else
            
entity_set_intiPlayerEV_INT_buttoniButton );
            
#endif
            
            
set_dhudmessage25500, -1.00.306.03.0 );
            
show_dhudmessageiPlayer"%L"LANG_PLAYER"DUAL_ATTACK" );
            
            return 
FMRES_SUPERCEDE;
        }
    }

    return 
FMRES_IGNORED;
}

public 
client_infochangediPlayer ) {
    static 
szNewName32 ], szOldName32 ];
    
    
get_user_nameiPlayerszOldNamecharsmaxszOldName ) );
    
get_user_infoiPlayer"name"szNewNamecharsmaxszNewName ) );
    
    if( !
equaliszNewNameszOldName ) ) {
        if( !
g_iSettingsCHECK_FASTNAME ] )
            return 
1;
        
        
g_iNamesChangesNumberiPlayer ] ++;
        
        if( 
g_iNamesChangesNumberiPlayer ] >= g_iSettingsFAST_NAME_CHANING_NUMBER ] )
            
PunishUseriPlayer"Fast Name Changing" );
        
        if( !
task_existsiPlayer ) )
            
set_task4.0"ClearChangesNum"iPlayer );
    }

    return 
0;
}

public 
ClearChangesNumiPlayer )
    
g_iNamesChangesNumberiPlayer ] = 0;

public 
fw_FmTraceLineFloatfStartPos], FloatfEndPos], iSkipMonstersiPlayeriTrace ) {
    if( !
g_iSettingsCHECK_AIMBOT ] )
        return 
FMRES_IGNORED;

    
#if defined USE_BYM_API
    
if( !IsPlayer->AliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#else
    
if( !is_user_aliveiPlayer ) )
        return 
FMRES_IGNORED;
    
#endif
    
    
if( g_iIgnoreAimiPlayer ] )
        return 
FMRES_IGNORED;
    
    static 
FloatfGameTime;
    
fGameTime get_gametime( );
    
    if( 
g_fNextAimCheckiPlayer ] < fGameTime ) {
        static 
iTargetiHitGroupiButton;

        
iTarget get_tr2iTraceTR_pHit );
        
iHitGroup = ( << get_tr2iTraceTR_iHitgroup ) );

        
#if defined USE_FAKEMETA
        
iButton peviPlayerpev_button );
        
#else
        
iButton entity_get_intiPlayerEV_INT_button );
        
#endif
        
        
        #if defined USE_BYM_API
        
if( !IsPlayer->AliveiTarget ) )
            return 
FMRES_IGNORED;
        
#else
        
if( !is_user_aliveiTarget ) )
            return 
FMRES_IGNORED;
        
#endif
        
        
if( get_pdata_intiPlayerFM_TEAM_OFFSET ) != get_pdata_intiTargetFM_TEAM_OFFSET ) ) {
            if( ( 
iHitGroup FM_HITGROUP_HEAD ) && ( iButton != ) )
                
g_iDetectionsiPlayer ][ AIMBOT ] ++;

            else if( !( 
iHitGroup FM_HITGROUP_HEAD ) || ( iButton <= ) )
                
g_iDetectionsiPlayer ][ AIMBOT ] = 0;
            
            if( 
g_iDetectionsiPlayer ][ AIMBOT ] > g_iSettingsAIMBOT_WARNING_NUMBER ] ) {
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"AIM_BOT" );            }

            if( 
g_iDetectionsiPlayer ][ AIMBOT ] > g_iSettingsAIMBOT_PUNISH_NUMBER ] )
                
PunishUseriPlayer"AIM BOT" );
            
            
g_fNextAimCheckiPlayer ] = fGameTime 0.5;
        }
    }

    return 
FMRES_IGNORED;
}

stock CountCheaters( ) {
    static 
szBaseDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszFilecharsmaxszFile ), "%s/configs/UltimateAntiCheat/NumberOfDetects.txt"szBaseDir );
    
    if( !
file_existsszFile ) )
        
write_fileszFile"; Ultimate Anticheat number of players detected.", -);
        
    static 
iLineiLengthszBuffer16 ];
    
iLine read_fileszFileiLineszBuffercharsmaxszBuffer ), iLength );
    
    static 
iNumber;
    
iNumber str_to_numszBuffer );
    
    
iNumber ++;
    
    
num_to_striNumberszBuffercharsmaxszBuffer ) );
    
    
write_fileszFileszBuffer);
}

stock SlapUseriPlayerFloatfDamage 0.0 ) {
    
#if defined USE_FAKEMETA
    
static FloatfPunchangle];
    
peviPlayerpev_punchanglefPunchangle );
    
    
fPunchangle] += random_float( -8.08.0 );
    
fPunchangle] += random_float( -8.08.0 );
    
    
set_peviPlayerpev_punchanglefPunchangle );
    
    static 
FloatfVelocity];
    
peviPlayerpev_velocityfVelocity );
    
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
    
set_peviPlayerpev_basevelocityfVelocity );
    
#else
    
static FloatfPunchangle];
    
entity_get_vectoriPlayerEV_VEC_punchanglefPunchangle );
    
    
fPunchangle] += random_float( -8.08.0 );
    
fPunchangle] += random_float( -8.08.0 );
    
    
entity_set_vectoriPlayerEV_VEC_punchanglefPunchangle );
    
    static 
FloatfVelocity];
    
entity_get_vectoriPlayerEV_VEC_velocityfVelocity );
    
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
fVelocity] += random_num0) ? 264.0 : -264.0;
    
    
entity_set_vectoriPlayerEV_VEC_basevelocityfVelocity );
    
#endif
    
    
fm_fakedamageiPlayer"worldspawn"fDamage);
    
    return 
1;
}

stock PunishUseriPlayer, const szCheat[ ] ) {
    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) )
        return;
    
#else
    
if( !is_user_connectediPlayer ) )
        return;
    
#endif
    
    
if( g_iSettingsIGNORE_ADMINS ] ) {
        if( 
accessiPlayerADMIN_IGNORE_FLAG ) ) {
            
WriteToLogiPlayer0"""" );
            return;
        }
    }
    
    if( !
g_iIsDetectediPlayer ] ) {
        static 
szName32 ], szSteamID32 ], iUid;
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
        
iUid get_user_useridiPlayer );
        
        switch( 
g_iSettingsPUNISH_TYPE ] ) {
            case 
0: {    
                
set_dhudmessage25500, -1.00.306.03.0 );
                
show_dhudmessageiPlayer"%L"LANG_PLAYER"HACK_DETECT"szCheat );
                
                
PrintToChat0"%L"LANG_PLAYER"ID_WITH_HACK"szNameszCheat );
            }
            case 
1: {
                
server_cmd"kick #%d ^"%L^""iUidLANG_PLAYER"HACK_DETECT"szCheat );
                
                
PrintToChat0"%L"LANG_PLAYER"KICK_HAVE_CHEAT"szNameszCheat );
            } 
            case 
2: {        
                switch( 
g_iSettingsBAN_TYPE ] ) {
                    
// STEAM ID
                    
case 0: {
                        
server_cmd"kick #%d;wait;wait;wait;banid %d ^"%s^";wait;wait;wait;writeid"iUidg_iSettingsBAN_TIME ], szSteamIDszCheat );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                    
                    
// IP
                    
case 1: {
                        static 
szIp32 ];
                        
get_user_ipiPlayerszIpcharsmaxszIp ), );
                        
                        
server_cmd"kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;writeip"iUidg_iSettingsBAN_TIME ], szIpszCheat );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                    
                    
// Ban Command
                    
case 2: {
                        new 
szCommand512 ];
                        
copyszCommandcharsmaxszCommand ), g_szBanCommand );
        
                        new 
szTime32 ];
                        
num_to_strg_iSettingsBAN_TIME ], szTimecharsmaxszTime ) );
        
                        
replace_allszCommandcharsmaxszCommand ), "[player]"szSteamID );
                        
replace_allszCommandcharsmaxszCommand ), "[time]"szTime );
                        
                        new 
szReason64 ];
                        
formatexszReasoncharsmaxszReason ), "Cheat Detected: %s"szCheat );
                        
replace_allszCommandcharsmaxszCommand ), "[reason]"szReason );
        
                        
server_cmd"%s"szCommand );
                        
PrintToChat0"%L"LANG_PLAYER"BAN_MIN_CHEAT"szNameg_iSettingsBAN_TIME ], szCheat );
                    }
                }
            }
        }
        
        
CountCheaters( );
        
WriteToLogiPlayerg_iSettingsPUNISH_TYPE ], ""szCheat );
        
        
g_iIsDetectediPlayer ] = true;
    }
}

stock CopyVectorFloatfVector1], FloatfVector2] ) {
    
fVector2] = fVector1];
    
fVector2] = fVector1];
    
fVector2] = fVector1];
}

stock WriteToLogiPlayer_:iType, const szString[ ], const szCheat[ ] ) {
    if( !
g_iSettingsPLUGIN_LOG_ACTIONS ] )
        return;
    
    static 
szBaseDir128 ], szLogsDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszLogsDircharsmaxszLogsDir ), "%s/configs/UltimateAntiCheat/Logs"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/UltimateAntiCheat.log"szLogsDir );
    
    if( !
dir_existsszLogsDir ) )
        
mkdirszLogsDir );
    
    if( !
file_existsszFile ) )
        
write_fileszFile"; Ultimate Anti Cheat Logs file.", -);
    
    static 
szName32 ], szIp32 ];
    
    if( 
iType != -) {
        
get_user_nameiPlayerszNamecharsmaxszName ) );
        
get_user_ipiPlayerszIpcharsmaxszIp ), );
    }
    
    switch( 
iType ) {
        case -
: { log_to_fileszFile"%s"szString ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_1"szIpszNameszCheat ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_2"szIpszNameszCheat ); }
        case 
: { log_to_fileszFile"%L"LANG_PLAYER"LOG_F_3"szIpszNameszCheat ); }
    }
}

stock boolIsMaliciousIPiPlayer ) {
    new 
szIP32 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
    return 
boolTrieKeyExistsg_tMaliciousIPsszIP );
}

stock LoadMaliciousIPs( const szFile[ ] ) {
    if( 
g_tMaliciousIPs )
        
TrieDestroyg_tMaliciousIPs );

    
g_tMaliciousIPs TrieCreate( );

    new 
iFile fopenszFile"rt" );
    
    if( !
iFile )
        
write_fileszFile"", -);
    
    while( !
feofiFile ) ) {
        static 
szBuffer64 ];
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || szBuffer] == ';' || szBuffer] == '#' || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        if( !
TrieKeyExistsg_tMaliciousIPsszBuffer ) )
            
TrieSetStringg_tMaliciousIPsszBufferszBuffer );
    }

    
fcloseiFile );
}

stock boolIsExcludedIPiPlayer ) {
    new 
szIP32 ];
    
get_user_ipiPlayerszIPcharsmaxszIP ), );
    
    return 
boolTrieKeyExistsg_tExcludedIPsszIP );
}

stock LoadExcludedIPs( const szFile[ ] ) {
    if( 
g_tExcludedIPs )
        
TrieDestroyg_tExcludedIPs );

    
g_tExcludedIPs TrieCreate( );

    new 
iFile fopenszFile"rt" );
    
    if( !
iFile )
        
write_fileszFile"", -);
    
    while( !
feofiFile ) ) {
        static 
szBuffer64 ];
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || szBuffer] == ';' || szBuffer] == '#' || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        if( !
TrieKeyExistsg_tExcludedIPsszBuffer ) )
            
TrieSetStringg_tExcludedIPsszBufferszBuffer );
    }

    
fcloseiFile );
}

stock PrintToChatiPlayer, const szInput[ ], any:... ) {
    static 
szMessage191 ];
    
vformatszMessagecharsmaxszMessage ), szInput);
    
replace_allszMessagecharsmaxszMessage ), "!g""^4" );
    
replace_allszMessagecharsmaxszMessage ), "!t""^3" );
    
replace_allszMessagecharsmaxszMessage ), "!r""^2" );
    
replace_allszMessagecharsmaxszMessage ), "!n""^1" );
     
    if( 
iPlayer == ) {
        
ForEachPlayeriTarget ) {
            
#if defined USE_BYM_API
            
if( !IsPlayer->ConnectediTarget ) || IsPlayer->BotiTarget ) )
                return;
            
#else
            
if( !is_user_connectediTarget ) || is_user_botiTarget ) )
                return;
            
#endif
            
            
message_beginMSG_ONE_UNRELIABLEg_iMessageChat_iTarget );
            
write_byteiTarget );
            
write_stringszMessage );
            
message_end( );
        }
    } else {
        
#if defined USE_BYM_API
            
if( !IsPlayer->ConnectediPlayer ) || IsPlayer->BotiPlayer ) )
                return;
            
#else
            
if( !is_user_connectediPlayer ) || is_user_botiPlayer ) )
                return;
            
#endif
        
        
message_beginMSG_ONE_UNRELIABLEg_iMessageChat_iPlayer );
        
write_byteiPlayer );
        
write_stringszMessage );
        
message_end( );
    }
}

ExecuteCommandiPlayer, const szCommand[ ], any:... ) {
    new 
szText256 ];
    
vformatszTextcharsmaxszText ), szCommand);
    
    
message_beginMSG_ONESVC_DIRECTOR_iPlayer );
    
write_bytestrlenszText ) + );
    
write_byte10 );
    
write_stringszText );
    
message_end( );
}

stock boolIsSteamPlayeriPlayer ) {
    new 
iDpPointer;
    
    if( 
iDpPointer || ( iDpPointer get_cvar_pointer"dp_r_id_provider" ) ) ) {
        
server_cmd"dp_clientinfo %d"iPlayer );
        
server_exec( );
        return ( 
get_pcvar_numiDpPointer ) == ) ? true false
    
}
    
    return 
false
}

public 
plugin_natives( ) {
    
register_native"uac_set_ignore_aim""NativeSetIgnoreAim");
    
register_native"uac_set_ignore_rapid""NativeSetIgnoreRapid");
    
register_native"uac_set_ignore_norecoil""NativeSetIgnoreNoRecoil");
    
register_native"uac_set_ignore_speedhack""NativeSetIgnoreSpeed");
    
register_native"uac_set_ignore_shake""NativeSetIgnoreShake");
}

public 
NativeSetIgnoreAimiPlayeriValue )
    
g_iIgnoreAimiPlayer ] = iValue;
    
public 
NativeSetIgnoreRapidiPlayeriValue )
    
g_iIgnoreRapidiPlayer ] = iValue;
    
public 
NativeSetIgnoreNoRecoiliPlayeriValue )
    
g_iIgnoreNoRecoiliPlayer ] = iValue;
    
public 
NativeSetIgnoreSpeediPlayeriValue )
    
g_iIgnoreSpeedHackiPlayer ] = iValue;

public 
NativeSetIgnoreShakeiPlayeriValue )
    
g_iIgnoreShakeiPlayer ] = iValue;

public 
plugin_end( ) {
    if( 
g_tMaliciousIPs )
        
TrieDestroyg_tMaliciousIPs );
        
    if( 
g_iCaptchaVault )
        
nvault_closeg_iCaptchaVault );

I got Error while compile

-[fatal error 100: cannot read from file: "bym_api"

Compilation aborted.
1 Error.]
Whoisnext is offline
toki
Junior Member
Join Date: Feb 2021
Old 04-16-2021 , 23:12   Re: [Request] Edit UAC.sma
Reply With Quote #5

PHP Code:
// Based on the original: Sakura's AntiCheat (https://forums.alliedmods.net/showthread.php?t=78765)

// Enabled: More Optimized
#define USE_BYM_API        1

#if defined  USE_BYM_API
#include < bym_api >
#else
#include < amxmodx >
#include < hamsandwich >
#endif

#include < amxmisc >
#include < fakemeta_util >
#include < dhudmessage >
#include < cstrike >
#include < engine >
#include < nvault >

#define PLUGIN             "Ultimate Anti-Cheat"
#define VERSION         "1.6"
#define AUTHOR             "Milutinke (ByM) and Ilham Sakura"

#define MAX_FLASHBUG_ZONES     20
#define ADVERTISING_TIME     240.0

#define FM_HITGROUP_HEAD     ( 1 << 1 )
#define FM_TEAM_OFFSET         114

#define TASK_RECAPTCHA        7624543
#define TASK_MILF        7624544
#define TASK_PLAYER_AD        7624545

#define ADMIN_IGNORE_FLAG     ADMIN_BAN

// Disabled: Very Optimized
//#define USE_TASKS        1
//#define USE_FAKEMETA        1

enum _:iStructSettings {
    
PLUGIN_STATUS 0,
    
PLUGIN_ADVERSTRIMENT,
    
PLUGIN_LOG_ACTIONS,
    
    
PUNISH_TYPE,
    
BAN_TYPE,
    
BAN_TIME,
    
IGNORE_ADMINS,
    
    
SPEEDHACK_SECURE,
    
    
BAN_COMMAND,
    
KICK_COMMAND,
    
    
CHECK_RAPIDFIRE,
    
CHECK_SPINHACK,
    
CHECK_SPEEDHACK,
    
CHECK_SHAKE,
    
CHECK_LOWRECOIL,
    
CHECK_AIMBOT,
    
CHECK_BHOP,
    
    
CHECK_MOVEKEYS,
    
CHECK_DOUBLEATTACK,
    
    
CHECK_FLASHBUG,

    
BLOCK_NOFLASH,
    
    
CHECK_FASTNAME,
    
CHECK_NAME,
    
CHECK_NAME_SYMBOLS,
    
CNS_SHOW_REASON,
    
CHECK_IPS,
    
ANTIBOT_ENABLED,
    
BYM_RECAPTCHA,
    
BYM_RECAPTCHA_TIME,
    
BYM_RECAPTCHA_TRYS,
    
BYM_RECAPTCHA_REMEMBER,
    
MILF_ANTICHEAT_BINDS,
    
MILF_ANTICHEAT_KEYS,
    
MILF_ANTICHEAT_PUNISHMENT,
    
MILF_ANTICHEAT_TIME,
    
MILF_ANTICHEAT_REASON,
    
    
RAPID_FIRE_PUNISH_NUMBER,
    
SPINHACK_WARNING_NUMBER,
    
SPINHACK_PUNISH_NUMBER,
    
SPEEDHACK_WARNING_NUMBER,
    
SPEEDHACK_PUNISH_NUMBER,
    
SHAKE_WARNING_NUMBER,
    
SHAKE_PUNISH_NUMBER,
    
LOWRECOILL_WARNING_NUMBER,
    
LOWRECOILL_PUNISH_NUMBER,
    
AIMBOT_WARNING_NUMBER,
    
AIMBOT_PUNISH_NUMBER,
    
FAST_NAME_CHANING_NUMBER
};

enum _:Cheats {
    
RAPIDFIRE 0,
    
SPINHACK,
    
SPEEDHACK,
    
SHAKE,
    
RECOIL,
    
AIMBOT
};

new const 
g_szSettingsName[ ][ ] = {
    
"Plugin_Status",
    
"Plugin_Adverstriment",
    
"Plugin_Log_Actions",
    
"Punish_Type",
    
"Punish_Ban_Type",
    
"Punish_Bantime",
    
"Ignore_Admins",
    
"Speedhack_Secure",
    
"Ban_Command",
    
"Kick_Command",
    
"Check_Rapidfire",
    
"Check_Spinhack",
    
"Check_Speedhack",
    
"Check_Shake",
    
"Check_Lowrecoil",
    
"Check_Aimbot",
    
"Check_Bhop",
    
"Check_Movekeys",
    
"Check_Doubleattack",
    
"Check_Flashbug",
    
"Block_NoFlash",
    
"Check_Name_Fastchange",
    
"Check_Name",
    
"Check_Name_Symbols",
    
"CNS_Show_Reason",
    
"Check_IPs",
    
"AntiBot_Enabled",
    
"ByM_ReCaptcha_Enabled",
    
"ByM_ReCaptcha_Secounds",
    
"ByM_ReCaptcha_NumberOfTrys",
    
"ByM_ReCaptcha_Remeber_Time",
    
"Milf_AntiCheat",
    
"Milf_AntiCheat_Keys",
    
"Milf_AntiCheat_Punishment",
    
"Milf_AntiCheat_BanTime",
    
"Milf_AntiCheat_Reason",
    
    
"Rapid_Punish_Number",
    
"SpinHack_Warning_Number",
    
"SpinHack_Punish_Number",
    
"SpeedHack_Warning_Number",
    
"SpeedHack_Punish_Number",
    
"Shake_Warning_Number",
    
"Shake_Punish_Number",
    
"LowRecoill_Warning_Number",
    
"LowRecoill_Punish_Number",
    
"AimBot_Warning_Number",
    
"AimBot_Punish_Number",
    
"Fast_Name_Changing_Number"
};

new const 
g_szOldCheats[ ][ ] = {
    
"EcstaticCheat",
    
"TeKilla",
    
"MicCheat",
    
"AlphaCheat",
    
"PimP",
    
"LCD",
    
"Chapman",
    
"_PRJVDC"
};

new const 
g_szGunsEvents[ ][ ] = {
    
"events/awp.sc",
    
"events/g3sg1.sc",
    
"events/ak47.sc",
    
"events/scout.sc",
    
"events/m249.sc",
    
"events/m4a1.sc",
    
"events/sg552.sc",
    
"events/aug.sc",
    
"events/sg550.sc",
    
"events/m3.sc",
    
"events/xm1014.sc",
    
"events/usp.sc",
    
"events/mac10.sc",
    
"events/ump45.sc",
    
"events/fiveseven.sc",
    
"events/p90.sc",
    
"events/deagle.sc",
    
"events/p228.sc",
    
"events/glock18.sc",
    
"events/mp5n.sc",
    
"events/tmp.sc",
    
"events/elite_left.sc",
    
"events/elite_right.sc",
    
"events/galil.sc",
    
"events/famas.sc"
};

new 
g_szGunsEventsIdsizeof g_szGunsEvents ];
new 
g_iSettingsiStructSettings ] = { 0, ... };
new 
g_szMapName32 ];
new 
g_szBanCommand512 ];
new 
g_szKickCommand512 ];
new 
g_iFlashVectorsMAX_FLASHBUG_ZONES ][ ];
new 
g_iFlashZones;
new 
boolg_iIsDetected33 ];
new 
g_iDetections33 ][ Cheats ];
new 
g_iBhopScript32 ];
new 
g_iNamesChangesNumber33 ];
new 
g_szRestrictedSymbols32 ];
new 
g_szReCaptchaText33 ][ ];
new 
g_iReCaptcaTrys33 ];
new 
g_iPassedReCaptcha33 ];
new 
g_iHasSecounds33 ];
new 
g_iCheckedCaptchaExipration33 ];
new 
g_szMilfReason128 ];
new 
g_iIgnoreAim33 ];
new 
g_iIgnoreRapid33 ];
new 
g_iIgnoreNoRecoil33 ];
new 
g_iIgnoreSpeedHack33 ];
new 
g_iIgnoreShake33 ];
new 
g_szMilfKeys128 ];

new 
Floatg_fOldAimAngles33 ][ ];
new 
Floatg_fLastAngles33 ][ ];
new 
Floatg_fTotalAngle33 ];
new 
Floatg_fRecoilLastAngles33 ][ ];
new 
Floatg_fLastOrigin33 ][ ];
new 
Floatg_fAimOrigin33 ][ ];
new 
Floatg_fNextAimCheck33 ];
new 
Floatg_fFlashedUntil33 ];

new 
Trieg_tMaliciousIPs;
new 
Trieg_tExcludedIPs;
new 
g_iMessageScreenFade;
new 
g_iMessageChat;

new 
g_iCaptchaVault;

const 
Floatg_fReverse = -1.0;
const 
Floatg_fFraction 9999.0;


public 
plugin_init( ) {
    
// Register plugin
    #if defined USE_BYM_API
        // Initialise ByM API and Register Plugin
        
ByM::Initialiseregister_pluginPLUGINVERSIONAUTHOR ) );
    
#else
        
register_pluginPLUGINVERSIONAUTHOR )
    
#endif

    // Tracking cvar
    
register_cvar"ByM_UltimateAntiCheat""1.6"FCVAR_SERVER );
    
    
// Load lang phrases
    
register_dictionary"UltimateAntiCheat.txt" );
    
    
// Fake Meta module forwards
    
register_forwardFM_Think"fw_FmThink" );
    
register_forwardFM_PlayerPostThink"fw_FmPlayerPostThink" );
    
register_forwardFM_PlayerPreThink"fw_PlayerPreThink" );
    
register_forwardFM_PlaybackEvent"g_fwPlayBackEvent" );
    
register_forwardFM_TraceLine"fw_FmTraceLine" );
    
register_forwardFM_AddToFullPack"fw_FmAddFullToPack");
    
    
// Engine events
    
register_event"ScreenFade""fw_EventPlayerFlashed""b""7=255" );
    
register_event"HLTV""fw_EventNewRound""a""1=0""2=0" );
    
    
// Register Commands
    
formatexg_iBhopScriptcharsmaxg_iBhopScript ), "plop%d%d%d"random100 ), random100 ), random100 ) );
    
register_clcmdg_iBhopScript"fw_CommandCheckBHop" );
    
register_clcmd"say /uaca""ShowAuthors" );
    
register_clcmd"say_team /uaca""ShowAuthors" );
    
register_clcmd"say""fw_ChatCommand" );
    
register_clcmd"say_team""fw_ChatCommand" );

    
// Register messages
    
g_iMessageScreenFade get_user_msgid"ScreenFade" );
    
g_iMessageChat get_user_msgid"SayText" );
}

public 
plugin_precache( ) {
    for( new 
iIterator2 iIterator2 sizeof g_szGunsEvents iIterator2 ++ )
        
g_szGunsEventsIdiIterator2 ] = engfuncEngFunc_PrecacheEvent1g_szGunsEventsiIterator2 ] );
}

public 
plugin_cfg( ) {
    static 
szBaseDir128 ], szUltimateAntiCheatDir128 ], szFile128 ];
    
get_basedirszBaseDircharsmaxszBaseDir ) );
    
    
formatexszUltimateAntiCheatDircharsmaxszUltimateAntiCheatDir ), "%s/configs/UltimateAntiCheat"szBaseDir );
    
formatexszFilecharsmaxszFile ), "%s/Settings.cfg"szUltimateAntiCheatDir );
    
    if( !
dir_existsszUltimateAntiCheatDir ) )
        
mkdirszUltimateAntiCheatDir );
    
    if( !
file_existsszFile ) ) {
        
server_print"%L"LANG_SERVER"PRINT_SRV_ERROR" );
        return;
    } else 
server_print"%L"LANG_PLAYER"SUCC_LOADED" );
    
    static 
iFileszBuffer512 ], szKey128 ], szStatus128 ];
    
iFile fopenszFile"rt" );
    
    while( !
feofiFile ) ) {
        
fgetsiFileszBuffercharsmaxszBuffer ) );
        
        if( 
szBuffer] == EOS || ( szBuffer] == ';' ) || ( szBuffer] == '/' && szBuffer] == '/' ) )
            continue;
        
        
strtokszBufferszKeycharsmaxszKey ), szStatuscharsmaxszStatus ), '=');
        
        for( new 
iIterator PLUGIN_STATUSiIterator <= FAST_NAME_CHANING_NUMBERiIterator ++ ) {
            if( 
equalig_szSettingsNameiIterator ], szKey ) ) {
                if( 
equaliszKey"Ban_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szBanCommandcharsmaxg_szBanCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Kick_Command" ) ) {
                    
trimszStatus );
                    
formatexg_szKickCommandcharsmaxg_szKickCommand ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                }
                else if( 
equaliszKey"Check_Name_Symbols" ) ) {
                    
trimszStatus );
                    
formatexg_szRestrictedSymbolscharsmaxg_szRestrictedSymbols ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Keys" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfKeyscharsmaxg_szMilfKeys ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } else if( 
equaliszKey"Milf_AntiCheat_Reason" ) ) {
                    
trimszStatus );
                    
formatexg_szMilfReasoncharsmaxg_szMilfReason ), "%s"szStatus );
                    
                    
server_print"%L"LANG_SERVER"SETTINGS_STR"g_szSettingsNameiIterator ], szStatus );
                    continue;
                } 

                
replace_allszStatuscharsmaxszStatus ), "=""" );
                
trimszStatus );
                
g_iSettingsiIterator ] = str_to_numszStatus );
                
                if( 
iIterator >= RAPID_FIRE_PUNISH_NUMBER && iIterator <= FAST_NAME_CHANING_NUMBER )
                    
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], szStatus );
                else 
server_print"%L"LANG_SERVER"SET_V_2"g_szSettingsNameiIterator ], g_iSettingsiIterator ] ? "Enabled" "Disabled" );
            }
        }
    }

    
fcloseiFile );
    
    if( 
g_iSettingsBYM_RECAPTCHA ] ) {
        if( !
g_iSettingsBYM_RECAPTCHA_TIME ] )
            
g_iSettingsBYM_RECAPTCHA_TIME ] = 20;
    }
    
    
LoadFlashBugVectors( );

    
formatexszFilecharsmaxszFile ), "%s/Blocked_IPs.ini"szUltimateAntiCheatDir );
    
LoadMaliciousIPsszFile );
    
    
szFile] = EOS;
    
formatexszFilecharsmaxszFile ), "%s/ByM_AntiBot_Excluded_IPs.ini"szUltimateAntiCheatDir );
    
LoadExcludedIPsszFile );
    
    if( !
g_iSettingsPLUGIN_STATUS ] ) {
        
pause"a" );
        return;
    }
    
    if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] )
        
g_iCaptchaVault nvault_open(  "ByM_ReCaptcha" );

    
//set_task( ADVERTISING_TIME, "Adverstiment", random( 1337 ), "", 0, "b", 0 );

    #if defined USE_TASKS
    
if( g_iSettingsCHECK_RAPIDFIRE ] )
        
set_task1.0"CheckRapidFire"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPINHACK ] )
        
set_task1.0"CheckSpinTotal"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_SPEEDHACK ] )
        
set_task0.5"CheckSpeedHack"random1337 ), ""0"b");

    if( 
g_iSettingsCHECK_LOWRECOIL ] )
        
set_task1.0"ClearRecoil"random1337 ), ""0"b");
    
#else
    
CreateGlobalThinker( );
    
CreateSpeedHackThinker( );
    
#endif
}

#if !defined USE_TASKS
CreateGlobalThinker( ) {
    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_GlobalThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    
register_think"UAC_GlobalThinker""fw_GlobalThink" );
}

public 
fw_GlobalThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 1.0 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers(); iPlayer ++ ) {
        
#if defined USE_BYM_API
        
if( !IsPlayer->ConnectediPlayer ) )
            continue;
        
#else
        
if( !is_user_connectediPlayer ) )
            continue;
        
#endif

        
if( g_iSettingsCHECK_RAPIDFIRE ] && !g_iIgnoreRapidiPlayer ] )
            
CheckRapidFireiPlayer );

        if( 
g_iSettingsCHECK_SPINHACK ] )
            
CheckSpinTotaliPlayer );

        if( 
g_iSettingsCHECK_LOWRECOIL ] )
            
ClearRecoiliPlayer );
    }
}

CreateSpeedHackThinker( ) {
    if( !
g_iSettingsCHECK_SPEEDHACK ] )
        return;

    new 
iEntity create_entity"info_target" );

    if( !
iEntity ) {
        
server_print"There is not enoguh entities spaces to cheate Ultimate Anti Cheat Thinker!" );
        
g_iSettingsPLUGIN_STATUS ] = 0;
        
pause"a" );
        return;
    }

    
entity_set_stringiEntityEV_SZ_classname"UAC_SpeedHackThinker" );
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    
register_think"UAC_SpeedHackThinker""fw_SpeedHackThink" );
}

public 
fw_SpeedHackThinkiEntity ) {
    if( !
is_valid_entiEntity ) )
        return;

    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 0.5 );

    static 
iPlayer;
    for( 
iPlayer 1iPlayer <= GetMaxPlayers( ); iPlayer ++ ) {
        if( !
g_iIgnoreSpeedHackiPlayer ] )
            
CheckSpeedHackiPlayer );
    }
}
#endif

/*public Adverstiment( ) {
    if( !g_iSettings[ PLUGIN_ADVERSTRIMENT ] )
        return;
    
    if( !( random_num( 1, 300 ) == 1 ) )
        return;
    
    set_dhudmessage( 0, 255, 255, -1.0, 0.45, 0, 6.0, 10.0 );
    show_dhudmessage( 0, "This Server is Protected by Ultimate Anti Cheat [v%s]!^nAuthors:^n%s", VERSION, AUTHOR );

    PrintToChat( 0, "!gThis Server is Protected by Ultimate Anti Cheat! - Say !t/uaca !gto see the autors." );
}*/

/*public PlayerConnectedAdv( iTask )
    PrintToChat( iTask - TASK_PLAYER_AD, "!gThis Server is Protected by Ultimate Anti Cheat [v%s]! By: %s", VERSION, AUTHOR );*/

public ShowAuthorsiPlayer )
    
PrintToChatiPlayer"!rAuthors Are: !g%s"AUTHOR );

public 
fw_ChatCommandiPlayer ) {
    if( !
g_iSettingsBYM_RECAPTCHA ] )
        return 
0;

    if( 
g_iPassedReCaptchaiPlayer ] )
        return 
0;

    
#if defined USE_BYM_API
    
if( !IsPlayer->ConnectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#else
    
if( !is_user_connectediPlayer ) || !IsValidPlayeriPlayer ) )
        return 
2;
    
#endif

    
static szSaid32 ];
    
read_argsszSaidcharsmaxszSaid ) );
    
remove_quotesszSaid );
    
    if( !
szSaid] )
        return 
2;

    if( !
g_iPassedReCaptchaiPlayer ] ) {
        if( 
equaliszSaidg_szReCaptchaTextiPlayer ] ) ) {
            
PrintToChatiPlayer"%L"iPlayer"CORRECT_CAPTCHA" );
            
g_iPassedReCaptchaiPlayer ] = 1;
            
            if( 
g_iSettingsBYM_RECAPTCHA_REMEMBER ] ) {
                new 
szSteamID64 ];
                
get_user_authidiPlayerszSteamIDcharsmaxszSteamID ) );
            
                new 
szData12 ];
                
num_to_strget_systime( ) + g_iSettingsBYM_RECAPTCHA_REMEMBER ], szDatacharsmaxszData ) );
            
                
nvault_setg_iCaptchaVaultszSteamIDszData );
                
g_iCheckedCaptchaExiprationiPlayer ] = 1;
            }
        } else {
            
PrintToChatiPlayer"%L"iPlayer"WRONG_CAPTCHA"g_iSettingsBYM_RECAPTCHA_TRYS ] - g_iReCaptcaTrysiPlayer ] );
            
g_iReCaptcaTrysiPlayer ] ++;
            
            if( 
g_iReCaptcaTrysiPlayer ] >= g_iSettingsBYM_RECAPTCHA_TRYS ] )
                
PunishUseriPlayer"Fake Player" );
        }
    }

    return 
2;
}

public 
client_connect