View Full Version : Scope
sailerboy
11-03-2007, 09:40 PM
How do you read a value from the memory and compare it to another value, such as
if (value==1) Writelong(0xAB7E22, 0);
LegendaryHacker
11-04-2007, 04:18 AM
For reading long:
You have the ReadLong function ?
if no,
void ReadLong(long addy, long *value)
{
OpenMemory();
ReadProcessMemory(hProcess,(LPVOID*)(DWORD)addy, &value, 8, NULL);
}
now:
long result;
ReadLong(0x121212, result);
if (result== yoursearchedvalue)
{
// Code you whish here
}
Hope thats helped you
Regard
sailerboy
11-04-2007, 11:23 AM
Thanks so much!
sailerboy
11-06-2007, 08:21 PM
i was wondering, i have a problem with zoom. This is the code i have in the timer
if (button10==true){
if (GetKeyState(VK_RBUTTON) &1){
ReadLong(0x121212, result);
if (result==0){
Writelong(0xAB7E22, 1);
}
}
if (GetKeyState(VK_RBUTTON) &1){
ReadLong(0x121212, result);
if (result==1){
Writelong(0xAB7E22, 0);
}
}
}
this is the code i have as shortcuts, thanks to dxt-cobra
void Writelong(long addy, long value)
{
memory();
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &value, sizeof(value), NULL);
}
and
void ReadLong(long addy, long value)
{
ReadProcessMemory(hProcess,(LPVOID*)(DWORD)addy, &value, 8, NULL);
}
could anyone help me? I know this is C++, but i dont want to make a new topic
yes i have a button pointing to the timmer and defining button 10 as true or false, the problem is, it zooms in, but not out
Dxt-Cobra
11-06-2007, 09:56 PM
its probably your hotkey &1)
this is how i do hotkeys
if( GetAsyncKeyState(VK_SPACE)&1) == 1) ///for hit once on hit again off
if( GetAsyncKeyState(VK_SPACE) &1 << 0xF) ////this is good for on/off meaning you have to hold it down to keep the hack on or for SJump or guns quick on/off.
sailerboy
11-06-2007, 11:09 PM
no. It still zooms in, but stays zoomed in even after i use the first one. I am using the right mouse button, could that be the problem
Aprill27
11-07-2007, 06:46 AM
well u must make off botton to and paste that code there that code will zoom off
Writelong(0xAB7E22, 1);
i hope u understund what i mean
Dxt-Cobra
11-07-2007, 08:42 AM
why are you trying to do scope so weird.just do in timer
case FIRSTTIMER:
{
if (GetKeyState(VK_RBUTTON) &1<< 0xF)
Writelong(0xAB7E22, 1);
else
Writelong(0xAB7E22, 0);
{
break;
turn the timer on/off in your button's
SetTimer(FIRSTTIMER,1,NULL);
KillTimer(FIRSTTIMER);
sailerboy
11-07-2007, 05:56 PM
I have multipul buttons, and multiple timers dont work for some reason...
also, i want the user to push the right mouse button to turn it on, and the right mouse button to turn it off.
here is the entire timer
switch(nIDEvent)
{
case FIRSTTIMER:
{
//Hack for timer goes here,say stamina
if (button1==true) Writelong(0xCED484, 0);
if (button2==true) Writelong(0xAB7E67, 1095342490);
if (button3==true) Writelong(0xAB7E60, 0);
if (button4==true) Writelong(0x8B9B04, 1120403456);
if (button5==true) {
Writelong(0xFE0E8C, 0);
Writelong(0xCCB308, 0);
}
if (button6==true) Writelong(0xAD2EC0, 1176256512);
if (button7==true) Writelong(0xAD2EC0, 0);
if (button8==true){
Writefloat(0xAD2F40, 1);
Writefloat(0xAD2F44, 1);
Writefloat(0xAD2F48, 1);
}
if (button9==true) Writelong(0xAB7E48, 1);
if (button10==true){
if ((GetKeyState(VK_RBUTTON) &1) == 1){
ReadLong(0x121212, result);
if (result==0){
Writelong(0xAB7E22, 1);
}
if (result==1){
Writelong(0xAB7E22, 0);
}
}
}
}
break; // end of a case
}
}
here is the button pointing towards button 10, which is scope
void CMyTrainerDlg::OnScopeOn()
{
button10 = true;
SetTimer(FIRSTTIMER, 1, NULL);
}
void CMyTrainerDlg::OnScopeOff()
{
Writelong(0xAB7E22, 0);
}
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.