GS anti Flood

Results 1 to 7 of 7
  1. #1
    Registered brazil20 is offline
    MemberRank
    May 2020 Join Date
    23Posts

    GS anti Flood

    GS anti Flood
    hello anyone can give me GS with anti flood?? im using louis files or Give me the Script thank you


  2. #2
    Ultimate Member pointback is offline
    MemberRank
    Jun 2018 Join Date
    180Posts

    Re: GS anti Flood

    GameServer.ccp

    Code:
    //buscar
    LRESULT CALLBACK WndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam) // OK
    { 
            case WM_COMMAND:
                switch(LOWORD(wParam))
                {
    //en esta parte agregar esto de aquí
                    case IDM_IPMANAGER:
                        DialogBox(hInst,(LPCTSTR)IDD_BANNED,hWnd,(DLGPROC)IPBanned);
    break;
    //hasta quí
                    default:
    return DefWindowProc(hWnd,message,wParam,lParam);
                }
    }
    
    //agregar la función en gameserver.h
    std::map<std::string,IP_ADDRESS_INFO>::iterator it;
    std::map<std::string,IP_ADDRESS_INFO>::iterator buscador;
    LRESULT CALLBACK IPBanned(HWND hDlg,UINT message,WPARAM wParam,LPARAM lParam) // OK
    {
        switch(message)
        {
            case WM_INITDIALOG:
    
    
                hWndComboBox1 = GetDlgItem(hDlg, IDC_LIST2);
    
    if( !hWndComboBox1 )
                {
                    MessageBox(hDlg,
    "Could not create the combo box",
    "Failed Control Creation",
                               MB_OK);
    return FALSE;
                }
    
    
    
    for ( it = gIpManager.m_IpAddressInfo.begin(); it != gIpManager.m_IpAddressInfo.end(); it++ )
                {
    if(it->second.IpBlocked == 1){
                        char fulltext[16];
                        wsprintf(fulltext,"%s",it->second.IpAddress);
    intindex = SendMessage(hWndComboBox1, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>((LPCTSTR)fulltext));
                        SendMessage(hWndComboBox1, LB_SETITEMDATA, (WPARAM) index, (LPARAM) it->second.IpAddress);
                    }
                }
    
    return1;
            case WM_COMMAND:
    if(LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
                {
                    EndDialog(hDlg,LOWORD(wParam));
    return1;
                }
    elseif(LOWORD(wParam) == IDC_DISBAND)
                {    
    int itemIndex = (int) SendMessage(hWndComboBox1, LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
    
    if (itemIndex == LB_ERR)
                    {
    return0;
                    }
                    // Getdata
                    char* s = (char*) SendMessage(hWndComboBox1, LB_GETITEMDATA, itemIndex, 0);
    
    
    for ( buscador = gIpManager.m_IpAddressInfo.begin(); buscador != gIpManager.m_IpAddressInfo.end(); buscador++ )
                    {
    if(buscador->second.IpAddress == s){
    
                            buscador->second.IpBlocked = 0;
    
                            char fulltext[16];
                            wsprintf(fulltext,"%s",buscador->second.IpAddress);
                            MessageBox(hDlg, fulltext, "Confirm", MB_OK);
                        }
                    }
                }
    
    break;
        }
    
    return0;
    }

    create a dialog with the following
    identifier for the Dialog: IDD_BANNED
    Identifier for the Listbox : IDC_LIST2
    Identifier for the Button: IDC_DISBAND

    [IMG][/IMG]

  3. #3
    Registered brazil20 is offline
    MemberRank
    May 2020 Join Date
    23Posts

    Re: GS anti Flood

    Quote Originally Posted by pointback View Post
    GameServer.ccp

    Code:
    //buscar
    LRESULT CALLBACK WndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam) // OK
    { 
            case WM_COMMAND:
                switch(LOWORD(wParam))
                {
    //en esta parte agregar esto de aquí
                    case IDM_IPMANAGER:
                        DialogBox(hInst,(LPCTSTR)IDD_BANNED,hWnd,(DLGPROC)IPBanned);
    break;
    //hasta quí
                    default:
    return DefWindowProc(hWnd,message,wParam,lParam);
                }
    }
    
    //agregar la función en gameserver.h
    std::map<std::string,IP_ADDRESS_INFO>::iterator it;
    std::map<std::string,IP_ADDRESS_INFO>::iterator buscador;
    LRESULT CALLBACK IPBanned(HWND hDlg,UINT message,WPARAM wParam,LPARAM lParam) // OK
    {
        switch(message)
        {
            case WM_INITDIALOG:
    
    
                hWndComboBox1 = GetDlgItem(hDlg, IDC_LIST2);
    
    if( !hWndComboBox1 )
                {
                    MessageBox(hDlg,
    "Could not create the combo box",
    "Failed Control Creation",
                               MB_OK);
    return FALSE;
                }
    
    
    
    for ( it = gIpManager.m_IpAddressInfo.begin(); it != gIpManager.m_IpAddressInfo.end(); it++ )
                {
    if(it->second.IpBlocked == 1){
                        char fulltext[16];
                        wsprintf(fulltext,"%s",it->second.IpAddress);
    intindex = SendMessage(hWndComboBox1, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>((LPCTSTR)fulltext));
                        SendMessage(hWndComboBox1, LB_SETITEMDATA, (WPARAM) index, (LPARAM) it->second.IpAddress);
                    }
                }
    
    return1;
            case WM_COMMAND:
    if(LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
                {
                    EndDialog(hDlg,LOWORD(wParam));
    return1;
                }
    elseif(LOWORD(wParam) == IDC_DISBAND)
                {    
    int itemIndex = (int) SendMessage(hWndComboBox1, LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
    
    if (itemIndex == LB_ERR)
                    {
    return0;
                    }
                    // Getdata
                    char* s = (char*) SendMessage(hWndComboBox1, LB_GETITEMDATA, itemIndex, 0);
    
    
    for ( buscador = gIpManager.m_IpAddressInfo.begin(); buscador != gIpManager.m_IpAddressInfo.end(); buscador++ )
                    {
    if(buscador->second.IpAddress == s){
    
                            buscador->second.IpBlocked = 0;
    
                            char fulltext[16];
                            wsprintf(fulltext,"%s",buscador->second.IpAddress);
                            MessageBox(hDlg, fulltext, "Confirm", MB_OK);
                        }
                    }
                }
    
    break;
        }
    
    return0;
    }

    create a dialog with the following
    identifier for the Dialog: IDD_BANNED
    Identifier for the Listbox : IDC_LIST2
    Identifier for the Button: IDC_DISBAND

    [IMG][/IMG]

    thank you for reply sir but maybe this script is for Disband IP only?

    or can you give me GS with anti Flood? please?

  4. #4
    Ultimate Member pointback is offline
    MemberRank
    Jun 2018 Join Date
    180Posts

    Re: GS anti Flood


  5. #5
    Registered brazil20 is offline
    MemberRank
    May 2020 Join Date
    23Posts

    Re: GS anti Flood

    Good i like it on connect server maybe one more i need GS with anti Flood do you have sir? or give me the script
    There are no mistake, Only lesson. Growth is a process of trial and error.

  6. #6
    Ultimate Member pointback is offline
    MemberRank
    Jun 2018 Join Date
    180Posts

    Re: GS anti Flood

    Quote Originally Posted by brazil20 View Post
    Good i like it on connect server maybe one more i need GS with anti Flood do you have sir? or give me the script
    sorry but i only got in cs...

  7. #7
    Registered brazil20 is offline
    MemberRank
    May 2020 Join Date
    23Posts

    Re: GS anti Flood

    me i try sir?
    There are no mistake, Only lesson. Growth is a process of trial and error.



Advertisement