ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1385

Help WITH THIS CODE

by EMILG0NZA - 09-14-2019 - 07:49 PM
#1
HOW I ADD AND WHERE I ADD THIS:

Code:
char* LabelHook(int r3, char* label) {

if (!strcmp(label, "LOADING_SPLAYER_L")) {
return "Loading The Menu OffLine";
}

return LabelStub(r3, label);
}
Its Just When I load The Game But Where
Reply
#2
(09-14-2019 - 07:49 PM)FeetForFree Wrote: HOW I ADD AND WHERE I ADD THIS:

Code:
char* LabelHook(int r3, char* label) {

if (!strcmp(label, "LOADING_SPLAYER_L")) {
return "Loading The Menu OffLine";
}

return LabelStub(r3, label);
}
Its Just When I load The Game But Where

to make it work you have to put it down.. patchinjump!

 but what is meant by LabelStub?? it's a drawText??
Reply
#3
(09-14-2019 - 09:10 PM)Cayman_-Modz Wrote:
(09-14-2019 - 07:49 PM)FeetForFree Wrote: HOW I ADD AND WHERE I ADD THIS:

Code:
char* LabelHook(int r3, char* label) {

if (!strcmp(label, "LOADING_SPLAYER_L")) {
return "Loading The Menu OffLine";
}

return LabelStub(r3, label);
}
Its Just When I load The Game But Where

to make it work you have to put it down.. patchinjump!

 but what is meant by LabelStub?? it's a drawText??

Wrong, you gotta use hookfunction but he’s also missing the stub aswell so wouldn’t work without the address nor without the stub
Reply
#4
(09-14-2019 - 07:49 PM)FeetForFree Wrote: HOW I ADD AND WHERE I ADD THIS:

Code:
char* LabelHook(int r3, char* label) {

if (!strcmp(label, "LOADING_SPLAYER_L")) {
return "Loading The Menu OffLine";
}

return LabelStub(r3, label);
}
Its Just When I load The Game But Where
just write to the loading string, why do people do it this way wtf
Reply
#5
(09-14-2019 - 09:10 PM)Cayman_-Modz Wrote:
(09-14-2019 - 07:49 PM)FeetForFree Wrote: HOW I ADD AND WHERE I ADD THIS:

Code:
char* LabelHook(int r3, char* label) {

if (!strcmp(label, "LOADING_SPLAYER_L")) {
return "Loading The Menu OffLine";
}

return LabelStub(r3, label);
}
Its Just When I load The Game But Where

to make it work you have to put it down.. patchinjump!

 but what is meant by LabelStub?? it's a drawText??
PathinJump What do you Mean?
Reply
#6
Code:
public:
    DWORD Addr;
    DWORD SaveStub;
    Detour() {};
    ~Detour() {};
    virtual void RegisterDetour(DWORD Address, PVOID Destination) {
        if (IsZero(&DetourAsmSection, sizeof(DetourAsmSection)))
            InitializeCriticalSection(&DetourAsmSection);
        EnterCriticalSection(&DetourAsmSection);
        DetourIndex = DetourAsmIndex;
        SaveStub = (DWORD)&DetourAsm[DetourIndex];
        // save the address incase we take-down the detour
        Addr = Address;
        // Copy the asm bytes before we replace it with the hook
        memcpy(OriginalAsm, (PVOID)Address, 0x10);
        // increment the index for the space we are using for the stub
        DetourAsmIndex += DetourFunctionStart(Address, SaveStub, Destination);
        LeaveCriticalSection(&DetourAsmSection);
    }
    virtual void StopDetour()
    {
        if (Addr && MmIsAddressValid((PVOID)Addr))
            memcpy((PVOID)Addr, OriginalAsm, 0x10);
    }
    virtual _ClassType CallDetour(...)
    {
        SetupCaller();
        return ((_ClassType(*)(...))SaveStub)();
    }
    virtual BYTE* ReturnOriginal(...)
    {
        return OriginalAsm;
    }
};

Detour<char*> LabelShite;

char* RegisterDetour(int id, char* label) {
    if (strstr(label, ("LOADING_MPLAYER_L")) != NULL)
        return "Loading The Engine Online!";
    if (strstr(label, "LOADING_SPLAYER_L") != NULL)
        return "Loading The Engine Offline!";
    return LabelShite.CallDetour(id, label);
}

LabelShite.SetupDetour(0x82EE30E8, RegisterDetour);
Reply
#7
easy to hook lol
Reply

Users browsing: 1 Guest(s)