Results 1 to 1 of 1
  1. #1
    cellux1002's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Breezy

    Post Converting results into normal values

    So i've been trying to read some values y'know like health and armor and it worked perfectly but when i tried to read my kills things got weird...Unlike printing out Health and armour values normally, when trying to print the value of my kills i just got some random numbers that weren't changing and i'd like to know how to convert them to "normal" values...and yeah i am new to this so ofc my code is far from perfect but please focus on this problem and leave critisism somewhere else..thank you.

    Code:
    // chit.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include <iostream>
    #include "ConsoleColor.h"
    #include <Windows.h>
    
    
    using namespace std;
    
    
    int main()
    {
    
    	HWND hwnd = FindWindowA(NULL, "Counter-Strike: Global Offensive");
    	if (hwnd == NULL) {
    		cout << "Cannot find window." << endl;
    		Sleep(3000);
    		exit(-1);
    	}
    	else
    	{
    		DWORD procsID;
    		GetWindowThreadProcessId(hwnd, &procsID);
    		HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procsID);
    
    		if (procsID = NULL) {
    			cout << "Cannot obtain process." << endl;
    			Sleep(3000);
    			exit(-1);
    		}
    		else 
    		{
    			//health
    			DWORD lajfPointer = 0x00AA00FC; //life pointer
    			DWORD lajfPointed; //that other thingy
    			WORD lajfOffset = 0x000000FC; //life offset
    			int currentLajf; //int
    			//////////////////////////////
    			DWORD armoroffset = 0x0000B238;
    			DWORD armorpointed;
    			int currentArmor;
    
    
    			DWORD shotsoffset = 0x0000A2B0;
    			DWORD shotspointed;
    			int shots;
    
    			DWORD killoffset = 0x00000BE8;
    			DWORD killpointed;
    			int kill;
    
    
    			//////////////////////////////
    			DWORD clientNaslov = 0x1EC60000; //vedn drug, client.dll
    			DWORD LokalniIgralec = 0x00AA00FC; //local player
    			DWORD LokalnaBaza = LokalniIgralec + clientNaslov; //local base
    
    	
    	
    
    
    			while (true) {
    
    				ReadProcessMemory(handle, (LPCVOID)(LokalnaBaza), &lajfPointed, 4, NULL);
    
    				ReadProcessMemory(handle, (LPCVOID)(lajfPointed + lajfOffset), &currentLajf, 4, NULL);
    				///////////////////
    
    				////
    				ReadProcessMemory(handle, (LPCVOID)(LokalnaBaza), &armorpointed, 4, NULL);
    
    				ReadProcessMemory(handle, (LPCVOID)(armorpointed + armoroffset), &currentArmor, 4, NULL);
    
    				////
    				ReadProcessMemory(handle, (LPCVOID)(LokalnaBaza), &shotspointed, 4, NULL);
    
    				ReadProcessMemory(handle, (LPCVOID)(shotspointed + shotsoffset), &shots, 4, NULL);
    				////
    				ReadProcessMemory(handle, (LPCVOID)(LokalnaBaza), &killpointed, 4, NULL);
    
    				ReadProcessMemory(handle, (LPCVOID)(killpointed + killoffset), &kill, 4, NULL);
    
    
    				///////////////////
    				system("cls");
    				if (currentLajf == 0) {
    					cout << white <<"Current Health is: " << red << "DEAD" << endl;
    				}
    				else if (currentLajf <= 20) {
    
    					cout << white << "Current Health is: " << red << currentLajf << endl;
    					cout << white << "Current Armor is " << red << currentArmor << endl;
    				}
    				else if (currentLajf <= 50) {
    
    					cout << white << "Current Health is: " << yellow << currentLajf << endl;
    					cout << white << "Current Armor is " << green << currentArmor << endl;
    				}
    				else
    				{
    					cout << white << "Current Health is: " << green << currentLajf << endl;
    					cout << white << "Current Armor is: " << green << currentArmor << endl;
    					cout << white << "Shots fired: " << green << shots << endl;
    
    					cout << white << "Test: " << green << kill << endl;
    				}
    				
    				
    			}
    			
    
    			}
    			system("PAUSE");
    		}
    
    	
    
    	return 0;
    }
    Last edited by T-800; 05-31-2018 at 04:58 AM.

Similar Threads

  1. [Solved] Convert Lua into DLL?
    By CrystalRa1n in forum Garry's Mod Server Exploits & Help
    Replies: 18
    Last Post: 07-18-2015, 08:27 AM
  2. [Help] NORMAL VALUE OF NO DELAY
    By thugxcry01 in forum WarRock Philippines Hacks
    Replies: 12
    Last Post: 03-08-2013, 03:16 AM
  3. all Coders Help!!Whats the normal value of "RECOIL"
    By chock07 in forum WarRock Philippines Help & Discussions
    Replies: 12
    Last Post: 08-31-2012, 09:47 AM
  4. [Help] Set back to normal Value
    By user44 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 18
    Last Post: 08-07-2011, 02:55 AM
  5. Converting Assembly Into Bytes
    By radnomguywfq3 in forum Visual Basic Programming
    Replies: 0
    Last Post: 09-24-2007, 04:42 PM