I take no credits for this, i'm just helping you guys get working ptc. I will use base from Whit, if you want the menu, check back Whit's post here.
How to use:
- Open visual studio & make new project
- Win32 project > DLL + empty Project
- Click header > right click > add existing files (.h)
- Click source files> right click > add existing files (.cpp)
- Check your project setting
- Compile
By SNal2F
Code:
//In Globals
typedef void (__cdecl *lpSetConsoleVariable)(unsigned long console,char* szVal);
lpSetConsoleVariable SetConsoleVariable;
//In Present or Endscene
void cBase::RenderFrame(LPDIRECT3DDEVICE9 pDevice)
{
SetConsoleVariable = (lpSetConsoleVariable)(0x0484BC0);
if(GetAsyncKeyState(VK_INSERT)&1){
ptc =! ptc;
}
if(ptc){
SetConsoleVariable(0x8003F0,"ShowFps 1");
} else {
SetConsoleVariable(0x8003F0,"ShowFps 0");
}
}
Result:
By Gordon
Code:
//In Globals
typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
RunConsoleCommand_t pRunConsoleCommand = (RunConsoleCommand_t)0x00485E10;
//In Present or Endscene
void cBase::RenderFrame(LPDIRECT3DDEVICE9 pDevice)
{
if(GetAsyncKeyState(VK_INSERT)&1){
ptc =! ptc;
}
if(ptc){
pRunConsoleCommand("ShowFPS 1");
} else {
pRunConsoleCommand("ShowFPS 0");
}
}
Result:
I got higher framerate in game when using Gordon's method, so you decide which is one u want to use. Also for Whit's base i post below, u still need to improve it bcoz i spend only 5 mins fixed the ptc without looking other things in base.
Credits:
Gordon (ptc)
SNal2F (ptc)
Gellin, Hans (base)
Whit (combiner)
Have fun
VirusTotal - Free Online Virus, Malware and URL Scanner
Console.rar MD5:a58893690922574f61c162d162a95689 - VirSCAN.org Scanners did not find malware!