Force DVAR Change Hack with Source code
Hey everybody ,
after i saw that so many people need some help in learning hacking and stuff ...
i wanted to share my little source code which Forces DVAR to change ... this will work fine on other CoD series if you just change the offsets and addresses.
alright , this is the code where i explained EVERYTHING in the comments
Some of you may don't know how to get the code running , its just easy as ABC , follow these steps:
- Make a new Win32 Project and select DLL when you see a BOX ...
- open dllmain.cpp and past the code inside it
Easy eh?
after all , you can still download the attachements and run the VS Solution on your PC if it just doesn't work for some reason... feel free to PM me through MPGH.NET ...
note that i used VS 2012 to make this.
Show Code
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
//MADE WITH <3 by ShRyDeR.
#include <Windows.h>
#include <iostream>
using namespace std;
//Special Thanks for Kenshin13 which helped me to do this ^^ <3
template <class Value>
//function that writes into the Pointer.
void WritePointer(DWORD pointer, DWORD pointerofs, Value value)
{
DWORD dwPointer = *(DWORD*)pointer;
*(Value*)(dwPointer + pointerofs) = value;
}
//function that writes into the memory
void Writing()
{
//use it at your own risk , u don't need to credit me if you want to use it ^^ Have fun
//Some other addresses, if you want more then contact me ... and i will show you how to get addresses easily :) ;) ... Note : i used IDA to get the addresses so easily , not Cheat engine.
// cg_gun_x 9FD42C
// cg_gun_y 9FD404
// cg_fun_z = 9FD414
// Draw Gun 7ED384
//now let's write to the Addresses
//note that the offset is always 0x10 ...
//Structure ==> WritePointer<FLOATorINT>(ADDRESS,OFFSET,VALUE);
//if you don't know the difference between float & int then just try both of them , lel...
//FOG , address 69F1050
WritePointer<float>(0x69F1050, 0x10, 0);
//cg_fov , address 9FBE24
WritePointer<float>(0x9FBE24, 0x10, 140.f);
//r_fullbright, address 69F0EB0
WritePointer<int>(0x69F0EB0, 0x10, 1);
//laserForceOn , address 7DBA50
WritePointer<int>(0x7DBA50, 0x10, 1);
//Have Fun ;)
}
/*Create a thread which loops and writes to the memory over and over ... */
LRESULT CALLBACK Thread( LPVOID arg ){
while( true )
{
Writing();
Sleep ( 100 );
}
}
// Entry Point
BOOL APIENTRY DllMain( HANDLE, DWORD d, LPVOID ){
if( d == DLL_PROCESS_ATTACH )
CreateThread( NULL, NULL, LPTHREAD_START_ROUTINE( Thread ), NULL, NULL, NULL );
return TRUE;
}
CREDITS:Kenshin13 because he helped me in almost every problem i got, until the end where i got the code working <3 <3 :D
AGAAIN: IF YOU NEED ANY HELP JUST PM ME OR MESSAGE ME ON *******!!!
Thank You :)
I got a few suggestions for you:
- none of the addresses work. Since I don't think you uploaded it without testing, you might have found some wrong ones that only work for you
- the struct offset for the current dvar value you are using is wrong, try xrefing some dvars and you will immediately see what the right one is
- I would suggest using the dvar struct and Dvar_FindVar, since you are using a dll. If you want to use addresses though, just search for the dvars name in IDA, xref it, find the correct cross reference in one of the dvar registering functions and then you can immediatly see the correct address. (The one where the result of Dvar_RegisterXXX is stored). Note that that would be a double pointer
Greetings
I will write some code for you later today! Fyi, I am using the newest iw4mp.exe which is 1.2.211! Is your code maybe for one of the iw4 projects?