Hello everyone!
I'm trying to code a simple triggerbot. First of all I'm just trying to make a very simple one, my first one.
I've done the basics: got the process, client.dll module, got the localplayer, localteam, health. Looks fine so far. How ever I was having trouble finding a way to get the enemy where my player was pointing to using the CrossHairID, so I find this line of code from a couple of different source codes:
Code:
EnemyInCrossHair = ClientDLL + entityList + (PlayerInCrossHair - 1) * 0x10));
First I don't know exactly why it works this way, why does it have to be -1 and multiplied by 0x10?
And after a few hours trying to make this work I failed.
So I began to debug everything to find where it was failing, so here what happens:
It prints correctly the module, the localplayer, the localteam and localhealth.
HOWEVER I noticed that the "PlayerInCrossHair" value wasn't changing no matter what I was looking at in game. Always the same value, so what it could be? The offsets I thought, but I'm using the updated value from the dumper: 0xAA48.
Any ideas why it is not returning the actual value?
I am using this method to get the PlayerInCrossHair:
Code:
PlayerInCrossHair = ClientDLL + playerBase + crosshairOffset