Help! How to exclude yourself from drawing ESP

AlexZero

Platinian
How can I exclude myself from drawing esp, it looks like my esp draws for all entities, want to exclude myself, how can I do it? thanks
 

Attachments

  • photo_2024-03-27_18-40-59.jpg
    photo_2024-03-27_18-40-59.jpg
    58.3 KB · Views: 182
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);
 
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
 
i do that and i getting crash cuz i dont know how to hook that bool, i guess u android user, this how hooks look on ios :(
 

Attachments

  • Screenshot 2024-03-29 231618.png
    Screenshot 2024-03-29 231618.png
    133.6 KB · Views: 94
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.
 
I did but I get a crash, I don't know what I'm doing wrong,this is my code ,do i something wrong :pepe021: ?

Objective-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 code here
            [esp setNeedsDisplay];
            if(WorldToScreen(GetObjectLocation(player)).z == 0) {
                me->object = player;
                me->position = GetObjectLocation(me->object);
                me->fov = get_fieldOfView(get_main());
            }
            if(WorldToScreen(GetObjectLocation(player)).z != 0 && player != me->object) {
                playerr->object = player;
                playerr->position = GetObjectLocation(playerr->object);
                playerr->w2sposition = WorldToScreen(playerr->position);
            }
            playerr->object = player;
            playerr->position = GetObjectLocation(playerr->object);
            playerr->w2sposition = WorldToScreen(playerr->position);
            float EnemyHeight = 4200 / (playerr->w2sposition.z / 4) / (me->fov / 2);
            float EnemyWidth = 840 / (playerr->w2sposition.z / 4) / (me->fov / 4);
            float EnemyCoordX = playerr->w2sposition.x - EnemyWidth / 2;
            float EnemyCoordY = playerr->w2sposition.y - EnemyHeight;
            if ([switches isSwitchOn:NSSENCRYPT("Players Lines")]) {
                [esp addEnemyLine:(EnemyCoordX + EnemyWidth / 2) y:EnemyCoordY];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Boxes")]) {
                [esp addEnemyBox:EnemyCoordX y:EnemyCoordY w:EnemyWidth h:EnemyHeight];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Bounds")]) {
                [esp addEnemyBounds:EnemyCoordX y:EnemyCoordY w:EnemyWidth h:EnemyHeight];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Compass")]) {
                [esp addEnemyCompass:(EnemyCoordX + EnemyWidth / 2) y:EnemyCoordY];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Watermark")]) {
                [esp addEnemyWatermark:EnemyCoordX y:EnemyCoordY w:EnemyWidth h:EnemyHeight];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Distance")]) {
                [esp addEnemyDistance:EnemyCoordX y:EnemyCoordY w:EnemyWidth h:EnemyHeight];
            }
            if ([switches isSwitchOn:NSSENCRYPT("Players Lines Center")]) {
                [esp addEnemyCenterLine:(EnemyCoordX + EnemyWidth / 2) y:EnemyCoordY];
            }
        }
    }
    old_player_update(player);
}
void setup() {
    playerr = new player_t();
    me = new me_t();

bool (*get_isLocalPlayer)(void *instance) = (bool (*)(void *))getRealOffset(0x2231668);
 

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.
 
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.
 
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?
1712158766192.png
 
Back
Top Bottom