Serwery wiaderko.com Zwiń / Rozwiń kategorię

HashJama [TP] 193.33.176.148:27015 | tp.wiaderko.com status serwera HashJama [TP] połącz

HashJama CS:GO [DM] 193.33.176.53:27015 | dm.wiaderko.com status serwera HashJama CS:GO [DM] połącz

HashJama CS:GO [FFA] 193.33.176.15:27015 | ffa.wiaderko.com status serwera HashJama CS:GO FFA [FFA] połącz

HashJama [TeamSpeak 3] 62.210.99.220:9987 | ts.wiaderko.com status serwera HashJama [TP ELITE] 62.210.99.220:27015 połącz

SPONSOR:
pukawka.pl

Nabór na JUNIOR ADMINA forum - Więcej informacji > Klik <
Pokaż wyniki od 1 do 6 z 6
  1. #1
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Plugin HackHunter - HUD

    Witam Serdecznie! Posiadam plugin HackHunter. Często nie potrzebnie (tylko denerwuje właściwie) w Hudzie pojawia się coś takiego:



    I proszę przerobić tak ten plugin, aby tylko takie wiadomości nie wyskakiwały już nie potrzebnie w Hudzie!

    Daje plik .sma:

    Kod php:
    #include <amxmodx>
    #include <amxmisc>
    #include <cstrike>
    #include <fakemeta_util>

    #define PLUGIN "Hack Hunter"
    #define VERSION "1.1"
    #define AUTHOR "Alka & SAMURAI"

    #define CharsMax(%1) sizeof %1 - 1

    #define MAX_FLASHBUG_ZONES 20

    #define ADVERTISING_TIME 240.0

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

    #define ADMIN_IGNORE_FLAG ADMIN_BAN

    enum _:Enum_Settings {
        
        
    PLUGIN_STATUS 0,
        
    PLUGIN_LOG_ACTIONS,
        
    PLUGIN_ADVERTISING,
        
        
    PUNISH_TYPE,
        
    BAN_TYPE,
        
    BAN_TIME,
        
    IGNORE_ADMINS,
        
        
    SPEEDHACK_SECURE,
        
        
    CHECK_RAPIDFIRE,
        
    CHECK_SPINHACK,
        
    CHECK_SPEEDHACK,
        
    CHECK_SHAKE,
        
    CHECK_LOWRECOIL,
        
    CHECK_AIMBOT,
        
    CHECK_BHOP,
        
        
    CHECK_MOVEKEYS,
        
    CHECK_DOUBLEATTACK,
        
        
    CHECK_FLASHBUG,
        
        
    CHECK_WALLHACK,
        
    WALLHACK_MAX_DETECTS,
        
        
    CHECK_FASTNAME,
        
    CHECK_NAME,
        
    CHECK_NAME_SYMBOLS,
        
    CNS_SHOW_REASON,
        
    CHECK_IPS
    };

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

    new const 
    gSettings_Name[][] = {
        
        
    "Plugin_Status",
        
    "Plugin_Log_Actions",
        
    "Plugin_Advertising",
        
    "Punish_Type",
        
    "Punish_Ban_Type",
        
    "Punish_Bantime",
        
    "Ignore_Admins",
        
    "Speedhack_Secure",
        
    "Check_Rapidfire",
        
    "Check_Spinhack",
        
    "Check_Speedhack",
        
    "Check_Shake",
        
    "Check_Lowrecoil",
        
    "Check_Aimbot",
        
    "Check_Bhop",
        
    "Check_Movekeys",
        
    "Check_Doubleattack",
        
    "Check_Flashbug",
        
    "Check_Wallhack",
        
    "Wallhack_Max_Detects",
        
    "Check_Name_Fastchange",
        
    "Check_Name",
        
    "Check_Name_Symbols",
        
    "CNS_Show_Reason",
        
    "Check_IPs"
    };

    new const 
    gWarningSounds[][] = {
        
        
    "hackhunter/spray.wav",
        
    "hackhunter/warning.wav"
    };

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

    new const 
    gGunsEvents[][] = {
        
        
    "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 
    gGunsEventsId[sizeof gGunsEvents];

    new 
    gSettings[Enum_Settings] = {0, ...};
    new 
    gMapName[32];

    new 
    FlashVectors[MAX_FLASHBUG_ZONES][4];
    new 
    FlashZones;

    new 
    bool:IsDetected[33];
    new 
    Detections[33][Cheats];

    new 
    Float:fOldAimAngles[33][3];
    new 
    Float:fLastAngles[33][3];
    new 
    Float:fTotalAngle[33];

    new 
    Float:fRecoilLastAngles[33][3];

    new 
    Float:fLastOrigin[33][3];

    new 
    Float:fAimOrigin[33][3];

    new 
    WallKills[33];

    new 
    BhopScript[32];
    new 
    NamesChangesNum[33];
    new 
    RestrictedSymbols[32];

    new 
    Float:fNextAimCheck[33];

    public 
    plugin_init() {
        
        
    register_plugin(PLUGINVERSIONAUTHOR);
        
        
    register_dictionary("hack_hunter.txt");
        
        
    register_forward(FM_Think"Fwd_Think");
        
    register_forward(FM_EmitSound"Fwd_EmitSound");
        
    register_forward(FM_PlayerPostThink"Fwd_PlayerPostThink");
        
    register_forward(FM_PlayerPreThink"Fwd_PlayerPreThink");
        
    register_forward(FM_PlaybackEvent"Fwd_PlaybackEvent");
        
    register_forward(FM_TraceLine"Fwd_TraceLine");
        
        
    register_event("DeathMsg""EventDeathMsg""a");
        
    register_event("HLTV""EventNewRound""a""1=0""2=0");
        
        
    formatex(BhopScriptCharsMax(BhopScript), "plop%d%d%d"random(100), random(100), random(100));
        
    register_clcmd(BhopScript"cmdDetectBhop");
    }

    public 
    plugin_precache()
    {
        for(new 
    sizeof gWarningSounds i++)
            
    precache_sound(gWarningSounds[i]);
        
        for(new 
    sizeof gGunsEvents x++)
            
    gGunsEventsId[x] = engfunc(EngFunc_PrecacheEvent1gGunsEvents[x]);
    }

    public 
    plugin_cfg()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/hackhunter_settings.cfg"HackHunterDir);
        
        if(!
    dir_exists(HackHunterDir))
            
    mkdir(HackHunterDir);
        
        if(!
    file_exists(File))
        {
            
    server_print("%L",LANG_SERVER,"PRINT_SRV_ERROR");
            
            return;
        }
        else
            
    server_print("%L",LANG_PLAYER,"SUCC_LOADED");
        
        static 
    iFileBuffer[128], Key[32], Status[16];
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/'))
                continue;
            
            
    strtok(BufferKeyCharsMax(Key), StatusCharsMax(Status), '='1);
            
            for(new 
    sizeof gSettings_Name i++)
            {
                if(
    equali(gSettings_Name[i], Key))
                {
                    if(
    equali(Key"Check_Name_Symbols"))
                    {
                        
    trim(Status);
                        
    formatex(RestrictedSymbolsCharsMax(RestrictedSymbols), "%s"Status);
                        
                        
    //server_print("[Hack Hunter] Setting: %s have string %s", gSettings_Name[i], Status);
                        
    server_print("%L",LANG_SERVER,"SETTINGS_STR",gSettings_Name[i], Status);
                        
                        
                        continue;
                    }
                    
    gSettings[i] = str_to_num(Status);
                    
                    
    //server_print("[Hack Hunter] Setting: %s is %s", gSettings_Name[i], gSettings[i] ? "Enabled" : "Disabled");
                    
    server_print("%L",LANG_SERVER,"SET_V_2",gSettings_Name[i], gSettings[i] ? "Enabled" "Disabled");
                    
                }
            }
        }
        
    fclose(iFile);
        
        
    LoadFlashVectors();
        
        if(!
    gSettings[PLUGIN_STATUS])
        {
            
    pause("a");
            return;
        }
        if(
    gSettings[PLUGIN_ADVERTISING])
            
    set_task(ADVERTISING_TIME"cmdAdvertising"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_RAPIDFIRE])
            
    set_task(1.0"CheckRapidFire"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPINHACK])
            
    set_task(1.0"CheckSpinTotal"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPEEDHACK])
            
    set_task(0.5"CheckSpeedHack"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_LOWRECOIL])
            
    set_task(1.0"ClearRecoil"random(1337), ""0"b"0);
    }

    public 
    cmdAdvertising()
    {
        
    set_hudmessage(random(256), random(256), random(256), random_float(0.010.55), random_float(0.010.7), 16.06.01.01.0, -1);
        
    //show_hudmessage(0, "Hack Hunter v%s the ultimate Anti-Cheat.^nAuthors: %s", VERSION, AUTHOR);
        
    show_hudmessage(0,"%L",LANG_PLAYER,"HUD_ADVERT",VERSIONAUTHOR);
        
    }

    public 
    client_connect(id)
    {
        for(new 
    sizeof Detections[] ; i++)
        {
            
    Detections[id][i] = 0;
        }
        
        
    IsDetected[id] = false;
        
    WallKills[id] = 0;
        
    NamesChangesNum[id] = 0;
        
        if(
    gSettings[CHECK_NAME])
        {
            static 
    Name[32];
            
    get_user_name(idNameCharsMax(Name))
            
            for(new 
    strlen(RestrictedSymbols) ; i++)
            {
                for(new 
    strlen(Name) ; j++)
                {
                    if(
    Name[j] == RestrictedSymbols[i])
                    {
                        
    //server_cmd("kick #%d ^"[Hack Hunter]You have a restricted symbol in name! Change it.^"", get_user_userid(id));
                        
    server_cmd("kick #%d ^"%L^""get_user_userid(id), LANG_PLAYER,"WRONG_CH");
                        
                        
                        if(
    gSettings[CNS_SHOW_REASON])
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having a restricted symbol in name.", Name);
                            
    client_print(0print_chat"%L",LANG_PLAYER,"KICK_WR_CH"Name);
                            
                        
                        break;
                    }
                }
            }
        }
        if(
    gSettings[CHECK_IPS])
        {
            static 
    BaseDir[64], File[64];
            
    get_basedir(BaseDirsizeof BaseDir 1);
            
            
    formatex(Filesizeof File 1"%s/hackhunter/hackhuntre_ips.ini"BaseDir);
            
            if(
    Exists_IP(idFile))
                
    //server_cmd("kick #%d ^"[Hack Hunter]You'r IP is restricted.^"", get_user_userid(id));
                
    server_cmd("kick #%d ^"%L^"",get_user_userid(id), LANG_PLAYER,"WRONG_IP");
            
        }
        return 
    0;
    }

    public 
    client_putinserver(id)
    {
        static 
    Name[32];
        
    get_user_name(idNameCharsMax(Name));
        
        static 
    Info[3];
        for(new 
    sizeof gOldCheats i++)
        {
            
    get_user_info(idgOldCheats[i], InfoCharsMax(Info));
            
            if(
    strlen(Info) > 0)
            {
                
    //client_print(0, print_chat, "[Hack Hunter]%s is detected having cheats!", Name);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"DEC_CON",Name);
                
    PunishUser(id);
                
                return 
    1;
            }
        }
        
    //client_print(0, print_chat, "[Hack Hunter] %s's config(.CFG) has been scaned successfully.", Name);
        
    client_print(0,print_chat,"%L",LANG_PLAYER,"CFG_SC",Name);
        
        return 
    0;
    }


    public 
    LoadFlashVectors()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    get_mapname(gMapNameCharsMax(gMapName));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/flash_bug/%s.ini"HackHunterDirgMapName);
        
        if(!
    file_exists(File))
        {
            
    //server_print("[Hack Hunter] Couldn't load flash bug vectors for ^"%s^".", gMapName);
            
    server_print("%L",LANG_SERVER,"LD_VECTORS",gMapName);
            return;
        }
        
        static 
    iFileBuffer[128], Temp[4][32], LineParamsi;
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/') || strlen(Buffer) < 2)
                continue;
            
            
    LineParams parse(BufferTemp[0], sizeof Temp[] - 1Temp[1], sizeof Temp[] - 1Temp[2], sizeof Temp[] - 1Temp[3], sizeof Temp[] - 1);
            
            if(
    LineParams != 4)
            {
                
    //server_print("[Hack Hunter] Error in flash bug file for ^"%s^".", gMapName);
                
    server_print("%L",LANG_SERVER,"SV_PRINT_VEC",gMapName);
                continue;
            }
            
            
    FlashVectors[i][0] = str_to_num(Temp[0]);
            
    FlashVectors[i][1] = str_to_num(Temp[1]);
            
    FlashVectors[i][2] = str_to_num(Temp[2]);
            
    FlashVectors[i][3] = str_to_num(Temp[3]);
            
            
    i++;
        }
        
    fclose(iFile);
        
        
    FlashZones i;
        
        
    //server_print("[Hack Hunter] Successfully loaded %d flash bug vectors for ^"%s^".", FlashZones, gMapName);
        
    server_print("%L",LANG_SERVER,"SUC_VEC_LOAD",FlashZones,gMapName);
    }

    public 
    EventNewRound()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ch");
        
        for(new 
    iNum i++)
        {
            if(
    gSettings[CHECK_SPEEDHACK])
            {
                static 
    Float:fOrigin[3];
                
    pev(Players[i], pev_originfOrigin);
                
                
    CopyVector(fOriginfLastOrigin[Players[i]]);
            }
            if(
    gSettings[CHECK_WALLHACK])
            {
                
    WallKills[Players[i]] = 0;
            }
        }
    }

    public 
    Fwd_Think(Ent)
    {
        if(!
    pev_valid(Ent))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_FLASHBUG])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fOrigin[3], iOrigin[3], BugZone[3];
        static 
    Model[32];
        
        
    pev(Entpev_modelModelCharsMax(Model));
        
        if(!
    equali(Model"models/w_flashbang.mdl"))
            return 
    FMRES_IGNORED;
        
        static 
    id;
        
    id pev(Entpev_owner);
        
        
    pev(Entpev_originfOrigin);
        
    iOrigin[0] = floatround(fOrigin[0]);
        
    iOrigin[1] = floatround(fOrigin[1]);
        
    iOrigin[2] = floatround(fOrigin[2]);
        
        for(new 
    FlashZones i++)
        {
            
    BugZone[0] = FlashVectors[i][0];
            
    BugZone[1] = FlashVectors[i][1];
            
    BugZone[2] = FlashVectors[i][2];
            
            if(
    get_distance(iOriginBugZone) <=  FlashVectors[i][3])
            {
                
                
    //client_print(0, print_chat, "[Hack Hunter] Removed a flashbang from (%d %d %d).", iOrigin[0], iOrigin[1], iOrigin[2]);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"SUCC_RMV_FLB",iOrigin[0], iOrigin[1], iOrigin[2]);
                
    engfunc(EngFunc_RemoveEntityEnt);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Ilegal map bug exploit warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"ILG_MAP_EXPLOIT");
                
                
    Fm_user_slap(id10.0);
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPostThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_SPINHACK])
            
    CheckSpinHack_Post(id);
        
        
        if(
    gSettings[CHECK_SHAKE])
            
    CheckShake(id);
        
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPreThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_MOVEKEYS])
            
    CheckScriptBlock(id);
        
        if(
    gSettings[CHECK_BHOP])
        {
            if(!(
    pev(idpev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
                
    client_cmd(id";alias _special %s"BhopScript);
        }
        
        return 
    FMRES_IGNORED;
    }

    public 
    cmdDetectBhop(id)
    {
        if(!
    gSettings[CHECK_BHOP])
            return 
    1;
        
        if(!(
    pev(id,pev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
            return 
    1;
        
        return 
    0;
    }

    public 
    CheckShake(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        static 
    WeaponTrash;
        
    Weapon get_user_weapon(idTrashTrash);
        
        if(
    Weapon == CSW_M249)
            return 
    FMRES_IGNORED;
        
        if(((
    fAimAngles[0] ==  fOldAimAngles[id][0]) && (fAimAngles[1] ==  fOldAimAngles[id][1])) || (pev(idpev_button) & IN_JUMP))
        {
            
    Detections[id][SHAKE] -= 10;
            
            if(
    Detections[id][SHAKE] < 0)
                
    Detections[id][SHAKE] = 0;
        }
        else
            
    Detections[id][SHAKE]++;
        
        if(
    Detections[id][SHAKE] > 350)
        {
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Shake warning!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"SHAKE_WARN");
            
            
    client_cmd(id"spk %s"gWarningSounds[1]);
        }
        if(
    Detections[id][SHAKE] > 550)
            
    PunishUser(id);
        
        
    CopyVector(fAimAnglesfOldAimAngles[id]);
        
        return 
    FMRES_IGNORED;
    }

    public 
    CheckSpinHack_Post(id)
    {
        static 
    Float:fAngles[3];
        
    pev(idpev_anglesfAngles);
        
        
    fTotalAngle[id] += vector_distance(fLastAngles[id], fAngles);
        
        
    CopyVector(fAnglesfLastAngles[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if((
    Button IN_LEFT) || (Button IN_RIGHT))
            
    Detections[id][SPINHACK] = 0;
    }

    public 
    Fwd_PlaybackEvent(flagsideventindex)
    {
        if(!
    gSettings[CHECK_RAPIDFIRE])
            return 
    FMRES_IGNORED;
        
        for(new 
    sizeof gGunsEvents i++)
        {
            if(
    eventindex == gGunsEventsId[i])
            {
                static 
    WeaponTrash;
                
    Weapon get_user_weapon(idTrashTrash);
                
                static 
    Float:fAimAngles[3];
                
    pev(idpev_v_anglefAimAngles);
                
                if(
    Weapon == CSW_GLOCK18)
                    return 
    FMRES_IGNORED;
                
                if(
    gSettings[CHECK_RAPIDFIRE])
                    
    Detections[id][RAPIDFIRE]++;
                
                if(
    gSettings[CHECK_LOWRECOIL])
                {
                    if((
    fAimAngles[0] == fRecoilLastAngles[id][0]) && fRecoilLastAngles[id][0] != 0.0)
                        
    Detections[id][RECOIL]++;
                    else
                        
    Detections[id][RECOIL]--;
                    
                    
    fRecoilLastAngles[id][0] = fAimAngles[0];
                    
                    if(
    Detections[id][RECOIL] > 6)
                    {
                        
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                        
    //show_hudmessage(id, "[Hack Hunter] Low-recoil warning!");
                        
    show_hudmessage(id,"%L",LANG_PLAYER,"LOW_RECOIL");
                        
                        
    client_cmd(id"spk %s"gWarningSounds[1]);
                    }
                    if(
    Detections[id][RECOIL] > 8)
                        
    PunishUser(id);
                }
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    ClearRecoil()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    Detections[Players[i]][RECOIL] -= 10;
            
            if(
    Detections[Players[i]][RECOIL] < 0)
                
    Detections[Players[i]][RECOIL] = 0;
        }
    }

    public 
    CheckSpeedHack()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    cs_get_user_driving(id) >= 0)
                continue;
            
            static 
    Float:fOrigin[3], Float:fOldOrigin[3], Float:fDistance;
            
    pev(idpev_originfOrigin);
            
            
    CopyVector(fLastOrigin[id], fOldOrigin);
            
            if(
    gSettings[SPEEDHACK_SECURE])
            {
                
    fOrigin[2] = 0.0;
                
    fOldOrigin[2] = 0.0;
            }
            
            
    fDistance get_distance_f(fOriginfOldOrigin);
            
            if(
    Detections[id][SPEEDHACK] >= 3)
                
    Detections[id][SPEEDHACK]--;
            
            if(
    Detections[id][SPEEDHACK] < 0)
                
    Detections[id][SPEEDHACK] = 0;
            
            if(
    fDistance >= 240.0)
                
    Detections[id][SPEEDHACK] += 3;
            
            if(
    Detections[id][SPEEDHACK] >= 6)
            {
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Speedhack warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"SPEED_HACK");
                
                
    client_cmd(id"spk %s"gWarningSounds[1]);
            }
            if(
    Detections[id][SPEEDHACK] >= 8)
                
    PunishUser(id);
            
            
    CopyVector(fOriginfLastOrigin[id]);
        }
    }

    public 
    CheckSpinTotal()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    fTotalAngle[id] >= 1500.0)
            {        
                if(
    Detections[id][SPINHACK] >= 25 3)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Spinhack warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"SPIN_HACK");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][SPINHACK] >= 25)
                    
    PunishUser(id);
                
                
    Detections[id][SPINHACK]++;
            }
            else
                
    Detections[id][SPINHACK] = 0;
            
            
    fTotalAngle[id] = 0.0;
        }
    }

    public 
    CheckRapidFire()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    Detections[id][RAPIDFIRE] >= 15)
                
    PunishUser(id);
            
            
    Detections[id][RAPIDFIRE] = 0;
        }
    }

    public 
    CheckScriptBlock(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        
    CopyVector(fAimAnglesfAimOrigin[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if(
    Button IN_LEFT)
        {
            
    client_cmd(id"-left");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        else if(
    Button IN_RIGHT)
        {
            
    client_cmd(id"-right");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        
        if(
    gSettings[CHECK_DOUBLEATTACK])
        {
            if((
    Button IN_ATTACK) && (Button IN_ATTACK2))
            {
                
    Button Button & ~IN_ATTACK2;
                
    set_pev(idpev_buttonButton);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Dual attack is not allowed!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"DUAL_ATTACK");
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    EventDeathMsg()
    {
        if(!
    gSettings[CHECK_WALLHACK])
            return 
    1;
        
        static 
    KillerVictimWeapon[32];
        
    read_data(4WeaponCharsMax(Weapon));
        
        if(
    equali(Weapon"grenade"))
            return 
    1;
        
        
    Killer read_data(1);
        
    Victim read_data(2);
        
        static 
    bool:IsVisible;
        
    IsVisible fm_is_ent_visible(KillerVictim1);
        
        if(!
    IsVisible)
            
    WallKills[Killer]++;
        
        if(
    WallKills[Killer] >= gSettings[WALLHACK_MAX_DETECTS])
            
    PunishUser(Killer);
        
        return 
    0;
    }

    public 
    client_infochanged(id)
    {
        static 
    NewName[32], OldName[32];
        
        
    get_user_name(idOldNameCharsMax(OldName));
        
    get_user_info(id"name"NewNameCharsMax(NewName));
        
        if(!
    equali(NewNameOldName))
        {
            if(!
    gSettings[CHECK_FASTNAME])
                return 
    1;
            
            
    NamesChangesNum[id]++;
            
            if(
    NamesChangesNum[id] >= 4)
                
    PunishUser(id);
            
            if(!
    task_exists(id))
                
    set_task(4.0"ClearChangesNum"id);
        }
        return 
    0;
    }

    public 
    ClearChangesNum(id)
        
    NamesChangesNum[id] = 0;


    public 
    Fwd_TraceLine(Float:StartPos[3], Float:EndPos[3], SkipMonstersidTrace)
    {
        if(!
    is_user_alive(id))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_AIMBOT])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fGameTime;
        
    fGameTime get_gametime();
        
        if(
    fNextAimCheck[id] < fGameTime)
        {
            static 
    iTargetiHitGroupButton;
            
    iTarget get_tr2(TraceTR_pHit);
            
    iHitGroup = (<< get_tr2(TraceTR_iHitgroup));
            
    Button pev(idpev_button);
            
            if(!
    is_user_alive(iTarget))
                return 
    FMRES_IGNORED;
            
            if(
    get_pdata_int(idFM_TEAM_OFFSET) != get_pdata_int(iTargetFM_TEAM_OFFSET))
            {
                if((
    iHitGroup FM_HITGROUP_HEAD) && (Button != 0))
                    
    Detections[id][AIMBOT]++;
                else if(!(
    iHitGroup FM_HITGROUP_HEAD) || (Button <= 0))
                    
    Detections[id][AIMBOT] = 0;
                
                if(
    Detections[id][AIMBOT] >= 6)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Aimbot warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"AIM_BOT");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][AIMBOT] >= 7)
                    
    PunishUser(id);
                
                
    fNextAimCheck[id] = fGameTime 0.5;
            }
        }
        return 
    FMRES_IGNORED;
    }

    stock CountCheaters()
    {
        static 
    BaseDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(FileCharsMax(File), "%s/hackhunter/hackhunter_detects.txt"BaseDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter number of players detected.", -1);
            
        
        static 
    LineLenBuffer[16];
        
    Line read_file(FileLineBufferCharsMax(Buffer), Len);
        
        static 
    Num;
        
    Num str_to_num(Buffer);
        
        
    Num++;
        
        
    num_to_str(NumBufferCharsMax(Buffer));
        
        
    write_file(FileBuffer0);
    }

    stock Fm_user_slap(indexFloat:fDamage 0.0)
    {
        static 
    Float:fPunchangle[3];
        
    pev(indexpev_punchanglefPunchangle);
        
        
    fPunchangle[0] += random_float(-8.08.0);
        
    fPunchangle[1] += random_float(-8.08.0);
        
        
    set_pev(indexpev_punchanglefPunchangle);
        
        static 
    Float:fVelocity[3];
        
    pev(indexpev_velocityfVelocity);
        
        
    fVelocity[0] += random_num(01) ? 264.0 : -264.0;
        
    fVelocity[1] += random_num(01) ? 264.0 : -264.0;
        
        
    set_pev(indexpev_basevelocityfVelocity);
        
        
    fm_fakedamage(index"worldspawn"fDamage1);
        
        return 
    1;
    }

    stock PunishUser(index)
    {
        if(!
    is_user_connected(index))
            return;
        
        if(
    gSettings[IGNORE_ADMINS])
        {
            if(
    access(indexADMIN_IGNORE_FLAG))
            {
                
    WriteToLog(index0"");
                return;
            }
        }
        
        if(!
    IsDetected[index])
        {
            static 
    Name[32], authid[32], uid;
            
    get_user_name(indexNameCharsMax(Name));
            
    get_user_authid(index,authid,sizeof authid 1);
            
    uid get_user_userid(index);
            
            switch(
    gSettings[PUNISH_TYPE])
            {
                case 
    :
                {    
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
                    
    set_hudmessage(25500, -1.00.8506.05.01.01.03);
                    
    //show_hudmessage(index, "[Hack Hunter] You have been detected with cheats!");
                    
    show_hudmessage(index,"%L",LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was detected with cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"ID_WITH_HACK",Name);
                }
                case 
    :
                {
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
    //server_cmd("kick #%d ^"[Hack Hunter] You have been detected with cheats!", uid);
                    
    server_cmd("kick #%d ^"%L^"",uid,LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"KICK_HAVE_CHEAT",Name);
                }
                case 
    :
                {        
                    switch(
    gSettings[BAN_TYPE])
                    {
                        
    // STEAM ID
                        
    case 0:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0])
                            
                            
    server_cmd("kick #%d;wait;wait;wait;banid %d ^"%s^";wait;wait;wait;writeid"uidgSettings[BAN_TIME], authid);
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
        
                        }
                        
                        
    // IP
                        
    case 1:
                        {
                            static 
    Ip[32];
                            
    get_user_ip(indexIpCharsMax(Ip), 1);
                            
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;writeip"uidgSettings[BAN_TIME], Ip);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                        
                        
    // AMX BANS
                        
    case 2:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("amx_ban %d %s",gSettings[BAN_TIME], Name);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                    }
                }
            }
            
            
    CountCheaters();
            
    WriteToLog(indexgSettings[PUNISH_TYPE], "");
            
            
    IsDetected[index] = true;
        }
    }

    stock CopyVector(Float:fVec1[3], Float:fVec2[3])
    {
        
    fVec2[0] = fVec1[0];
        
    fVec2[1] = fVec1[1];
        
    fVec2[2] = fVec1[2];
    }

    stock WriteToLog(id_:Log_TypeString[])
    {
        if(!
    gSettings[PLUGIN_LOG_ACTIONS])
            return;
        
        static 
    BaseDir[64], LogsDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(LogsDirCharsMax(LogsDir), "%s/hackhunter/logs"BaseDir);
        
    formatex(FileCharsMax(File), "%s/Log.log"LogsDir);
        
        if(!
    dir_exists(LogsDir))
            
    mkdir(LogsDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter logs file.", -1);
        
        static 
    Name[32], Ip[32];
        
        if(
    Log_Type != -1)
        {
            
    get_user_name(idNameCharsMax(Name));
            
    get_user_ip(idIpCharsMax(Ip), 1);
        }
        
        switch(
    Log_Type)
        {
            case -
    : { log_to_file(File"%s"String); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_1"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_2"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_3"NameIp); }
        }
    }

    stock bool:Exists_IP(id, const File[])
    {
        new 
    iFile fopen(File"rt");
        
        if(!
    iFile)
            
    write_file(File"", -1);
        
        new 
    Ip[32]
        
    get_user_ip(idIpsizeof Ip 11);
        
        while(!
    feof(iFile))
        {
            static 
    Buffer[64];
            
    fgets(iFileBuffersizeof Buffer 1);
            
            if(
    Buffer[0] == ';')
                continue;
            
            new 
    nLen strlen(Ip);
            
            if(
    equali(IpBuffernLen))
            {
                
    fclose(iFile);
                return 
    true;
            }
        }
        
    fclose(iFile);
        
        return 
    false;

    Plik do pobrania: Pliczek.net - Darmowy hosting plików

    Dziękuję za pomoc!
    Ostatnio edytowane przez kubaszekr38 ; 13-02-2013 o 21:59

  2. #2
    Adminus pospolitus Awatar naven
    Dołączył
    Jan 2008
    Wiek
    25
    Posty
    10,802
    Thanks
    31
    Thanked 652 Times in 605 Posts

    Domyślnie Odp: Plugin HackHunter - HUD

    Kod php:
    #include <amxmodx>
    #include <amxmisc>
    #include <cstrike>
    #include <fakemeta_util>

    #define PLUGIN "Hack Hunter"
    #define VERSION "1.1"
    #define AUTHOR "Alka & SAMURAI"

    #define CharsMax(%1) sizeof %1 - 1

    #define MAX_FLASHBUG_ZONES 20

    #define ADVERTISING_TIME 240.0

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

    #define ADMIN_IGNORE_FLAG ADMIN_BAN

    enum _:Enum_Settings {
        
        
    PLUGIN_STATUS 0,
        
    PLUGIN_LOG_ACTIONS,
        
    PLUGIN_ADVERTISING,
        
        
    PUNISH_TYPE,
        
    BAN_TYPE,
        
    BAN_TIME,
        
    IGNORE_ADMINS,
        
        
    SPEEDHACK_SECURE,
        
        
    CHECK_RAPIDFIRE,
        
    CHECK_SPINHACK,
        
    CHECK_SPEEDHACK,
        
    CHECK_SHAKE,
        
    CHECK_LOWRECOIL,
        
    CHECK_AIMBOT,
        
    CHECK_BHOP,
        
        
    CHECK_MOVEKEYS,
        
    CHECK_DOUBLEATTACK,
        
        
    CHECK_FLASHBUG,
        
        
    CHECK_WALLHACK,
        
    WALLHACK_MAX_DETECTS,
        
        
    CHECK_FASTNAME,
        
    CHECK_NAME,
        
    CHECK_NAME_SYMBOLS,
        
    CNS_SHOW_REASON,
        
    CHECK_IPS
    };

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

    new const 
    gSettings_Name[][] = {
        
        
    "Plugin_Status",
        
    "Plugin_Log_Actions",
        
    "Plugin_Advertising",
        
    "Punish_Type",
        
    "Punish_Ban_Type",
        
    "Punish_Bantime",
        
    "Ignore_Admins",
        
    "Speedhack_Secure",
        
    "Check_Rapidfire",
        
    "Check_Spinhack",
        
    "Check_Speedhack",
        
    "Check_Shake",
        
    "Check_Lowrecoil",
        
    "Check_Aimbot",
        
    "Check_Bhop",
        
    "Check_Movekeys",
        
    "Check_Doubleattack",
        
    "Check_Flashbug",
        
    "Check_Wallhack",
        
    "Wallhack_Max_Detects",
        
    "Check_Name_Fastchange",
        
    "Check_Name",
        
    "Check_Name_Symbols",
        
    "CNS_Show_Reason",
        
    "Check_IPs"
    };

    new const 
    gWarningSounds[][] = {
        
        
    "hackhunter/spray.wav",
        
    "hackhunter/warning.wav"
    };

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

    new const 
    gGunsEvents[][] = {
        
        
    "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 
    gGunsEventsId[sizeof gGunsEvents];

    new 
    gSettings[Enum_Settings] = {0, ...};
    new 
    gMapName[32];

    new 
    FlashVectors[MAX_FLASHBUG_ZONES][4];
    new 
    FlashZones;

    new 
    bool:IsDetected[33];
    new 
    Detections[33][Cheats];

    new 
    Float:fOldAimAngles[33][3];
    new 
    Float:fLastAngles[33][3];
    new 
    Float:fTotalAngle[33];

    new 
    Float:fRecoilLastAngles[33][3];

    new 
    Float:fLastOrigin[33][3];

    new 
    Float:fAimOrigin[33][3];

    new 
    WallKills[33];

    new 
    BhopScript[32];
    new 
    NamesChangesNum[33];
    new 
    RestrictedSymbols[32];

    new 
    Float:fNextAimCheck[33];

    public 
    plugin_init() {
        
        
    register_plugin(PLUGINVERSIONAUTHOR);
        
        
    register_dictionary("hack_hunter.txt");
        
        
    register_forward(FM_Think"Fwd_Think");
        
    register_forward(FM_EmitSound"Fwd_EmitSound");
        
    register_forward(FM_PlayerPostThink"Fwd_PlayerPostThink");
        
    register_forward(FM_PlayerPreThink"Fwd_PlayerPreThink");
        
    register_forward(FM_PlaybackEvent"Fwd_PlaybackEvent");
        
    register_forward(FM_TraceLine"Fwd_TraceLine");
        
        
    register_event("DeathMsg""EventDeathMsg""a");
        
    register_event("HLTV""EventNewRound""a""1=0""2=0");
        
        
    formatex(BhopScriptCharsMax(BhopScript), "plop%d%d%d"random(100), random(100), random(100));
        
    register_clcmd(BhopScript"cmdDetectBhop");
    }

    public 
    plugin_precache()
    {
        for(new 
    sizeof gWarningSounds i++)
            
    precache_sound(gWarningSounds[i]);
        
        for(new 
    sizeof gGunsEvents x++)
            
    gGunsEventsId[x] = engfunc(EngFunc_PrecacheEvent1gGunsEvents[x]);
    }

    public 
    plugin_cfg()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/hackhunter_settings.cfg"HackHunterDir);
        
        if(!
    dir_exists(HackHunterDir))
            
    mkdir(HackHunterDir);
        
        if(!
    file_exists(File))
        {
            
    server_print("%L",LANG_SERVER,"PRINT_SRV_ERROR");
            
            return;
        }
        else
            
    server_print("%L",LANG_PLAYER,"SUCC_LOADED");
        
        static 
    iFileBuffer[128], Key[32], Status[16];
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/'))
                continue;
            
            
    strtok(BufferKeyCharsMax(Key), StatusCharsMax(Status), '='1);
            
            for(new 
    sizeof gSettings_Name i++)
            {
                if(
    equali(gSettings_Name[i], Key))
                {
                    if(
    equali(Key"Check_Name_Symbols"))
                    {
                        
    trim(Status);
                        
    formatex(RestrictedSymbolsCharsMax(RestrictedSymbols), "%s"Status);
                        
                        
    //server_print("[Hack Hunter] Setting: %s have string %s", gSettings_Name[i], Status);
                        
    server_print("%L",LANG_SERVER,"SETTINGS_STR",gSettings_Name[i], Status);
                        
                        
                        continue;
                    }
                    
    gSettings[i] = str_to_num(Status);
                    
                    
    //server_print("[Hack Hunter] Setting: %s is %s", gSettings_Name[i], gSettings[i] ? "Enabled" : "Disabled");
                    
    server_print("%L",LANG_SERVER,"SET_V_2",gSettings_Name[i], gSettings[i] ? "Enabled" "Disabled");
                    
                }
            }
        }
        
    fclose(iFile);
        
        
    LoadFlashVectors();
        
        if(!
    gSettings[PLUGIN_STATUS])
        {
            
    pause("a");
            return;
        }
        
    //if(gSettings[PLUGIN_ADVERTISING])
          //  set_task(ADVERTISING_TIME, "cmdAdvertising", random(1337), "", 0, "b", 0);
        
    if(gSettings[CHECK_RAPIDFIRE])
            
    set_task(1.0"CheckRapidFire"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPINHACK])
            
    set_task(1.0"CheckSpinTotal"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPEEDHACK])
            
    set_task(0.5"CheckSpeedHack"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_LOWRECOIL])
            
    set_task(1.0"ClearRecoil"random(1337), ""0"b"0);
    }

    /*public cmdAdvertising()
    {
        set_hudmessage(random(256), random(256), random(256), random_float(0.01, 0.55), random_float(0.01, 0.7), 1, 6.0, 6.0, 1.0, 1.0, -1);
        //show_hudmessage(0, "Hack Hunter v%s the ultimate Anti-Cheat.^nAuthors: %s", VERSION, AUTHOR);
        show_hudmessage(0,"%L",LANG_PLAYER,"HUD_ADVERT",VERSION, AUTHOR);
        
    }*/

    public client_connect(id)
    {
        for(new 
    sizeof Detections[] ; i++)
        {
            
    Detections[id][i] = 0;
        }
        
        
    IsDetected[id] = false;
        
    WallKills[id] = 0;
        
    NamesChangesNum[id] = 0;
        
        if(
    gSettings[CHECK_NAME])
        {
            static 
    Name[32];
            
    get_user_name(idNameCharsMax(Name))
            
            for(new 
    strlen(RestrictedSymbols) ; i++)
            {
                for(new 
    strlen(Name) ; j++)
                {
                    if(
    Name[j] == RestrictedSymbols[i])
                    {
                        
    //server_cmd("kick #%d ^"[Hack Hunter]You have a restricted symbol in name! Change it.^"", get_user_userid(id));
                        
    server_cmd("kick #%d ^"%L^""get_user_userid(id), LANG_PLAYER,"WRONG_CH");
                        
                        
                        if(
    gSettings[CNS_SHOW_REASON])
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having a restricted symbol in name.", Name);
                            
    client_print(0print_chat"%L",LANG_PLAYER,"KICK_WR_CH"Name);
                            
                        
                        break;
                    }
                }
            }
        }
        if(
    gSettings[CHECK_IPS])
        {
            static 
    BaseDir[64], File[64];
            
    get_basedir(BaseDirsizeof BaseDir 1);
            
            
    formatex(Filesizeof File 1"%s/hackhunter/hackhuntre_ips.ini"BaseDir);
            
            if(
    Exists_IP(idFile))
                
    //server_cmd("kick #%d ^"[Hack Hunter]You'r IP is restricted.^"", get_user_userid(id));
                
    server_cmd("kick #%d ^"%L^"",get_user_userid(id), LANG_PLAYER,"WRONG_IP");
            
        }
        return 
    0;
    }

    public 
    client_putinserver(id)
    {
        static 
    Name[32];
        
    get_user_name(idNameCharsMax(Name));
        
        static 
    Info[3];
        for(new 
    sizeof gOldCheats i++)
        {
            
    get_user_info(idgOldCheats[i], InfoCharsMax(Info));
            
            if(
    strlen(Info) > 0)
            {
                
    //client_print(0, print_chat, "[Hack Hunter]%s is detected having cheats!", Name);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"DEC_CON",Name);
                
    PunishUser(id);
                
                return 
    1;
            }
        }
        
    //client_print(0, print_chat, "[Hack Hunter] %s's config(.CFG) has been scaned successfully.", Name);
        
    client_print(0,print_chat,"%L",LANG_PLAYER,"CFG_SC",Name);
        
        return 
    0;
    }


    public 
    LoadFlashVectors()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    get_mapname(gMapNameCharsMax(gMapName));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/flash_bug/%s.ini"HackHunterDirgMapName);
        
        if(!
    file_exists(File))
        {
            
    //server_print("[Hack Hunter] Couldn't load flash bug vectors for ^"%s^".", gMapName);
            
    server_print("%L",LANG_SERVER,"LD_VECTORS",gMapName);
            return;
        }
        
        static 
    iFileBuffer[128], Temp[4][32], LineParamsi;
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/') || strlen(Buffer) < 2)
                continue;
            
            
    LineParams parse(BufferTemp[0], sizeof Temp[] - 1Temp[1], sizeof Temp[] - 1Temp[2], sizeof Temp[] - 1Temp[3], sizeof Temp[] - 1);
            
            if(
    LineParams != 4)
            {
                
    //server_print("[Hack Hunter] Error in flash bug file for ^"%s^".", gMapName);
                
    server_print("%L",LANG_SERVER,"SV_PRINT_VEC",gMapName);
                continue;
            }
            
            
    FlashVectors[i][0] = str_to_num(Temp[0]);
            
    FlashVectors[i][1] = str_to_num(Temp[1]);
            
    FlashVectors[i][2] = str_to_num(Temp[2]);
            
    FlashVectors[i][3] = str_to_num(Temp[3]);
            
            
    i++;
        }
        
    fclose(iFile);
        
        
    FlashZones i;
        
        
    //server_print("[Hack Hunter] Successfully loaded %d flash bug vectors for ^"%s^".", FlashZones, gMapName);
        
    server_print("%L",LANG_SERVER,"SUC_VEC_LOAD",FlashZones,gMapName);
    }

    public 
    EventNewRound()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ch");
        
        for(new 
    iNum i++)
        {
            if(
    gSettings[CHECK_SPEEDHACK])
            {
                static 
    Float:fOrigin[3];
                
    pev(Players[i], pev_originfOrigin);
                
                
    CopyVector(fOriginfLastOrigin[Players[i]]);
            }
            if(
    gSettings[CHECK_WALLHACK])
            {
                
    WallKills[Players[i]] = 0;
            }
        }
    }

    public 
    Fwd_Think(Ent)
    {
        if(!
    pev_valid(Ent))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_FLASHBUG])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fOrigin[3], iOrigin[3], BugZone[3];
        static 
    Model[32];
        
        
    pev(Entpev_modelModelCharsMax(Model));
        
        if(!
    equali(Model"models/w_flashbang.mdl"))
            return 
    FMRES_IGNORED;
        
        static 
    id;
        
    id pev(Entpev_owner);
        
        
    pev(Entpev_originfOrigin);
        
    iOrigin[0] = floatround(fOrigin[0]);
        
    iOrigin[1] = floatround(fOrigin[1]);
        
    iOrigin[2] = floatround(fOrigin[2]);
        
        for(new 
    FlashZones i++)
        {
            
    BugZone[0] = FlashVectors[i][0];
            
    BugZone[1] = FlashVectors[i][1];
            
    BugZone[2] = FlashVectors[i][2];
            
            if(
    get_distance(iOriginBugZone) <=  FlashVectors[i][3])
            {
                
                
    //client_print(0, print_chat, "[Hack Hunter] Removed a flashbang from (%d %d %d).", iOrigin[0], iOrigin[1], iOrigin[2]);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"SUCC_RMV_FLB",iOrigin[0], iOrigin[1], iOrigin[2]);
                
    engfunc(EngFunc_RemoveEntityEnt);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Ilegal map bug exploit warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"ILG_MAP_EXPLOIT");
                
                
    Fm_user_slap(id10.0);
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPostThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_SPINHACK])
            
    CheckSpinHack_Post(id);
        
        
        if(
    gSettings[CHECK_SHAKE])
            
    CheckShake(id);
        
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPreThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_MOVEKEYS])
            
    CheckScriptBlock(id);
        
        if(
    gSettings[CHECK_BHOP])
        {
            if(!(
    pev(idpev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
                
    client_cmd(id";alias _special %s"BhopScript);
        }
        
        return 
    FMRES_IGNORED;
    }

    public 
    cmdDetectBhop(id)
    {
        if(!
    gSettings[CHECK_BHOP])
            return 
    1;
        
        if(!(
    pev(id,pev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
            return 
    1;
        
        return 
    0;
    }

    public 
    CheckShake(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        static 
    WeaponTrash;
        
    Weapon get_user_weapon(idTrashTrash);
        
        if(
    Weapon == CSW_M249)
            return 
    FMRES_IGNORED;
        
        if(((
    fAimAngles[0] ==  fOldAimAngles[id][0]) && (fAimAngles[1] ==  fOldAimAngles[id][1])) || (pev(idpev_button) & IN_JUMP))
        {
            
    Detections[id][SHAKE] -= 10;
            
            if(
    Detections[id][SHAKE] < 0)
                
    Detections[id][SHAKE] = 0;
        }
        else
            
    Detections[id][SHAKE]++;
        
        if(
    Detections[id][SHAKE] > 350)
        {
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Shake warning!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"SHAKE_WARN");
            
            
    client_cmd(id"spk %s"gWarningSounds[1]);
        }
        if(
    Detections[id][SHAKE] > 550)
            
    PunishUser(id);
        
        
    CopyVector(fAimAnglesfOldAimAngles[id]);
        
        return 
    FMRES_IGNORED;
    }

    public 
    CheckSpinHack_Post(id)
    {
        static 
    Float:fAngles[3];
        
    pev(idpev_anglesfAngles);
        
        
    fTotalAngle[id] += vector_distance(fLastAngles[id], fAngles);
        
        
    CopyVector(fAnglesfLastAngles[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if((
    Button IN_LEFT) || (Button IN_RIGHT))
            
    Detections[id][SPINHACK] = 0;
    }

    public 
    Fwd_PlaybackEvent(flagsideventindex)
    {
        if(!
    gSettings[CHECK_RAPIDFIRE])
            return 
    FMRES_IGNORED;
        
        for(new 
    sizeof gGunsEvents i++)
        {
            if(
    eventindex == gGunsEventsId[i])
            {
                static 
    WeaponTrash;
                
    Weapon get_user_weapon(idTrashTrash);
                
                static 
    Float:fAimAngles[3];
                
    pev(idpev_v_anglefAimAngles);
                
                if(
    Weapon == CSW_GLOCK18)
                    return 
    FMRES_IGNORED;
                
                if(
    gSettings[CHECK_RAPIDFIRE])
                    
    Detections[id][RAPIDFIRE]++;
                
                if(
    gSettings[CHECK_LOWRECOIL])
                {
                    if((
    fAimAngles[0] == fRecoilLastAngles[id][0]) && fRecoilLastAngles[id][0] != 0.0)
                        
    Detections[id][RECOIL]++;
                    else
                        
    Detections[id][RECOIL]--;
                    
                    
    fRecoilLastAngles[id][0] = fAimAngles[0];
                    
                    if(
    Detections[id][RECOIL] > 6)
                    {
                        
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                        
    //show_hudmessage(id, "[Hack Hunter] Low-recoil warning!");
                        
    show_hudmessage(id,"%L",LANG_PLAYER,"LOW_RECOIL");
                        
                        
    client_cmd(id"spk %s"gWarningSounds[1]);
                    }
                    if(
    Detections[id][RECOIL] > 8)
                        
    PunishUser(id);
                }
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    ClearRecoil()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    Detections[Players[i]][RECOIL] -= 10;
            
            if(
    Detections[Players[i]][RECOIL] < 0)
                
    Detections[Players[i]][RECOIL] = 0;
        }
    }

    public 
    CheckSpeedHack()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    cs_get_user_driving(id) >= 0)
                continue;
            
            static 
    Float:fOrigin[3], Float:fOldOrigin[3], Float:fDistance;
            
    pev(idpev_originfOrigin);
            
            
    CopyVector(fLastOrigin[id], fOldOrigin);
            
            if(
    gSettings[SPEEDHACK_SECURE])
            {
                
    fOrigin[2] = 0.0;
                
    fOldOrigin[2] = 0.0;
            }
            
            
    fDistance get_distance_f(fOriginfOldOrigin);
            
            if(
    Detections[id][SPEEDHACK] >= 3)
                
    Detections[id][SPEEDHACK]--;
            
            if(
    Detections[id][SPEEDHACK] < 0)
                
    Detections[id][SPEEDHACK] = 0;
            
            if(
    fDistance >= 240.0)
                
    Detections[id][SPEEDHACK] += 3;
            
            if(
    Detections[id][SPEEDHACK] >= 6)
            {
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Speedhack warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"SPEED_HACK");
                
                
    client_cmd(id"spk %s"gWarningSounds[1]);
            }
            if(
    Detections[id][SPEEDHACK] >= 8)
                
    PunishUser(id);
            
            
    CopyVector(fOriginfLastOrigin[id]);
        }
    }

    public 
    CheckSpinTotal()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    fTotalAngle[id] >= 1500.0)
            {        
                if(
    Detections[id][SPINHACK] >= 25 3)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Spinhack warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"SPIN_HACK");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][SPINHACK] >= 25)
                    
    PunishUser(id);
                
                
    Detections[id][SPINHACK]++;
            }
            else
                
    Detections[id][SPINHACK] = 0;
            
            
    fTotalAngle[id] = 0.0;
        }
    }

    public 
    CheckRapidFire()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    Detections[id][RAPIDFIRE] >= 15)
                
    PunishUser(id);
            
            
    Detections[id][RAPIDFIRE] = 0;
        }
    }

    public 
    CheckScriptBlock(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        
    CopyVector(fAimAnglesfAimOrigin[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if(
    Button IN_LEFT)
        {
            
    client_cmd(id"-left");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        else if(
    Button IN_RIGHT)
        {
            
    client_cmd(id"-right");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        
        if(
    gSettings[CHECK_DOUBLEATTACK])
        {
            if((
    Button IN_ATTACK) && (Button IN_ATTACK2))
            {
                
    Button Button & ~IN_ATTACK2;
                
    set_pev(idpev_buttonButton);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Dual attack is not allowed!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"DUAL_ATTACK");
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    EventDeathMsg()
    {
        if(!
    gSettings[CHECK_WALLHACK])
            return 
    1;
        
        static 
    KillerVictimWeapon[32];
        
    read_data(4WeaponCharsMax(Weapon));
        
        if(
    equali(Weapon"grenade"))
            return 
    1;
        
        
    Killer read_data(1);
        
    Victim read_data(2);
        
        static 
    bool:IsVisible;
        
    IsVisible fm_is_ent_visible(KillerVictim1);
        
        if(!
    IsVisible)
            
    WallKills[Killer]++;
        
        if(
    WallKills[Killer] >= gSettings[WALLHACK_MAX_DETECTS])
            
    PunishUser(Killer);
        
        return 
    0;
    }

    public 
    client_infochanged(id)
    {
        static 
    NewName[32], OldName[32];
        
        
    get_user_name(idOldNameCharsMax(OldName));
        
    get_user_info(id"name"NewNameCharsMax(NewName));
        
        if(!
    equali(NewNameOldName))
        {
            if(!
    gSettings[CHECK_FASTNAME])
                return 
    1;
            
            
    NamesChangesNum[id]++;
            
            if(
    NamesChangesNum[id] >= 4)
                
    PunishUser(id);
            
            if(!
    task_exists(id))
                
    set_task(4.0"ClearChangesNum"id);
        }
        return 
    0;
    }

    public 
    ClearChangesNum(id)
        
    NamesChangesNum[id] = 0;


    public 
    Fwd_TraceLine(Float:StartPos[3], Float:EndPos[3], SkipMonstersidTrace)
    {
        if(!
    is_user_alive(id))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_AIMBOT])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fGameTime;
        
    fGameTime get_gametime();
        
        if(
    fNextAimCheck[id] < fGameTime)
        {
            static 
    iTargetiHitGroupButton;
            
    iTarget get_tr2(TraceTR_pHit);
            
    iHitGroup = (<< get_tr2(TraceTR_iHitgroup));
            
    Button pev(idpev_button);
            
            if(!
    is_user_alive(iTarget))
                return 
    FMRES_IGNORED;
            
            if(
    get_pdata_int(idFM_TEAM_OFFSET) != get_pdata_int(iTargetFM_TEAM_OFFSET))
            {
                if((
    iHitGroup FM_HITGROUP_HEAD) && (Button != 0))
                    
    Detections[id][AIMBOT]++;
                else if(!(
    iHitGroup FM_HITGROUP_HEAD) || (Button <= 0))
                    
    Detections[id][AIMBOT] = 0;
                
                if(
    Detections[id][AIMBOT] >= 6)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Aimbot warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"AIM_BOT");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][AIMBOT] >= 7)
                    
    PunishUser(id);
                
                
    fNextAimCheck[id] = fGameTime 0.5;
            }
        }
        return 
    FMRES_IGNORED;
    }

    stock CountCheaters()
    {
        static 
    BaseDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(FileCharsMax(File), "%s/hackhunter/hackhunter_detects.txt"BaseDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter number of players detected.", -1);
            
        
        static 
    LineLenBuffer[16];
        
    Line read_file(FileLineBufferCharsMax(Buffer), Len);
        
        static 
    Num;
        
    Num str_to_num(Buffer);
        
        
    Num++;
        
        
    num_to_str(NumBufferCharsMax(Buffer));
        
        
    write_file(FileBuffer0);
    }

    stock Fm_user_slap(indexFloat:fDamage 0.0)
    {
        static 
    Float:fPunchangle[3];
        
    pev(indexpev_punchanglefPunchangle);
        
        
    fPunchangle[0] += random_float(-8.08.0);
        
    fPunchangle[1] += random_float(-8.08.0);
        
        
    set_pev(indexpev_punchanglefPunchangle);
        
        static 
    Float:fVelocity[3];
        
    pev(indexpev_velocityfVelocity);
        
        
    fVelocity[0] += random_num(01) ? 264.0 : -264.0;
        
    fVelocity[1] += random_num(01) ? 264.0 : -264.0;
        
        
    set_pev(indexpev_basevelocityfVelocity);
        
        
    fm_fakedamage(index"worldspawn"fDamage1);
        
        return 
    1;
    }

    stock PunishUser(index)
    {
        if(!
    is_user_connected(index))
            return;
        
        if(
    gSettings[IGNORE_ADMINS])
        {
            if(
    access(indexADMIN_IGNORE_FLAG))
            {
                
    WriteToLog(index0"");
                return;
            }
        }
        
        if(!
    IsDetected[index])
        {
            static 
    Name[32], authid[32], uid;
            
    get_user_name(indexNameCharsMax(Name));
            
    get_user_authid(index,authid,sizeof authid 1);
            
    uid get_user_userid(index);
            
            switch(
    gSettings[PUNISH_TYPE])
            {
                case 
    :
                {    
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
                    
    set_hudmessage(25500, -1.00.8506.05.01.01.03);
                    
    //show_hudmessage(index, "[Hack Hunter] You have been detected with cheats!");
                    
    show_hudmessage(index,"%L",LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was detected with cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"ID_WITH_HACK",Name);
                }
                case 
    :
                {
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
    //server_cmd("kick #%d ^"[Hack Hunter] You have been detected with cheats!", uid);
                    
    server_cmd("kick #%d ^"%L^"",uid,LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"KICK_HAVE_CHEAT",Name);
                }
                case 
    :
                {        
                    switch(
    gSettings[BAN_TYPE])
                    {
                        
    // STEAM ID
                        
    case 0:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0])
                            
                            
    server_cmd("kick #%d;wait;wait;wait;banid %d ^"%s^";wait;wait;wait;writeid"uidgSettings[BAN_TIME], authid);
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
        
                        }
                        
                        
    // IP
                        
    case 1:
                        {
                            static 
    Ip[32];
                            
    get_user_ip(indexIpCharsMax(Ip), 1);
                            
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;writeip"uidgSettings[BAN_TIME], Ip);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                        
                        
    // AMX BANS
                        
    case 2:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("amx_ban %d %s",gSettings[BAN_TIME], Name);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                    }
                }
            }
            
            
    CountCheaters();
            
    WriteToLog(indexgSettings[PUNISH_TYPE], "");
            
            
    IsDetected[index] = true;
        }
    }

    stock CopyVector(Float:fVec1[3], Float:fVec2[3])
    {
        
    fVec2[0] = fVec1[0];
        
    fVec2[1] = fVec1[1];
        
    fVec2[2] = fVec1[2];
    }

    stock WriteToLog(id_:Log_TypeString[])
    {
        if(!
    gSettings[PLUGIN_LOG_ACTIONS])
            return;
        
        static 
    BaseDir[64], LogsDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(LogsDirCharsMax(LogsDir), "%s/hackhunter/logs"BaseDir);
        
    formatex(FileCharsMax(File), "%s/Log.log"LogsDir);
        
        if(!
    dir_exists(LogsDir))
            
    mkdir(LogsDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter logs file.", -1);
        
        static 
    Name[32], Ip[32];
        
        if(
    Log_Type != -1)
        {
            
    get_user_name(idNameCharsMax(Name));
            
    get_user_ip(idIpCharsMax(Ip), 1);
        }
        
        switch(
    Log_Type)
        {
            case -
    : { log_to_file(File"%s"String); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_1"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_2"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_3"NameIp); }
        }
    }

    stock bool:Exists_IP(id, const File[])
    {
        new 
    iFile fopen(File"rt");
        
        if(!
    iFile)
            
    write_file(File"", -1);
        
        new 
    Ip[32]
        
    get_user_ip(idIpsizeof Ip 11);
        
        while(!
    feof(iFile))
        {
            static 
    Buffer[64];
            
    fgets(iFileBuffersizeof Buffer 1);
            
            if(
    Buffer[0] == ';')
                continue;
            
            new 
    nLen strlen(Ip);
            
            if(
    equali(IpBuffernLen))
            {
                
    fclose(iFile);
                return 
    true;
            }
        }
        
    fclose(iFile);
        
        return 
    false;

    Najlepszy hosting Hidden Content href="Hidden Content target="_blank">tutaj
    Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na Hidden Content

    "At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.

  3. #3
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Odp: Plugin HackHunter - HUD

    Tylko, że nie chodziło mi o wszystkie, ale tylko o tą wiadomość w hudzie. Da się jeszcze coś z tym zrobić?

  4. #4
    Adminus pospolitus Awatar naven
    Dołączył
    Jan 2008
    Wiek
    25
    Posty
    10,802
    Thanks
    31
    Thanked 652 Times in 605 Posts

    Domyślnie Odp: Plugin HackHunter - HUD

    Nie rozumiem. Daj tu langa i powiedz które rzeczy z langa ma nie wyświetlać.
    Najlepszy hosting Hidden Content href="Hidden Content target="_blank">tutaj
    Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na Hidden Content

    "At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.

  5. #5
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Odp: Plugin HackHunter - HUD

    Masz link do tego pluga: HackHunter RC1 full PL! - Pluginy AMXX - AMXX.pl: Support AMX Mod X

    Ma nie wyświetlać tego w HUD, co podałem screena w pierwszy poście (treści tematu) i tylko tego!

  6. #6
    Adminus pospolitus Awatar naven
    Dołączył
    Jan 2008
    Wiek
    25
    Posty
    10,802
    Thanks
    31
    Thanked 652 Times in 605 Posts

    Domyślnie Odp: Plugin HackHunter - HUD

    Kod php:
    #include <amxmodx>
    #include <amxmisc>
    #include <cstrike>
    #include <fakemeta_util>

    #define PLUGIN "Hack Hunter"
    #define VERSION "1.1"
    #define AUTHOR "Alka & SAMURAI"

    #define CharsMax(%1) sizeof %1 - 1

    #define MAX_FLASHBUG_ZONES 20

    #define ADVERTISING_TIME 240.0

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

    #define ADMIN_IGNORE_FLAG ADMIN_BAN

    enum _:Enum_Settings {
        
        
    PLUGIN_STATUS 0,
        
    PLUGIN_LOG_ACTIONS,
        
    PLUGIN_ADVERTISING,
        
        
    PUNISH_TYPE,
        
    BAN_TYPE,
        
    BAN_TIME,
        
    IGNORE_ADMINS,
        
        
    SPEEDHACK_SECURE,
        
        
    CHECK_RAPIDFIRE,
        
    CHECK_SPINHACK,
        
    CHECK_SPEEDHACK,
        
    CHECK_SHAKE,
        
    CHECK_LOWRECOIL,
        
    CHECK_AIMBOT,
        
    CHECK_BHOP,
        
        
    CHECK_MOVEKEYS,
        
    CHECK_DOUBLEATTACK,
        
        
    CHECK_FLASHBUG,
        
        
    CHECK_WALLHACK,
        
    WALLHACK_MAX_DETECTS,
        
        
    CHECK_FASTNAME,
        
    CHECK_NAME,
        
    CHECK_NAME_SYMBOLS,
        
    CNS_SHOW_REASON,
        
    CHECK_IPS
    };

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

    new const 
    gSettings_Name[][] = {
        
        
    "Plugin_Status",
        
    "Plugin_Log_Actions",
        
    "Plugin_Advertising",
        
    "Punish_Type",
        
    "Punish_Ban_Type",
        
    "Punish_Bantime",
        
    "Ignore_Admins",
        
    "Speedhack_Secure",
        
    "Check_Rapidfire",
        
    "Check_Spinhack",
        
    "Check_Speedhack",
        
    "Check_Shake",
        
    "Check_Lowrecoil",
        
    "Check_Aimbot",
        
    "Check_Bhop",
        
    "Check_Movekeys",
        
    "Check_Doubleattack",
        
    "Check_Flashbug",
        
    "Check_Wallhack",
        
    "Wallhack_Max_Detects",
        
    "Check_Name_Fastchange",
        
    "Check_Name",
        
    "Check_Name_Symbols",
        
    "CNS_Show_Reason",
        
    "Check_IPs"
    };

    new const 
    gWarningSounds[][] = {
        
        
    "hackhunter/spray.wav",
        
    "hackhunter/warning.wav"
    };

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

    new const 
    gGunsEvents[][] = {
        
        
    "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 
    gGunsEventsId[sizeof gGunsEvents];

    new 
    gSettings[Enum_Settings] = {0, ...};
    new 
    gMapName[32];

    new 
    FlashVectors[MAX_FLASHBUG_ZONES][4];
    new 
    FlashZones;

    new 
    bool:IsDetected[33];
    new 
    Detections[33][Cheats];

    new 
    Float:fOldAimAngles[33][3];
    new 
    Float:fLastAngles[33][3];
    new 
    Float:fTotalAngle[33];

    new 
    Float:fRecoilLastAngles[33][3];

    new 
    Float:fLastOrigin[33][3];

    new 
    Float:fAimOrigin[33][3];

    new 
    WallKills[33];

    new 
    BhopScript[32];
    new 
    NamesChangesNum[33];
    new 
    RestrictedSymbols[32];

    new 
    Float:fNextAimCheck[33];

    public 
    plugin_init() {
        
        
    register_plugin(PLUGINVERSIONAUTHOR);
        
        
    register_dictionary("hack_hunter.txt");
        
        
    register_forward(FM_Think"Fwd_Think");
        
    register_forward(FM_EmitSound"Fwd_EmitSound");
        
    register_forward(FM_PlayerPostThink"Fwd_PlayerPostThink");
        
    register_forward(FM_PlayerPreThink"Fwd_PlayerPreThink");
        
    register_forward(FM_PlaybackEvent"Fwd_PlaybackEvent");
        
    register_forward(FM_TraceLine"Fwd_TraceLine");
        
        
    register_event("DeathMsg""EventDeathMsg""a");
        
    register_event("HLTV""EventNewRound""a""1=0""2=0");
        
        
    formatex(BhopScriptCharsMax(BhopScript), "plop%d%d%d"random(100), random(100), random(100));
        
    register_clcmd(BhopScript"cmdDetectBhop");
    }

    public 
    plugin_precache()
    {
        for(new 
    sizeof gWarningSounds i++)
            
    precache_sound(gWarningSounds[i]);
        
        for(new 
    sizeof gGunsEvents x++)
            
    gGunsEventsId[x] = engfunc(EngFunc_PrecacheEvent1gGunsEvents[x]);
    }

    public 
    plugin_cfg()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/hackhunter_settings.cfg"HackHunterDir);
        
        if(!
    dir_exists(HackHunterDir))
            
    mkdir(HackHunterDir);
        
        if(!
    file_exists(File))
        {
            
    server_print("%L",LANG_SERVER,"PRINT_SRV_ERROR");
            
            return;
        }
        else
            
    server_print("%L",LANG_PLAYER,"SUCC_LOADED");
        
        static 
    iFileBuffer[128], Key[32], Status[16];
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/'))
                continue;
            
            
    strtok(BufferKeyCharsMax(Key), StatusCharsMax(Status), '='1);
            
            for(new 
    sizeof gSettings_Name i++)
            {
                if(
    equali(gSettings_Name[i], Key))
                {
                    if(
    equali(Key"Check_Name_Symbols"))
                    {
                        
    trim(Status);
                        
    formatex(RestrictedSymbolsCharsMax(RestrictedSymbols), "%s"Status);
                        
                        
    //server_print("[Hack Hunter] Setting: %s have string %s", gSettings_Name[i], Status);
                        
    server_print("%L",LANG_SERVER,"SETTINGS_STR",gSettings_Name[i], Status);
                        
                        
                        continue;
                    }
                    
    gSettings[i] = str_to_num(Status);
                    
                    
    //server_print("[Hack Hunter] Setting: %s is %s", gSettings_Name[i], gSettings[i] ? "Enabled" : "Disabled");
                    
    server_print("%L",LANG_SERVER,"SET_V_2",gSettings_Name[i], gSettings[i] ? "Enabled" "Disabled");
                    
                }
            }
        }
        
    fclose(iFile);
        
        
    LoadFlashVectors();
        
        if(!
    gSettings[PLUGIN_STATUS])
        {
            
    pause("a");
            return;
        }
        if(
    gSettings[PLUGIN_ADVERTISING])
            
    set_task(ADVERTISING_TIME"cmdAdvertising"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_RAPIDFIRE])
            
    set_task(1.0"CheckRapidFire"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPINHACK])
            
    set_task(1.0"CheckSpinTotal"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_SPEEDHACK])
            
    set_task(0.5"CheckSpeedHack"random(1337), ""0"b"0);
        if(
    gSettings[CHECK_LOWRECOIL])
            
    set_task(1.0"ClearRecoil"random(1337), ""0"b"0);
    }

    public 
    client_connect(id)
    {
        for(new 
    sizeof Detections[] ; i++)
        {
            
    Detections[id][i] = 0;
        }
        
        
    IsDetected[id] = false;
        
    WallKills[id] = 0;
        
    NamesChangesNum[id] = 0;
        
        if(
    gSettings[CHECK_NAME])
        {
            static 
    Name[32];
            
    get_user_name(idNameCharsMax(Name))
            
            for(new 
    strlen(RestrictedSymbols) ; i++)
            {
                for(new 
    strlen(Name) ; j++)
                {
                    if(
    Name[j] == RestrictedSymbols[i])
                    {
                        
    //server_cmd("kick #%d ^"[Hack Hunter]You have a restricted symbol in name! Change it.^"", get_user_userid(id));
                        
    server_cmd("kick #%d ^"%L^""get_user_userid(id), LANG_PLAYER,"WRONG_CH");
                        
                        
                        if(
    gSettings[CNS_SHOW_REASON])
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having a restricted symbol in name.", Name);
                            
    client_print(0print_chat"%L",LANG_PLAYER,"KICK_WR_CH"Name);
                            
                        
                        break;
                    }
                }
            }
        }
        if(
    gSettings[CHECK_IPS])
        {
            static 
    BaseDir[64], File[64];
            
    get_basedir(BaseDirsizeof BaseDir 1);
            
            
    formatex(Filesizeof File 1"%s/hackhunter/hackhuntre_ips.ini"BaseDir);
            
            if(
    Exists_IP(idFile))
                
    //server_cmd("kick #%d ^"[Hack Hunter]You'r IP is restricted.^"", get_user_userid(id));
                
    server_cmd("kick #%d ^"%L^"",get_user_userid(id), LANG_PLAYER,"WRONG_IP");
            
        }
        return 
    0;
    }

    public 
    client_putinserver(id)
    {
        static 
    Name[32];
        
    get_user_name(idNameCharsMax(Name));
        
        static 
    Info[3];
        for(new 
    sizeof gOldCheats i++)
        {
            
    get_user_info(idgOldCheats[i], InfoCharsMax(Info));
            
            if(
    strlen(Info) > 0)
            {
                
    //client_print(0, print_chat, "[Hack Hunter]%s is detected having cheats!", Name);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"DEC_CON",Name);
                
    PunishUser(id);
                
                return 
    1;
            }
        }
        
    //client_print(0, print_chat, "[Hack Hunter] %s's config(.CFG) has been scaned successfully.", Name);
        
    client_print(0,print_chat,"%L",LANG_PLAYER,"CFG_SC",Name);
        
        return 
    0;
    }


    public 
    LoadFlashVectors()
    {
        static 
    BaseDir[64], HackHunterDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    get_mapname(gMapNameCharsMax(gMapName));
        
        
    formatex(HackHunterDirCharsMax(HackHunterDir), "%s/hackhunter"BaseDir);
        
    formatex(FileCharsMax(File), "%s/flash_bug/%s.ini"HackHunterDirgMapName);
        
        if(!
    file_exists(File))
        {
            
    //server_print("[Hack Hunter] Couldn't load flash bug vectors for ^"%s^".", gMapName);
            
    server_print("%L",LANG_SERVER,"LD_VECTORS",gMapName);
            return;
        }
        
        static 
    iFileBuffer[128], Temp[4][32], LineParamsi;
        
    iFile fopen(File"rt");
        
        while(!
    feof(iFile))
        {
            
    fgets(iFileBufferCharsMax(Buffer));
            
            if((
    Buffer[0] == ';') || (Buffer[0] == '/' && Buffer[1] == '/') || strlen(Buffer) < 2)
                continue;
            
            
    LineParams parse(BufferTemp[0], sizeof Temp[] - 1Temp[1], sizeof Temp[] - 1Temp[2], sizeof Temp[] - 1Temp[3], sizeof Temp[] - 1);
            
            if(
    LineParams != 4)
            {
                
    //server_print("[Hack Hunter] Error in flash bug file for ^"%s^".", gMapName);
                
    server_print("%L",LANG_SERVER,"SV_PRINT_VEC",gMapName);
                continue;
            }
            
            
    FlashVectors[i][0] = str_to_num(Temp[0]);
            
    FlashVectors[i][1] = str_to_num(Temp[1]);
            
    FlashVectors[i][2] = str_to_num(Temp[2]);
            
    FlashVectors[i][3] = str_to_num(Temp[3]);
            
            
    i++;
        }
        
    fclose(iFile);
        
        
    FlashZones i;
        
        
    //server_print("[Hack Hunter] Successfully loaded %d flash bug vectors for ^"%s^".", FlashZones, gMapName);
        
    server_print("%L",LANG_SERVER,"SUC_VEC_LOAD",FlashZones,gMapName);
    }

    public 
    EventNewRound()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ch");
        
        for(new 
    iNum i++)
        {
            if(
    gSettings[CHECK_SPEEDHACK])
            {
                static 
    Float:fOrigin[3];
                
    pev(Players[i], pev_originfOrigin);
                
                
    CopyVector(fOriginfLastOrigin[Players[i]]);
            }
            if(
    gSettings[CHECK_WALLHACK])
            {
                
    WallKills[Players[i]] = 0;
            }
        }
    }

    public 
    Fwd_Think(Ent)
    {
        if(!
    pev_valid(Ent))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_FLASHBUG])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fOrigin[3], iOrigin[3], BugZone[3];
        static 
    Model[32];
        
        
    pev(Entpev_modelModelCharsMax(Model));
        
        if(!
    equali(Model"models/w_flashbang.mdl"))
            return 
    FMRES_IGNORED;
        
        static 
    id;
        
    id pev(Entpev_owner);
        
        
    pev(Entpev_originfOrigin);
        
    iOrigin[0] = floatround(fOrigin[0]);
        
    iOrigin[1] = floatround(fOrigin[1]);
        
    iOrigin[2] = floatround(fOrigin[2]);
        
        for(new 
    FlashZones i++)
        {
            
    BugZone[0] = FlashVectors[i][0];
            
    BugZone[1] = FlashVectors[i][1];
            
    BugZone[2] = FlashVectors[i][2];
            
            if(
    get_distance(iOriginBugZone) <=  FlashVectors[i][3])
            {
                
                
    //client_print(0, print_chat, "[Hack Hunter] Removed a flashbang from (%d %d %d).", iOrigin[0], iOrigin[1], iOrigin[2]);
                
    client_print(0,print_chat,"%L",LANG_PLAYER,"SUCC_RMV_FLB",iOrigin[0], iOrigin[1], iOrigin[2]);
                
    engfunc(EngFunc_RemoveEntityEnt);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Ilegal map bug exploit warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"ILG_MAP_EXPLOIT");
                
                
    Fm_user_slap(id10.0);
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPostThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_SPINHACK])
            
    CheckSpinHack_Post(id);
        
        
        if(
    gSettings[CHECK_SHAKE])
            
    CheckShake(id);
        
        return 
    FMRES_IGNORED;
    }

    public 
    Fwd_PlayerPreThink(id)
    {
        if(!
    is_user_alive(id) || is_user_bot(id))
            return 
    FMRES_IGNORED;
        
        if(
    gSettings[CHECK_MOVEKEYS])
            
    CheckScriptBlock(id);
        
        if(
    gSettings[CHECK_BHOP])
        {
            if(!(
    pev(idpev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
                
    client_cmd(id";alias _special %s"BhopScript);
        }
        
        return 
    FMRES_IGNORED;
    }

    public 
    cmdDetectBhop(id)
    {
        if(!
    gSettings[CHECK_BHOP])
            return 
    1;
        
        if(!(
    pev(id,pev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
            return 
    1;
        
        return 
    0;
    }

    public 
    CheckShake(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        static 
    WeaponTrash;
        
    Weapon get_user_weapon(idTrashTrash);
        
        if(
    Weapon == CSW_M249)
            return 
    FMRES_IGNORED;
        
        if(((
    fAimAngles[0] ==  fOldAimAngles[id][0]) && (fAimAngles[1] ==  fOldAimAngles[id][1])) || (pev(idpev_button) & IN_JUMP))
        {
            
    Detections[id][SHAKE] -= 10;
            
            if(
    Detections[id][SHAKE] < 0)
                
    Detections[id][SHAKE] = 0;
        }
        else
            
    Detections[id][SHAKE]++;
        
        if(
    Detections[id][SHAKE] > 350)
        {
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Shake warning!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"SHAKE_WARN");
            
            
    client_cmd(id"spk %s"gWarningSounds[1]);
        }
        if(
    Detections[id][SHAKE] > 550)
            
    PunishUser(id);
        
        
    CopyVector(fAimAnglesfOldAimAngles[id]);
        
        return 
    FMRES_IGNORED;
    }

    public 
    CheckSpinHack_Post(id)
    {
        static 
    Float:fAngles[3];
        
    pev(idpev_anglesfAngles);
        
        
    fTotalAngle[id] += vector_distance(fLastAngles[id], fAngles);
        
        
    CopyVector(fAnglesfLastAngles[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if((
    Button IN_LEFT) || (Button IN_RIGHT))
            
    Detections[id][SPINHACK] = 0;
    }

    public 
    Fwd_PlaybackEvent(flagsideventindex)
    {
        if(!
    gSettings[CHECK_RAPIDFIRE])
            return 
    FMRES_IGNORED;
        
        for(new 
    sizeof gGunsEvents i++)
        {
            if(
    eventindex == gGunsEventsId[i])
            {
                static 
    WeaponTrash;
                
    Weapon get_user_weapon(idTrashTrash);
                
                static 
    Float:fAimAngles[3];
                
    pev(idpev_v_anglefAimAngles);
                
                if(
    Weapon == CSW_GLOCK18)
                    return 
    FMRES_IGNORED;
                
                if(
    gSettings[CHECK_RAPIDFIRE])
                    
    Detections[id][RAPIDFIRE]++;
                
                if(
    gSettings[CHECK_LOWRECOIL])
                {
                    if((
    fAimAngles[0] == fRecoilLastAngles[id][0]) && fRecoilLastAngles[id][0] != 0.0)
                        
    Detections[id][RECOIL]++;
                    else
                        
    Detections[id][RECOIL]--;
                    
                    
    fRecoilLastAngles[id][0] = fAimAngles[0];
                    
                    if(
    Detections[id][RECOIL] > 6)
                    {
                        
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                        
    //show_hudmessage(id, "[Hack Hunter] Low-recoil warning!");
                        
    show_hudmessage(id,"%L",LANG_PLAYER,"LOW_RECOIL");
                        
                        
    client_cmd(id"spk %s"gWarningSounds[1]);
                    }
                    if(
    Detections[id][RECOIL] > 8)
                        
    PunishUser(id);
                }
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    ClearRecoil()
    {
        static 
    Players[32], iNum;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    Detections[Players[i]][RECOIL] -= 10;
            
            if(
    Detections[Players[i]][RECOIL] < 0)
                
    Detections[Players[i]][RECOIL] = 0;
        }
    }

    public 
    CheckSpeedHack()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    cs_get_user_driving(id) >= 0)
                continue;
            
            static 
    Float:fOrigin[3], Float:fOldOrigin[3], Float:fDistance;
            
    pev(idpev_originfOrigin);
            
            
    CopyVector(fLastOrigin[id], fOldOrigin);
            
            if(
    gSettings[SPEEDHACK_SECURE])
            {
                
    fOrigin[2] = 0.0;
                
    fOldOrigin[2] = 0.0;
            }
            
            
    fDistance get_distance_f(fOriginfOldOrigin);
            
            if(
    Detections[id][SPEEDHACK] >= 3)
                
    Detections[id][SPEEDHACK]--;
            
            if(
    Detections[id][SPEEDHACK] < 0)
                
    Detections[id][SPEEDHACK] = 0;
            
            if(
    fDistance >= 240.0)
                
    Detections[id][SPEEDHACK] += 3;
            
            if(
    Detections[id][SPEEDHACK] >= 6)
            {
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Speedhack warning!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"SPEED_HACK");
                
                
    client_cmd(id"spk %s"gWarningSounds[1]);
            }
            if(
    Detections[id][SPEEDHACK] >= 8)
                
    PunishUser(id);
            
            
    CopyVector(fOriginfLastOrigin[id]);
        }
    }

    public 
    CheckSpinTotal()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    fTotalAngle[id] >= 1500.0)
            {        
                if(
    Detections[id][SPINHACK] >= 25 3)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Spinhack warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"SPIN_HACK");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][SPINHACK] >= 25)
                    
    PunishUser(id);
                
                
    Detections[id][SPINHACK]++;
            }
            else
                
    Detections[id][SPINHACK] = 0;
            
            
    fTotalAngle[id] = 0.0;
        }
    }

    public 
    CheckRapidFire()
    {
        static 
    Players[32], iNumid;
        
    get_players(PlayersiNum"ach");
        
        for(new 
    iNum i++)
        {
            
    id Players[i];
            
            if(
    Detections[id][RAPIDFIRE] >= 15)
                
    PunishUser(id);
            
            
    Detections[id][RAPIDFIRE] = 0;
        }
    }

    public 
    CheckScriptBlock(id)
    {
        static 
    Float:fAimAngles[3];
        
    pev(idpev_anglesfAimAngles);
        
        
    CopyVector(fAimAnglesfAimOrigin[id]);
        
        static 
    Button;
        
    Button pev(idpev_button);
        
        if(
    Button IN_LEFT)
        {
            
    client_cmd(id"-left");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        else if(
    Button IN_RIGHT)
        {
            
    client_cmd(id"-right");
            
            
    CopyVector(fAimOrigin[id], fAimAngles);
            
            
    set_pev(idpev_anglesfAimAngles);
            
    set_pev(idpev_fixangle1);
            
            
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
            
    //show_hudmessage(id, "[Hack Hunter] Left and Right keys are disabled!");
            
    show_hudmessage(id,"%L",LANG_PLAYER,"LF_R_L_KEYS");
        }
        
        if(
    gSettings[CHECK_DOUBLEATTACK])
        {
            if((
    Button IN_ATTACK) && (Button IN_ATTACK2))
            {
                
    Button Button & ~IN_ATTACK2;
                
    set_pev(idpev_buttonButton);
                
                
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                
    //show_hudmessage(id, "[Hack Hunter] Dual attack is not allowed!");
                
    show_hudmessage(id,"%L",LANG_PLAYER,"DUAL_ATTACK");
                
                return 
    FMRES_SUPERCEDE;
            }
        }
        return 
    FMRES_IGNORED;
    }

    public 
    EventDeathMsg()
    {
        if(!
    gSettings[CHECK_WALLHACK])
            return 
    1;
        
        static 
    KillerVictimWeapon[32];
        
    read_data(4WeaponCharsMax(Weapon));
        
        if(
    equali(Weapon"grenade"))
            return 
    1;
        
        
    Killer read_data(1);
        
    Victim read_data(2);
        
        static 
    bool:IsVisible;
        
    IsVisible fm_is_ent_visible(KillerVictim1);
        
        if(!
    IsVisible)
            
    WallKills[Killer]++;
        
        if(
    WallKills[Killer] >= gSettings[WALLHACK_MAX_DETECTS])
            
    PunishUser(Killer);
        
        return 
    0;
    }

    public 
    client_infochanged(id)
    {
        static 
    NewName[32], OldName[32];
        
        
    get_user_name(idOldNameCharsMax(OldName));
        
    get_user_info(id"name"NewNameCharsMax(NewName));
        
        if(!
    equali(NewNameOldName))
        {
            if(!
    gSettings[CHECK_FASTNAME])
                return 
    1;
            
            
    NamesChangesNum[id]++;
            
            if(
    NamesChangesNum[id] >= 4)
                
    PunishUser(id);
            
            if(!
    task_exists(id))
                
    set_task(4.0"ClearChangesNum"id);
        }
        return 
    0;
    }

    public 
    ClearChangesNum(id)
        
    NamesChangesNum[id] = 0;


    public 
    Fwd_TraceLine(Float:StartPos[3], Float:EndPos[3], SkipMonstersidTrace)
    {
        if(!
    is_user_alive(id))
            return 
    FMRES_IGNORED;
        
        if(!
    gSettings[CHECK_AIMBOT])
            return 
    FMRES_IGNORED;
        
        static 
    Float:fGameTime;
        
    fGameTime get_gametime();
        
        if(
    fNextAimCheck[id] < fGameTime)
        {
            static 
    iTargetiHitGroupButton;
            
    iTarget get_tr2(TraceTR_pHit);
            
    iHitGroup = (<< get_tr2(TraceTR_iHitgroup));
            
    Button pev(idpev_button);
            
            if(!
    is_user_alive(iTarget))
                return 
    FMRES_IGNORED;
            
            if(
    get_pdata_int(idFM_TEAM_OFFSET) != get_pdata_int(iTargetFM_TEAM_OFFSET))
            {
                if((
    iHitGroup FM_HITGROUP_HEAD) && (Button != 0))
                    
    Detections[id][AIMBOT]++;
                else if(!(
    iHitGroup FM_HITGROUP_HEAD) || (Button <= 0))
                    
    Detections[id][AIMBOT] = 0;
                
                if(
    Detections[id][AIMBOT] >= 6)
                {
                    
    set_hudmessage(25500, -1.0, -1.006.05.01.01.03);
                    
    //show_hudmessage(id, "[Hack Hunter] Aimbot warning!");
                    
    show_hudmessage(id,"%L",LANG_PLAYER,"AIM_BOT");
                    
                    
    client_cmd(id"spk %s"gWarningSounds[1]);
                }
                if(
    Detections[id][AIMBOT] >= 7)
                    
    PunishUser(id);
                
                
    fNextAimCheck[id] = fGameTime 0.5;
            }
        }
        return 
    FMRES_IGNORED;
    }

    stock CountCheaters()
    {
        static 
    BaseDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(FileCharsMax(File), "%s/hackhunter/hackhunter_detects.txt"BaseDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter number of players detected.", -1);
            
        
        static 
    LineLenBuffer[16];
        
    Line read_file(FileLineBufferCharsMax(Buffer), Len);
        
        static 
    Num;
        
    Num str_to_num(Buffer);
        
        
    Num++;
        
        
    num_to_str(NumBufferCharsMax(Buffer));
        
        
    write_file(FileBuffer0);
    }

    stock Fm_user_slap(indexFloat:fDamage 0.0)
    {
        static 
    Float:fPunchangle[3];
        
    pev(indexpev_punchanglefPunchangle);
        
        
    fPunchangle[0] += random_float(-8.08.0);
        
    fPunchangle[1] += random_float(-8.08.0);
        
        
    set_pev(indexpev_punchanglefPunchangle);
        
        static 
    Float:fVelocity[3];
        
    pev(indexpev_velocityfVelocity);
        
        
    fVelocity[0] += random_num(01) ? 264.0 : -264.0;
        
    fVelocity[1] += random_num(01) ? 264.0 : -264.0;
        
        
    set_pev(indexpev_basevelocityfVelocity);
        
        
    fm_fakedamage(index"worldspawn"fDamage1);
        
        return 
    1;
    }

    stock PunishUser(index)
    {
        if(!
    is_user_connected(index))
            return;
        
        if(
    gSettings[IGNORE_ADMINS])
        {
            if(
    access(indexADMIN_IGNORE_FLAG))
            {
                
    WriteToLog(index0"");
                return;
            }
        }
        
        if(!
    IsDetected[index])
        {
            static 
    Name[32], authid[32], uid;
            
    get_user_name(indexNameCharsMax(Name));
            
    get_user_authid(index,authid,sizeof authid 1);
            
    uid get_user_userid(index);
            
            switch(
    gSettings[PUNISH_TYPE])
            {
                case 
    :
                {    
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
                    
    set_hudmessage(25500, -1.00.8506.05.01.01.03);
                    
    //show_hudmessage(index, "[Hack Hunter] You have been detected with cheats!");
                    
    show_hudmessage(index,"%L",LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was detected with cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"ID_WITH_HACK",Name);
                }
                case 
    :
                {
                    
    client_cmd(index"spk %s"gWarningSounds[0]);
                    
    //server_cmd("kick #%d ^"[Hack Hunter] You have been detected with cheats!", uid);
                    
    server_cmd("kick #%d ^"%L^"",uid,LANG_PLAYER,"HACK_DETECT");
                    
                    
    //client_print(0, print_chat, "[Hack Hunter] %s was kicked by Hack Hunter for having cheats!", Name);
                    
    client_print(0,print_chat,"%L",LANG_PLAYER,"KICK_HAVE_CHEAT",Name);
                }
                case 
    :
                {        
                    switch(
    gSettings[BAN_TYPE])
                    {
                        
    // STEAM ID
                        
    case 0:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0])
                            
                            
    server_cmd("kick #%d;wait;wait;wait;banid %d ^"%s^";wait;wait;wait;writeid"uidgSettings[BAN_TIME], authid);
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
        
                        }
                        
                        
    // IP
                        
    case 1:
                        {
                            static 
    Ip[32];
                            
    get_user_ip(indexIpCharsMax(Ip), 1);
                            
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;writeip"uidgSettings[BAN_TIME], Ip);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                        
                        
    // AMX BANS
                        
    case 2:
                        {
                            
    client_cmd(index"spk %s"gWarningSounds[0]);
                            
    server_cmd("amx_ban %d %s",gSettings[BAN_TIME], Name);
                            
                            
    //client_print(0, print_chat, "[Hack Hunter] %s was banned for %d min by Hack Hunter for having cheats!", Name, gSettings[BAN_TIME]);
                            
    client_print(0,print_chat,"%L",LANG_PLAYER,"BAN_MIN_CHEAT",NamegSettings[BAN_TIME]);
                        }
                    }
                }
            }
            
            
    CountCheaters();
            
    WriteToLog(indexgSettings[PUNISH_TYPE], "");
            
            
    IsDetected[index] = true;
        }
    }

    stock CopyVector(Float:fVec1[3], Float:fVec2[3])
    {
        
    fVec2[0] = fVec1[0];
        
    fVec2[1] = fVec1[1];
        
    fVec2[2] = fVec1[2];
    }

    stock WriteToLog(id_:Log_TypeString[])
    {
        if(!
    gSettings[PLUGIN_LOG_ACTIONS])
            return;
        
        static 
    BaseDir[64], LogsDir[64], File[64];
        
    get_basedir(BaseDirCharsMax(BaseDir));
        
        
    formatex(LogsDirCharsMax(LogsDir), "%s/hackhunter/logs"BaseDir);
        
    formatex(FileCharsMax(File), "%s/Log.log"LogsDir);
        
        if(!
    dir_exists(LogsDir))
            
    mkdir(LogsDir);
        
        if(!
    file_exists(File))
            
    write_file(File";Hack Hunter logs file.", -1);
        
        static 
    Name[32], Ip[32];
        
        if(
    Log_Type != -1)
        {
            
    get_user_name(idNameCharsMax(Name));
            
    get_user_ip(idIpCharsMax(Ip), 1);
        }
        
        switch(
    Log_Type)
        {
            case -
    : { log_to_file(File"%s"String); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_1"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_2"NameIp); }
            case 
    : { log_to_file(File"%L",LANG_PLAYER,"LOG_F_3"NameIp); }
        }
    }

    stock bool:Exists_IP(id, const File[])
    {
        new 
    iFile fopen(File"rt");
        
        if(!
    iFile)
            
    write_file(File"", -1);
        
        new 
    Ip[32]
        
    get_user_ip(idIpsizeof Ip 11);
        
        while(!
    feof(iFile))
        {
            static 
    Buffer[64];
            
    fgets(iFileBuffersizeof Buffer 1);
            
            if(
    Buffer[0] == ';')
                continue;
            
            new 
    nLen strlen(Ip);
            
            if(
    equali(IpBuffernLen))
            {
                
    fclose(iFile);
                return 
    true;
            }
        }
        
    fclose(iFile);
        
        return 
    false;

    Najlepszy hosting Hidden Content href="Hidden Content target="_blank">tutaj
    Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na Hidden Content

    "At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.

Podobne wątki

  1. Plugin bullet_damage.amxx nie działa i pytanie o plugin
    By MamFarta in forum Problemy z HLDS
    Odpowiedzi: 1
    Ostatni post / autor: 27-12-2011, 20:37
  2. Jak zdjąć bana? HackHunter
    By Monopolovy in forum Problem z pluginem AMX/AMXX
    Odpowiedzi: 7
    Ostatni post / autor: 17-11-2010, 21:11
  3. Hackhunter
    By Lodokor in forum Amx Mod X
    Odpowiedzi: 5
    Ostatni post / autor: 03-06-2008, 16:10
  4. Hackhunter
    By Lodokor in forum Amx Mod X
    Odpowiedzi: 1
    Ostatni post / autor: 27-05-2008, 09:08
  5. HackHunter.PL
    By NeeX1 in forum Amx Mod X
    Odpowiedzi: 5
    Ostatni post / autor: 30-03-2008, 00:39

Odwiedzający poszukiwali:

problem hud amxx.pl

Uprawnienia umieszczania postów

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •