CSS Aimbot
Hai can I haz css aimbot sauce code pleez?
...
...
...
I joke, I joke.
Okay, so I am making a css aimbot and so far I have only run into a small bump, whenever I use the engine hook to call GetAbsPosition() on my entities, the game crashes. Er well, at least when I call it rapidly. If I call it a single time it's fine, now I hope you can see where the problem is. The aimbot needs to run smoothly and quickly, and obviously if I can only check positions every little while then there's gona be a problem. So does anyone know a method of finding positions through the engine hook that wont cause a deadlock and crash the game?
Note: If you're not sure, don't post suggestions. Hell_Demon knows the answer it's just he lives on the opposite side of the world from me, and trying to talk to each other via IM is a bit of a bitch.
~lilneo
Rebuild the EyePosition function , and then use it.
Hook HudUpdate from IBaseClientDll interface and call from there(replace the vtable pointer)
Reason you're crashing when calling it alot is due to race conditions.
Okay so hook hudupdate, I got that part. But how am I calling it from there? Explain a bit
~lilneo
So replace HudUpdate with my call to GetAbsOrigin?
Edit: Like the actual virtual function?
~lilneo
But the problem is HudUpdate is only a virtual function... How do I actually hook it? Do I need to use detours, because I've never done anything with detours :\
~lilneo
You can either use detours or patch the table.
By patching the table you mean what?
~lilneo
Okay but the function gets used every frame... If I patch it then it wont do what it's supposed to.
Or would my function return the original function?
~lilneo
Before patching the table, you save the address of the original function so you can call it later in your hooked function.
Make sure you aren't declaring any functions without having the body of the function. \: