Posted: Thu Dec 23, 2021 4:55 am Post subject: Problem developing an aimbot by auto assemble
Hi, I've been trying to develop an aimbot in Left 4 Dead 2, I used friends bots on the team as a test, because it was easier to test like this than on enemies, so I finally managed to complete the aimbot logic, but a problem came up that I can't solve at the time. The problem is that the label that stores the value of the X,Y,Z position of friendly bots does not distinguish which would be the bot with the closest position to my player, so that the position stored in the label would be in accordance with the smallest distance between the nearest bot and my player. Basically, before the value is stored in the label, it would have to pass a test, to see if it is the closest bot to my player. Well that's it, if you have another alternative for my problem, please let me know, thank you.
Use Pythagoras's theorem to find the distance between two points in the world. If the distance is less than what you have stored now, then overwrite it.
You'll also need to remove the closest target when it dies (maybe another code injection, maybe a flag in a structure saying a target died) _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum