Why does this dont work?

Posts 1–11 of 11 · Page 1 of 1
Why does this dont work?
Code:
if(GetAsyncKeyState(VK_NUMPAD1) &1)
{
	if(dwPlayerPtr != 0)
	{
*(float*)(dwPlayerPtr + NoRecoil1) = 0;
*(float*)(dwPlayerPtr + NoRecoil2) = 0;
*(float*)(dwPlayerPtr + NoRecoil3) = 0;
*(float*)(dwPlayerPtr + NoSpread) = 0;
	}
}
But when I pres Numpad1, nothing happens...
Quote Originally Posted by skulhead View Post
Code:
if(GetAsyncKeyState(VK_NUMPAD1) &1)
{
	if(dwPlayerPtr != 0)
	{
*(float*)(dwPlayerPtr + NoRecoil1) = 0;
*(float*)(dwPlayerPtr + NoRecoil2) = 0;
*(float*)(dwPlayerPtr + NoRecoil3) = 0;
*(float*)(dwPlayerPtr + NoSpread) = 0;
	}
}
But when I pres Numpad1, nothing happens...
void NS_vs_NR()
{
DWORD dwPlayerPtr = *(DWORD*)Addr_Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+NoRecoil1) = 0;
*(float*)(dwPlayerPtr+NoRecoil2) = 0;
*(float*)(dwPlayerPtr+NoRecoil3) = 0;
*(float*)(dwPlayerPtr+NoSpread) = 0;
}
}
}
Its auto..
if you want hotkey try this one.

void NS_vs_NR()
{
if(GetAsyncKeyState(VK_NUMPAD1)&1) //Hotkey NUmpad7
{
DWORD dwPlayerPtr = *(DWORD*)Addr_Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+NoRecoil1) = 0;
*(float*)(dwPlayerPtr+NoRecoil2) = 0;
*(float*)(dwPlayerPtr+NoRecoil3) = 0;
*(float*)(dwPlayerPtr+NoSpread) = 0;
}
}
}
try it now..
It is the same...
Quote Originally Posted by skulhead View Post
It is the same...
no no..its not the same you didnt DWORD the Playerpointer.
watch your code and mine.
do you have new addies?
Quote Originally Posted by mihec161 View Post
do you have new addies?
Dont have..!
No, I did that above in my code...
No I want to learn it, nobody can explain?
@icebox346 Don't flame
@xflick13 code is wrong
NoSpread en NoRecoil will automaticcaly restore themselves, if you won't repeat changing them. That's why you gotta do it with a variable, like this:

int SpreadRecoil; // put this on top, under your #defines


//Ajax nospread code
DWORD dwPlayerPointer = *(DWORD*)ADR_PlayerPointer
if(dwPlayerPointer)
{
if(GetAsyncKeyState(VK_NUMPAD1))//Numpad 1 = on
{
SpreadRecoil = 1;
}
if(GetAsyncKeyState(VK_NUMPAD2))//Numpad 2 = off
{
SpreadRecoil = 0;
}


if(SpreadRecoil)
{
*(float*)(dwPlayerPointer+NoRecoil1) = 0;
*(float*)(dwPlayerPointer+NoRecoil2) = 0;
*(float*)(dwPlayerPointer+NoRecoil3) = 0;
*(float*)NoSpread = 0;
}
}
//End nospread code for Ajax


Enjoy it
Ty Dankjewel
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us