Source'den Files Lisanslama

SERCAN

Administrator
Katılım
6 Temmuz 2025
Mesajlar
8
Reaksiyon puanı
0
Puanları
1
Sourceden 'GameServerDlg.cpp' açın uygun bir alana aşağıdaki kodu ekleyip build ettikten sonra GameServer.exe niz lisanslı olacaktır.

C++:
 // License System Start

    bool IsValidLicense = false;
    std::string LicensedIPAddresses = "127.0.0.1";
    std::string ServerIPAddress = "0.0.0.0";

    foreach_stlmap_nolock (itr,m_ServerArray)
    {
        if (LicensedIPAddresses.find(itr->second->strServerIP) == std::string::npos)
            continue;

        ServerIPAddress = itr->second->strServerIP;
        IsValidLicense = true;
        break;
    }

    if (!IsValidLicense)
    {
        printf("ERROR:IP Address is not have a license.\n");
        return false;
    }
    // License System End
 
Geri
Üst