Help with C++using CE....
well i want to code a program in C/C++ that , in game , shows my health and mana (firstly)
what do i have to acctually do ? idk even where to start , all i know , is that , the game im trying to do his is n online game, and that , in order to make the hp and mana to be shown on the CMD ( as its c/c++ ) i need the game adresses.
u cant make false nunbers and say " ah this is myhealth" no , i want to pick in my game the Health and mana adresses , and put it in a code of C/C++ to show both there . if someone can help me whit that i would love!!!
i have an example i picked over the net look that shows the pinball score
__________________________________________________ _______________
Code:
#include<windows.h>
#include<stdio.h>
#include <conio.h>
#include <iostream> // for cout, i'd preffer cout than printf, a little bit slower but more comfortable
int main(void) {
DWORD dwID;
HWND hwnd = FindWindow("3D Pinball for Windows - Space Cadet",NULL);
HANDLE hProcess;
if (hwnd)
{
DWORD proc_id;
GetWindowThreadProcessId(hwnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);
}
if(hProcess == NULL) //it isn't opened
{
std::cout << "OPENPROCESS FAILED";
return 0; //exit program
}
while(true) //infinite loop, you can break program execution only by forcing it to terminate (Alt+F4, Ctrl+C and so on)
{
ReadProcessMemory(hProcess, (void *) 0x01020F95, &dwID, sizeof(DWORD), 0);
printf("Score: %d\n",dwID & 0x000FFFF);
Sleep(1000); //pauses current thread for 1000ms
}
CloseHandle(hProcess); //won't be executed anyway, but always good to remember about that
return 1;
}
-------------------------------------------------------------------------------------
thats what ii was needing , it works but, it just show
"
Score:2
Score:2
Score:2
"
it doesnt exactly show my score , know whati m saying?
what do i do to this work perfectly?
___________________________________________
whit thati n mind , what do i need to make the health and mana appear?
Rewiew:
1-see whats wrong whit the code i gave up there on the pinball.
2-Using that code up there , how do i make to my health and mana show on cmd just like the "score:" does
TY for the support, happy hacking!