CSS Aimbot

Posts 1–15 of 24 · Page 1 of 2
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
Quote Originally Posted by lilneo View Post
Okay so hook hudupdate, I got that part. But how am I calling it from there? Explain a bit
~lilneo
When you hook the function, you're basically making it call your function instead of the real one. Inside your function, call whatever HD said to call.
So replace HudUpdate with my call to GetAbsOrigin?

Edit: Like the actual virtual function?

~lilneo
Quote Originally Posted by lilneo View Post
So replace HudUpdate with my call to GetAbsOrigin?

Edit: Like the actual virtual function?

~lilneo
No, from what I understand, HD is telling you to hook HudUpdate, and inside your hooked function, call GetAbsOrigin.

[php]
void HudUpdate_hook(params...)
{
GetAbsOrigin();

return HudUpdate_real(params...);
}
[/php]
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
Quote Originally Posted by lilneo View Post
By patching the table you mean what?
~lilneo
Table pointer - (DWORD*)0xDEADBEEF

[0] func 1
[1] func 2
[2] func 3
[3] HudUpdate

[php]*(0xDEADBEEF+3) = &your_func;[/php]
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.
It's suddenly working! o.o
I didn't change anything, and now when I put GetAbsOrigin in a while loop no crash... Anyway, now I have an issue, the enemy position is obtainable. But in order to use my bone location finding function, I need the index of the headbone. So I use
Code:
EnemyBones->LookupBone("ValveBiped.Bip01_Head1");
Now this is completely correct, EnemyBones is casted over from my C_BaseEntity*, and I can use GetAbsOrigin with that. So all is good, except when I compile... I get a Linker Error, unresolved external D=
I took out all includes that were not mandatory and checked for double includes etc... But I just can't make it work, what the fuck? What's wrong?

Another problem I am having is testing if a Bot is dead or not, I am using IsAlive, but it's not working.

~lilneo
Make sure you aren't declaring any functions without having the body of the function. \:
Posts 1–15 of 24 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us