ExclamationCombat Arms hack question

Posts 1–15 of 26 · Page 1 of 2
Combat Arms hack question
Hi everyone

First of all I hope this isn't double posting, because I posted the same question somewhere else before but didn't get any replies let alone an answer to my question
I admit that I didn't wait very long ( 1.5 days) before posting this the reason for that is that I'm stuck in the process of making my hack and I really, really, really want to move on

So here it goes:

I have an addy which I want to use for testing and developing further hacks
0x377502E8 << Credits go to: vingadormaster, for finding this addy (I think, at least he posted it first)
So now I Made a test dll, to see if it injects properly, which it did
then I made the part that changed the value:

Code:
#define ADR_KILLCAMCAEU 0x377502E8 
BOOL t = 0;
void patch(){
HANDLE ca = GetCurrentProcess(); 
if(GetAsyncKeyState(VK_INSERT)) {
	Sleep(500);
	  t = !t;
    int s = sizeof(t);
if( WriteProcessMemory(ca, (LPVOID*)(DWORD) ADR_KILLCAMCAEU ,(void*) t, s, NULL) == 0)
	Sleep(500);
}
I have tested this, and it stil inects properly but nothing happens, (this code should turn the killcam on or off on my computer)

What am I doing wrong? similar code worked on an other game with no protection or whatsoever so do I need a bypas or something like that or is my code just wrong?
if it is, can somone please show me my mistakes and point me in the right derection?

-SCHiM
Loop it *post too short*
With that method of implementing a hotkey, you have less than a second to press it.

Put it in a loop ^^

[php]
while(true)
{
if(GetAsyncKeyState(VK_INSERT))
{
//code
}
}
[/php]
You'd have to be holding the key while you inject and even then there'd be a chance it wouldnt trigger :P


void patch()
{
while(1)
{
...code here...
}
}
Thanks for the quick responses, I think it's a good thing I'm no rocket scientist
But I don't think it is working, the game freezes when I inject my DLL and it's probably the loop causing this...
could be that. try a while(1) loop
Ok, so now I have changed my code many times, did a lot of debug messages and was able to pinpoint why my game freezes:
The injector works by creating a remote thread (CreateRemoteThread)
I don't know why but it waits for my dll to end it's execution before closing the thread. But because of the while loop in my dll this won't happen of course other hacks do work with this injector
I have tried to return a value, my game (and my injector) would unfreeze but it would end the execution of my dll

So how can I solve this?
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)patch, 0, 0, 0); instead of patch(); in your DllMain
Quote Originally Posted by Hell_Demon View Post
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)patch, 0, 0, 0); instead of patch(); in your DllMain
What HD said. if you don't create a separate thread ur dll will never finish loading which will make it seem like the process froze.
Quote Originally Posted by Hell_Demon View Post
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)patch, 0, 0, 0); instead of patch(); in your DllMain
Superb! It works now, thank you!!
At least, the patch function works, but the outcome doesn't differ from when I first started this thread, the killcam isn't turned on or off, so if you guys are sure the code itself is right I can go searching for a way to make my hack actually work
Quote Originally Posted by schim View Post
Superb! It works now, thank you!!
At least, the patch function works, but the outcome doesn't differ from when I first started this thread, the killcam isn't turned on or off, so if you guys are sure the code itself is right I can go searching for a way to make my hack actually work
Grats on making your first hack. Or not ya know. Gratz on solving retarded problems microsoft could have solved for you
Are you pressing the button once killcam is running? I think it just sets the killcam timer to 0.
i think you should get the playerpointer and begin the loop when it is !=0.... maybe it won't freeze ur game

EDIT: i read all the post xD the problem was solved... anyway, maybe the addy need the offset, you don't have the pointer, only the addy i think...
@sixx93
yes this is only the addres, what should I add to it then?

@Hell_Demon
Even if that is the case there's still no imput, I have put the actual write part inside a loop to, so once activated it's writing 0 to the address continuously, but there's still nothing happening
post the code you're currently using ;P
Posts 1–15 of 26 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us