Crashing... Help?

Posts 1–15 of 35 · Page 1 of 3
Crashing... Help?
Hey guys, I just had a quick question on whats wrong with my code? It crashes every time i try to join a second game. I've added the inGame function, and checked it on all of my hack codes. ( this is just the inGame() function, and the hacks. (if you need more... tell me.))
Code:
bool inGame()
{
	if(*(int*)GameStatus == 1) {
		return true;
	}else {
		return false;
}
}
Code:
if (inGame()) { if(Cross == 1){CrossHair(pDevice, Red); }}
if (inGame()) { if(Cross == 2){CrossHair(pDevice, Green); }}
if (inGame()) { if(Cross == 3){CrossHair(pDevice, Orange);}}
if (inGame()) { if(Cross == 4){CrossHair(pDevice, Blue);}}
if (inGame()) { if(Cross == 5){CrossHair(pDevice, Yellow);}}
if (inGame()) { if(Cross == 6){CrossHair(pDevice, Black);}}
if (inGame()) { if(Cross == 7){CrossHair(pDevice, Grey);}}
if (inGame()) { if(Cross == 8){CrossHair(pDevice, Gold);}}
if (inGame()) { if(Cross == 9){CrossHair(pDevice, Pink);}}
if (inGame()) { if(Cross == 10){CrossHair(pDevice, Purple);}}
if (inGame()) { if(Cross == 11){CrossHair(pDevice, White);}}
if (inGame()) { if(Cross == 12){CrossHair(pDevice, Cyan);}}
if (inGame()) { if(Cross == 13){CrossHair(pDevice, Magenta);}}

if (inGame()) { 
 if(hack1){
		memcpy( (PBYTE)SuperBullet, (PBYTE)"\x90\x90\x90", 3); // this is a memory hack.
    }else{
		memcpy( (PBYTE)SuperBullet, (PBYTE)"\x0F\x94\xC0", 3); // get the off byted by ollydbging the addie.
	}
}

