Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to Force a Client to be executed only by Autopatcher

Joined
Mar 29, 2019
Messages
1,032
Reaction score
1,190
Here's how you can make your client to be executed only through the autopatcher you choose

Note.

*Use only 1 option
*The location of locale_inc.h and UserInterface.cpp is from your client source

Option 1

Go to UserInterface.cpp and find

Code:
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
if (strstr(lpCmdLine, "--hackshield") != 0)
return 0;

Add after

Code:
if (strstr(lpCmdLine, "--whateveryouwantasargumenthere") == 0)
MessageBox(NULL, "Solo puedes ejecutar el juego desde Metin2_launcher.exe", "Metin2", MB_ICONSTOP);
return 0;

Option 2

Open Locale_inc.h

Add


Code:
#define ENABLE_ARGUMENT_STARTUP
#define ENABLE_ARGUMENT_POPUP
#define ARGUMENT_PATCHER_NAME "[B]Solo puedes ejecutar el juego desde Metin2_launcher.exe![/B]"
#define ARGUMENT_STARTUP "whateveryouwantasargumenthere"

*Change Solo puedes ejecutar el juego desde Metin2_launcher.exe, to your desired pop up message

Now go to UserInterface.cpp and find,

Code:
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
if (strstr(lpCmdLine, "--hackshield") != 0)
return 0;

Add after

Code:
#ifdef ENABLE_ARGUMENT_STARTUP
    if (strstr(lpCmdLine, ARGUMENT_STARTUP) == 0) {
#ifdef ENABLE_ARGUMENT_POPUP
        std::string msg = std::string("Error: ") + std::string(ARGUMENT_PATCHER_NAME);
        MessageBoxA(NULL, msg.c_str(), "Metin2", MB_OK);
#endif
#else
if (strstr(lpCmdLine, ARGUMENT_STARTUP) != 0) {
#endif
return 0;
}


What you get,

Archgeus - How to Force a Client to be executed only by Autopatcher - RaGEZONE Forums


If you dont have any autopatcher, a good one
 
Back
Top