Code:
#include <windows.h>
bool fps = false;
void __cdecl PassCMD( const char* cCommand)
{
void* address = ( void* ) 0x485FA0;
__asm
{
Push cCommand
call address
add esp, 0x4
}
}
void main()
{
if ( GetAsyncKeyState( VK_F10 ) &1) // Yes this will activate it, however if Combat Arms changes the value back to 0 it will go off which would make you needing to press f10 everytime it goes off
{
PassCMD("SkelModelStencil 1");
}
if ( GetAsyncKeyState( VK_F11 )&1)
{
fps = true;
}else{
fps = false;
}
if(fps) {
PassCMD( "ShowFps 1" );
}else{
PassCMD( "ShowFps 0" );
}
}
DWORD WINAPI dwHackThread( LPVOID )
{
while(1) { // What this does is basically keeps going as long as it equals true and in C++ 1 is true all the time
main();
}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls( hDll );
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL ); // The Start of the dll calls Your HackThread which calls your main void
}
return TRUE;
}
Credits:
You - Your Source Code
Me - Hand Typed some C++
PTC Method - I really have no clue I just ripped it out of CN's base.
PTC Updated Address - DeadLinez.