Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 12:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] Read Value

Discussion on [C++] Read Value within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2020
Posts: 3
Received Thanks: 0
[C++] Read Value

hi i am trying to read a pointer to offsets
and when i use 1 offset work nice also when i try add more don't work
Code:
DWORD temp;
int curhp;
ReadProcessMemory(handle, (LPCVOID)(ModuleBaseAddress + 0x476ABC), &temp, sizeof(temp), NULL);
ReadProcessMemory(handle, (LPCVOID)(temp + 0x4C), &temp, sizeof(temp), NULL); // -----> Work nice 
ReadProcessMemory(handle, (LPCVOID)(temp + 0x75), &curhp, sizeof(curhp), NULL); // -------> When i try add more 


cout << "Current HP: " << temp << "-- |  " << curhp << endl;
Sleep(100);
system("CLS");
Image Look :
smkk6 is offline  
Old 06/02/2020, 20:34   #2



 
IceTrailer's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
Arrow Nostale -> C/C++

#moved

Try this code:
(old code, should work but untested for now)
Code:
#include <vector>
#include <Windows.h>

int getValue(DWORD address, const std::vector<DWORD>& offsets = std::vector<DWORD>()) {
	DWORD result;
	for (auto offset : offsets) {
		result += offset;
		result = *(DWORD*)result;
	}
	return (int)result;
}
IceTrailer is offline  
Old 07/08/2020, 21:46   #3
 
elite*gold: 435
Join Date: Jun 2020
Posts: 16
Received Thanks: 2
try

Code:
DWORD temp;
int curhp;
int curhp1;
ReadProcessMemory(handle, (LPCVOID)(ModuleBaseAddress + 0x476ABC), &temp, sizeof(temp), NULL);
ReadProcessMemory(handle, (LPCVOID)(temp + 0x4C), &curhp, sizeof(curhp1), NULL); // -----> Work nice 
ReadProcessMemory(handle, (LPCVOID)(temp + 0x75), &curhp1, sizeof(curhp1), NULL); // -------> When i try add more 


cout << "Current HP: " << curhp << "-- |  " << curhp << endl;
Sleep(100);
system("CLS");
immun1ty is offline  
Old 12/07/2020, 18:50   #4
 
kraneqq's Avatar
 
elite*gold: 0
Join Date: Aug 2018
Posts: 29
Received Thanks: 1
readprocessmemory is just a function that puts the dword pointer in your &var.

to read the actual value just derefrence that result
kraneqq is offline  
Reply


Similar Threads Similar Threads
Q> anung values ang ipapalit sa value ng E9 and 2nd value? MLE users pls reply!
06/02/2010 - RF Online - 2 Replies
guys need ko ng value na ipapalit para sa Flyhack ng RFph ung ipapalit na values para mka fly tnx add me: [email protected]
Suche Konzentriertes Lesen Value und Seeli Value
04/11/2009 - Metin2 Private Server - 17 Replies
Wie es schon oben steht, such ich die value dafuer. mfg Pacc



All times are GMT +1. The time now is 12:40.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.