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;
}