if (inGame()) { 
 if(hack2) {
	memcpy( (PBYTE)WeaponRange1, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
    memcpy( (PBYTE)WeaponRange2, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
        }else{
    memcpy( (PBYTE)WeaponRange1, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 ); 
    memcpy( (PBYTE)WeaponRange2, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 );
 }
 }

if (inGame()) { 
 if(hack3) {
	 memcpy( (PBYTE)NoRecoil1, (PBYTE)"\x90\x90\x90", 3);
	 memcpy( (PBYTE)NoRecoil2, (PBYTE)"\x90\x90\x90", 3);
	 memcpy( (PBYTE)NoRecoil3, (PBYTE)"\x90\x90\x90", 3);
	 memcpy( (PBYTE)NoRecoil4, (PBYTE)"\x90\x90\x90", 3);
	 memcpy( (PBYTE)NoRecoil5, (PBYTE)"\x90\x90\x90", 3);
        }else{
    memcpy( (PBYTE)NoRecoil1, (PBYTE)"\xD8\x66\x58", 3);
	memcpy( (PBYTE)NoRecoil2, (PBYTE)"\xD9\x46\x54", 3);
	memcpy( (PBYTE)NoRecoil3, (PBYTE)"\xD9\x5E\x58", 3);
	memcpy( (PBYTE)NoRecoil4, (PBYTE)"\xD9\x46\x4C", 3);
	memcpy( (PBYTE)NoRecoil5, (PBYTE)"\xD9\x5E\x4C", 3);
 }
 }

 if (inGame()) {
 if(hack4) {
	push("SkelModelStencil -1" );
 }else {
	push("SkelModelStencil 0" );
 }
 }

 if (inGame()) { 
 if(hack5) {
push("BaseMoveAccel 2000.000000");
push("StartAccel 2000.000000");
push("MaxAccel 2000.000000");
push("AccelInc 2000.000000");
push("WalkVel 2000.000000");
push("FRunVel 2000.000000");
push("BRunVel 2000.000000");
push("SRunVel 2000.000000");
push("JumpVel 2000.000000");
push("DuckVel 2000.000000");
 }else {
push("WalkVel 70.000000");
push("FRunVel 285.000000");
push("BRunVel 285.000000");
push("SRunVel 285.000000");
push("DuckVel 50.000000");
 }
 }

 if (inGame()) { 
 if(hack6 == 1) {
	 push("JumpVel 430.000000" );
 }else {
	 push("JumpVel 330.000000" );
 }
 }

 if (inGame()) { 
if(hack6 == 2) {
	 push("JumpVel 630.000000" );
 }else {
	 push("JumpVel 330.000000" );
 }
}

 if (inGame()) { 
 if(hack7) {
	 push("FogEnable 0" );
 }else {
	 push("FogEnable 1" );
 }
 }

 if (inGame()) { 
 if(hack8) {
	 push("FullBright 1" );
 }else {
	 push("FullBright 0" );
 }
 }

 if (inGame()) { 
 if(hack9){
	push("PerturbRotationEffect 0.000000");
    push("PerturbIncreaseSpeed 0.000000");
    push("PerturbWalkPercent 0.000000");
    push("PerturbFiringIncreaseSpeed 0.000000");
    push("PerturbRecoil 0.000000");
    push("FireMovePerturb 0.000000");
    push("ZoomedFireMoveDuckPerturb 0.000000");
    push("ZoomedFireMovePerturb 0.000000");
    push("ZoomedFireDuckPerturb 0.000000");
}else{
	push("PerturbRotationEffect 3.000000");
    push("PerturbIncreaseSpeed 3.000000");
    push("PerturbDecreaseSpeed 9.000000");
    push("PerturbWalkPercent 0.500000");
    push("PerturbRecoil 9.000000");
    push("FireMovePerturb 9.000000");
    push("ZoomedFireMoveDuckPerturb 9.000000");
    push("ZoomedFireMovePerturb 9.000000");
    push("ZoomedFireDuckPerturb 9.000000");
}
 }

 if (inGame()) { 
if(hack10) {
	push("WireframeModels 1" );
}else {
	push("WireframeModels 0" );
}
}

 if (inGame()) { 
if(hack11) {
	push("ShowFirePath 1" );;
}else {
	push("ShowFirePath 0" );
}
}

 if (inGame()) { 
if(hack12){
    push("ScreenGlowEnable 1");
    } else {
    push("ScreenGlowEnable 0");
    }
}

 if (inGame()) { 
if(hack13) {
	memcpy( (PBYTE)NameTags1, (PBYTE)"\x90\x90", 2);
	memcpy( (PBYTE)NameTags2, (PBYTE)"\x90\x90", 2);
}else {
	memcpy( (PBYTE)NameTags1, (PBYTE)"\x75\x05", 2);
	memcpy( (PBYTE)NameTags2, (PBYTE)"\x75\x05", 2);
}
}

if (inGame()) {
if(hack14) {
			push("ActivationDistance 99999" );
		}else {
			push("ActivationDistance 9" );
}
}

if (inGame()) { 
if(hack15) {
		if (GetAsyncKeyState(VK_MBUTTON)<0) {
			memcpy( (PBYTE)RapidFire, (PBYTE)"\x90\x90", 2);
		}else{
			memcpy( (PBYTE)RapidFire, (PBYTE)"\x74\x3E", 2);
		}
	}
}

if (inGame()) { 
if(hack16) {
	if( GetAsyncKeyState( VK_SPACE ) < 0 ) {
			push( "PlayerGravity 800" );
		}else{
			push( "PlayerGravity -800" );
	}
}
}

if (inGame()) { 
if(hack17) { // if hack 17 is on
	push("DrawParticles 0"); //Using the ptc method, push the ptc hack into the game
}else { // if it's not on
	push("DrawParticles 1"); //turn it off
} // close hack
}
Any ideas? and, thanks for your time.
Yeah I am having a similar problem, when I was testing the hack I went into the first game went smooth and then the next game CA crashed for me... I think it might be because the hacks are on and i dont want members to face the problem of turning on and off the hack each time? So any suggestions ??? anybody ?? please help !
I have the exact same problem as you.

I've tried asking a lot of other coders, no one knows why it's happening.
Quote Originally Posted by Flengo View Post
I have the exact same problem as you.

I've tried asking a lot of other coders, no one knows why it's happening.
hmm... well fuck. I don't want to release my hack if the user has to manually turn off everything before they join their next game...
Someone guessed it may be the memcpy?...
Quote Originally Posted by cubanelite View Post
hmm... well fuck. I don't want to release my hack if the user has to manually turn off everything before they join their next game...
Someone guessed it may be the memcpy?...
That's what I thought.

Tried 3 different methods, one by Jason. Still the same result.
Quote Originally Posted by Flengo View Post
I have the exact same problem as you.

I've tried asking a lot of other coders, no one knows why it's happening.
People do know, you just asked the wrong people.
Quote Originally Posted by Shadow` View Post
People do know, you just asked the wrong people.
I've asked Matypatty, flameswor10, Topblast, another VIP Coder I know, posted on forums. No answers have worked.

I'm pretty sure you don't have an answer for me.
Quote Originally Posted by Flengo View Post


I've asked Matypatty, flameswor10, Topblast, another VIP Coder I know, posted on forums. No answers have worked.

I'm pretty sure you don't have an answer for me.
Lol, me and ussr's hack doesn't have this problem, which concludes we do have the solution.
Quote Originally Posted by Shadow` View Post
Lol, me and ussr's hack doesn't have this problem, which concludes we do have the solution.
would you mind helping us out then? Rather than bragging my good sir? I would really appreciate it, Thanks.


Quote Originally Posted by TokolocoSK View Post
the bytes of Name Tags changed (I think)...
That wouldn't make it crash when you join the next game. that would make it crash when you turned it on.
Quote Originally Posted by cubanelite View Post
would you mind helping us out then? Rather than bragging my good sir? I would really appreciate it, Thanks.



That wouldn't make it crash when you join the next game. that would make it crash when you turned it on.
I'm pretty sure he was talking about the "off" bytes. Here's a hint, make some bools and have toggle switches, along with bools checking if the hack is out of the game but the hacks are still on.
Quote Originally Posted by Shadow` View Post
I'm pretty sure he was talking about the "off" bytes. Here's a hint, make some bools and have toggle switches, along with bools checking if the hack is out of the game but the hacks are still on.
they turn off fine. and, it sounds like to me that you're just describing the inGame function... which i already have...
do you crash when ending a game, or when joining a new one? this has never happened to me before... maybe I need to recode my inGame function?... Somehow?... xD
Quote Originally Posted by cubanelite View Post
do you crash when ending a game, or when joining a new one? this has never happened to me before... maybe I need to recode my inGame function?... Somehow?... xD
Its not the ingame function since it works fine for one game.
It crashes as soon as I press the start button for the second game.
the bytes of Name Tags changed (I think)...
It is to do with how you toggle the hacks, i do have the solution but commando dissed me in another thread. So... :/
Posts 1–15 of 35 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us