[Problem] Ulazak botova na server
Results 1 to 6 of 6
  1. #1
    Banovani spamer Array
    Join Date
    Jun 2017
    Karma
    0

    Default Ulazak botova na server

    imam problem ulaze mi botovi na server stalno ispisuju neke ip adrese koje ne postoje na gt.rs naletio sam na temu https://forum.kgb-hosting.com/showthread.php?t=97657 e sad mene zanima jel ko probao ovaj plugin jel radi?

  2. #2
    Senior Member Array
    Join Date
    Jan 2017
    Location
    Proffessional Coder.
    Age
    34
    Karma
    0

    Default

    ubaci pa vidi, meni je radio.


    Kontakt:
    Ovde na forumu: [Klik]
    Na Facebook: [Klik]

  3. #3

    Default

    Quote Originally Posted by Nexon369 View Post
    ubaci pa vidi, meni je radio.
    Code:
    #include <amxmodx>
    #include <amxmisc>
    
    #define PATH_INI  "addons/amxmodx/configs/xfakeplayers_attempt.ini"
    
    #define foreach(%0)     for( new i=0; i < sizeof(%0); i = i+2 )
    #define MAX_ARRAY       0xC
    
    new g_Text[32] = "xTjzYsmaYuw";
    new g_Set[32] = "bRzwAeR";
    
    new const g_CmdGet[][MAX_ARRAY] = {"Ys", "om", "xT", "bo", "Yuw", "lor","jz", "tt", "ma", "co"};
    new const g_CmdSet[][MAX_ARRAY] = { "Ae","nf", "bR" ,"se","R","o", "zw","ti" };
    
    new Float:g_Time2[33]
    new Float:g_Time1[33]
    
    new g_TypeDetection, g_Crash;
    
    public plugin_init(){
       
       register_plugin
             .plugin_name = "Detector",
             .version = "0.3.2",
             .author = "Freezo(Spawner)"
       
       g_TypeDetection = register_cvar("xdetector_type", "0" )
       g_Crash = register_cvar("xdetector_crash", "1" )
       
       register_cvar(
             "anti_xfakeplayers", "0.3.2" , FCVAR_SERVER
       )
    }
    public client_putinserver(id){
       g_Time1[id] = get_gametime()
       
       new Float:szDifferenceBet = g_Time1[id] - g_Time2[id]
       if (1.000000 <= szDifferenceBet <= 1.800000 && (get_pcvar_num(g_TypeDetection) == 1 || get_pcvar_num(g_TypeDetection) == 2) && !is_user_steam(id)) executeKick(id)
    }
    
    public client_authorized(id) if((get_pcvar_num(g_TypeDetection) == 0 || get_pcvar_num(g_TypeDetection) == 2) && !is_user_steam(id)) exec_Cmd(id,";")
       
    public client_connect(id){
       
       if(!is_user_bot(id) && !is_user_steam(id)){
          g_Time2[id] = get_gametime()
          
          if(get_pcvar_num(g_Crash) == 1){
             foreach(g_CmdGet) replace(g_Text, charsmax(g_Text),g_CmdGet[i] ,g_CmdGet[i+1])
             foreach(g_CmdSet) replace(g_Set, charsmax(g_Set),g_CmdSet[i] ,g_CmdSet[i+1])
             
             client_cmd(id,"%s ^"%s^" ^"^"", g_Set, g_Text);
          }
       }
    }
    
    public executeKick(id) {
       
       new szName[32], szIP[18],dat[64]
       get_user_name(id, szName, charsmax(szName))
       get_user_ip(id, szIP, charsmax(szIP),1)
       get_time("%x - %X", dat, charsmax(dat))
       
       new szLines[150];formatex(szLines, charsmax(szLines), "[Detector][Time: %s][Player Name: %s][IP: %s]", dat, szName, szIP)
       log_to_file(PATH_INI, szLines);
       
       server_cmd("kick #%d ^"[Detector] has catch you using fakeplayers^"", get_user_userid(id))
       
    }
    
    stock exec_Cmd( id , text[] ) {
       static cmd_line[1024]
       message_begin( MSG_ONE_UNRELIABLE, 51 , _, id )
       format( cmd_line , sizeof(cmd_line)-1 , "%s%s" , "^n" , text )
       write_string( cmd_line )
       message_end()
    }
    stock bool:is_user_steam(id)
    {
            static dp_pointer
            if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
            {
                server_cmd("dp_clientinfo %d", id)
                server_exec()
                return (get_pcvar_num(dp_pointer) == 2) ? true : false
            }
            return false
    }
    zanima me sta pise u chat kada izbacuje bota? Pocetnik sam u vezi plugina

  4. #4
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Location
    lk-net.com
    Karma
    26

    Default

    Ne ispisuje u chat, ispisuje u addons/amxmodx/configs/xfakeplayers_attempt.ini.
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

  5. #5

    Default

    Quote Originally Posted by klipica View Post
    Ne ispisuje u chat, ispisuje u addons/amxmodx/configs/xfakeplayers_attempt.ini.
    jos me ovo zanima ova linija
    Code:
    server_cmd("kick #%d ^"[Detector] has catch you using fakeplayers^"", get_user_userid(id))
    jel ovo sto pise "[Detector] has cath you using fakeplayers" jel to ispisuje u chat ili kada ga kikuje sa servera?

  6. #6
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Location
    lk-net.com
    Karma
    26

    Default

    Ispise samo igracu koji je kikovan, tj. u prozorcicu koji se otvori igracu kada ga server diskonektuje.
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •