View Full Version : Pls help with code!!!
can anyone tell me y this doesnt work, and yes, i defined all the timers in resource.h, and i get 0 compile errors, but it just dont work ingame
void Writelong(long addy, long value)
{
memory();
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &value, sizeof(value), NULL);
}
void WritePointerFloat(long addy, short offset, float value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
void CDesaDlg::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case TimerZI:
{
Writelong(0xAFB76A, 1);
}
break;
case TimerFt:
{
WritePointerFloat(0x1332A20, 288, 1120403456);
}
break;
case TimerNUp:
{
Writelong(0xAFB7B8, 0);
}
break;
case TimerNSide:
{
Writelong(0xAFB7BC, 0);
}
break;
case TimerNFall:
{
WritePointerFloat(0x1332A20, 260, -2000);
}
break;
}
CDialog::OnTimer(nIDEvent);
}
void CDesaDlg::OnZIOn()
{
SetTimer(TimerZI, 1, NULL);
}
void CDesaDlg::OnZIOff()
{
KillTimer(TimerZI);
}
void CDesaDlg::OnFtOn()
{
SetTimer(TimerFt, 1, NULL);
}
void CDesaDlg::OnFtOff()
{
KillTimer(TimerFt);
}
void CDesaDlg::OnNUpOn()
{
SetTimer(TimerNUp, 1, NULL);
}
void CDesaDlg::OnNUpOff()
{
KillTimer(TimerNUp);
}
void CDesaDlg::OnNSideOn()
{
SetTimer(TimerNSide, 1, NULL);
}
void CDesaDlg::OnNSideOff()
{
KillTimer(TimerNSide);
}
void CDesaDlg::OnNFallOn()
{
SetTimer(TimerNFall, 1, NULL);
}
void CDesaDlg::OnNFallOff()
{
KillTimer(TimerNFall);
}
virus7799
02-07-2008, 08:25 PM
can anyone tell me y this doesnt work, and yes, i defined all the timers in resource.h, and i get 0 compile errors, but it just dont work ingame
void Writelong(long addy, long value)
{
memory();
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &value, sizeof(value), NULL);
}
void WritePointerFloat(long addy, short offset, float value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
void CDesaDlg::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case TimerZI:
{
Writelong(0xAFB76A, 1);
}
break;
case TimerFt:
{
WritePointerFloat(0x1332A20, 288, 1120403456);
}
break;
case TimerNUp:
{
Writelong(0xAFB7B8, 0);
}
break;
case TimerNSide:
{
Writelong(0xAFB7BC, 0);
}
break;
case TimerNFall:
{
WritePointerFloat(0x1332A20, 260, -2000);
}
break;
}
CDialog::OnTimer(nIDEvent);
}
void CDesaDlg::OnZIOn()
{
SetTimer(TimerZI, 1, NULL);
}
void CDesaDlg::OnZIOff()
{
KillTimer(TimerZI);
}
void CDesaDlg::OnFtOn()
{
SetTimer(TimerFt, 1, NULL);
}
void CDesaDlg::OnFtOff()
{
KillTimer(TimerFt);
}
void CDesaDlg::OnNUpOn()
{
SetTimer(TimerNUp, 1, NULL);
}
void CDesaDlg::OnNUpOff()
{
KillTimer(TimerNUp);
}
void CDesaDlg::OnNSideOn()
{
SetTimer(TimerNSide, 1, NULL);
}
void CDesaDlg::OnNSideOff()
{
KillTimer(TimerNSide);
}
void CDesaDlg::OnNFallOn()
{
SetTimer(TimerNFall, 1, NULL);
}
void CDesaDlg::OnNFallOff()
{
KillTimer(TimerNFall);
}
Did you define the timers in Resource.h?
lol u must have not read the whole thing, as i said in first post, yes i defined them
virus7799
02-07-2008, 08:51 PM
lol u must have not read the whole thing, as i said in first post, yes i defined them
Lol shit sorry didn't read it >.>. Well first of all define your timers as:FIRSTTIMER, SECONDTIMER, THIRDTIMER etc. to make it easier. I'm confused just by looking at that. Tell me what their functions are and make sure all addies are correct. If you get problems tell me and I'll fix them.
i just shortened everything, and tried not to be obvious, i dunno if it helps make undetected or not, but that y i named um like that, heres wut they mean
ZI=zoom in
Ft=fast (stamina)
NUp=no up/down(recoil)
NSide=no spread
NFall=no fall damage
and it just dont work at all, zoom will zoom in, but not out, and that all it will do, nothing else works
sailerboy
02-08-2008, 09:25 AM
you don't need a timer for scope
virus7799
02-08-2008, 11:19 AM
First of all, like the guy above me said, scope doesn't use a timer. Simply put it in a button like this:
For On:
void CDesaDlg::OnScopeOn()
{
Writelong(0xAFB76A, 1);
}
And Off:
void CDesaDlg::OnScopeOff()
{
Writelong(0xAFB76A, 0);
}
Secondly, stamina doesn't use a WritePointerFloat function, it uses a WritePointerLong.
void WritePointerLong(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
I'll see what's wrong with no recoil/spread and NFD later.
Thanks a lot, I'm very thankful that your helping me.
ganglyman21
02-08-2008, 11:29 AM
I can do those now virus. Again NFD uses WritePointerLong function. Mine working 100% on that. Then for no recoil, plain and simple doesn't work. No spread should be fine either set to 0 or 1 either way working for me.
ok i got no/spread and no recoil working, but nfd and satm still are not, pm me if u would be willing to take a look at my source and see wut wrong, i changed to nfd and stam to writepointerlong, but they still no worky....
virus7799
02-08-2008, 04:28 PM
ok i got no/spread and no recoil working, but nfd and satm still are not, pm me if u would be willing to take a look at my source and see wut wrong, i changed to nfd and stam to writepointerlong, but they still no worky....
For Stamina this is how I got mine to work:
First you have to declare your function:
void WritePointerLong(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
Under this put:
void CDesaDlg::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case FIRSTTIMER:
{
WritePointerLong(0x1332A20, 0x288, 1120403456);
}
break;
}
CDialog::OnTimer(nIDEvent);
}
And an On and Off button, This one's On, make an Off button yourself .
void CVirusHackDlg::OnStaminaOn()
{
SetTimer(FIRSTTIMER, 1, NULL);
}
Stamina and NFD combined looks like this:
void CDesaDlg::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case FIRSTTIMER:
{
WritePointerLong(0x1332A20, 0x288, 1120403456);
}
break;
case SECONDTIMER:
{
WritePointerFloat(0x1332A20, 0x260, -9999);
}
break;
}
CDialog::OnTimer(nIDEvent);
void CDesaDlg::OnStaminaOn()
{
SetTimer(FIRSTTIMER, 1, NULL);
}
void CDesaDlg::OnNFDOn()
{
SetTimer(SECONDTIMER, 1, NULL);
}
Again, make an off button for this and it should work. If it doesn't we'll look more into it.
works perfect, thanks a ton
virus7799
02-08-2008, 06:04 PM
works perfect, thanks a ton
Np man, Glad to help :D.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.