This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! How to exclude yourself from drawing ESP

libModz

Awesome Active Platinian
Jun 2, 2022
171
30
28
UK
I could be wrong but I'd imagine it would be something like this...

C++:
bool (*get_isLocalPlayer)(void *instance);


void (*old_ESP_Update)(void *instance);
void ESP_Update(void *instance) {
    if(instance!=NULL) {
        bool isLocal = get_isLocalPlayer(instance);
        if(ESP) {
            if(!isLocal) {
                // Your esp code here
            }
         }
    }
    old_ESP_Update(instance);
}



// Under hackthread...


get_isLocalPlayer = (bool(*)(void*)) getAbsoluteAddress(targetLibName, 0xOFFSET);
 

libModz

Awesome Active Platinian
Jun 2, 2022
171
30
28
UK
Try it like this...

C++:
bool (*get_isLocalPlayer)(void *instance);

void (*old_player_update)(void *player);
void new_player_update(void *player) {
    if(player != NULL) {
        bool isLocal = get_isLocalPlayer(player);
        if(!isLocal) {
            // Your ESP code
 

Tosilegit

Platinian
Feb 1, 2022
10
1
3
Perttilä
To add to what libModz suggested earlier, I think this hook should work for you:
C++:
bool (*get_isLocalPlayer)(void *instance) = (bool (*)(void *))getRealOffset(0x000000); //place the offset

void (*old_player_update)(void *player);
void new_player_update(void *player) {
    if(player != NULL) {
        bool isLocal = get_isLocalPlayer(player);
        if(!isLocal) {
            // Your ESP code
It uses the same getRealOffset function as your hooks. Also make sure that "player" in your update function is the correct instance for the "get_isLocalPlayer" or other bools you use for the check.
 

AlexZero

Platinian
Original poster
Jun 17, 2019
22
3
3
Poland
 

Tosilegit

Platinian
Feb 1, 2022
10
1
3
Perttilä
Delete this
C++:
bool (*get_isLocalPlayer)(void *instance);
from on top of the update function. It is not needed

And replace it with the hook
C++:
bool (*get_isLocalPlayer)(void *instance) = (bool (*)(void *))getRealOffset(0x2231668);
Right now the hook seems to be inside of some other setup function. Just move it on top of the update function as I tell you above.
 

AlexZero

Platinian
Original poster
Jun 17, 2019
22
3
3
Poland
I did as you wrote, but I get a crash in game after load match(probably the moment when esp wants to draw) and the offset is not lit up green, it seems to me that the bool should be there, but when I put it there I get this error
 

Tosilegit

Platinian
Feb 1, 2022
10
1
3
Perttilä
That error happens because the get_isLocalPlayer hook is under the update function and not over it. Presumably because you have it in the setup function.

So does the crash happen when you put the hook on top of the update function? If so, maybe try some other bool.
Right now the hook seems to be inside of some other setup function. Just move it on top of the update function as I tell you above.
This should work, but it's possible that it doesn't work like that on your project on iOS.
 

Francois284Modz

Awesome Active Platinian
Jun 10, 2018
188
2,442
193
26
france
What are you using for your player list ?
If is the esp manager that mean you used a update function . And inside that class does it have fields or a function that is mine or islocal
 

AlexZero

Platinian
Original poster
Jun 17, 2019
22
3
3
Poland
What are you using for your player list ?
If is the esp manager that mean you used a update function . And inside that class does it have fields or a function that is mine or islocal
well, there is no ismine islocal or something similar in this class , I use LateUpdate to draw esp.
 

AlexZero

Platinian
Original poster
Jun 17, 2019
22
3
3
Poland
What are you using for your player list ?
If is the esp manager that mean you used a update function . And inside that class does it have fields or a function that is mine or islocal


I found another class that also draws esp on players (there is a small problem but it draws fine) and there is a field public bool AsMe; // 0x189. Will this also work?
 

Francois284Modz

Awesome Active Platinian
Jun 10, 2018
188
2,442
193
26
france
I found another class that also draws esp on players (there is a small problem but it draws fine) and there is a field public bool AsMe; // 0x189. Will this also work? View attachment 620556
Try that with

bool Asme(void *player) {
return *(bool *) ((uintptr_t) player + 0x189);
}

Before your esp draw function and

If(!Asme(player))
// Draw esp line