Can some one help me with my source im relative new to mpgh and new to coding. So if some oen can help me. Please dont answer by telling me to figure it our by my self. Sorry for my bad english /
I get some erros by building but if im right this is patched?
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void ConsolePush(const char* Command) {
DWORD CNADDIE = 0x46F670;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
push Command;
call Send;
add esp, -3-1+2+6;
}
}
void main()
{
bool chams = false;
bool fog = false;
bool fps = false;
bool spread = false;
bool KnockBack = false;
bool Bright = false;
bool hands = false;
bool wire = false;
bool fire = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1<0){
if(chams == true){
PushToConsole("SkelModelStencil 0");
chams = false;
} else {
PushToConsole("SkelModelStencil 1");
chams = true;
}
if(GetAsyncKeyState(VK_NUMPAD2)<0){
if(fog == true){
PushToConsole("FogEnable 1" );
fog = false;
} else {
PushToConsole("FogEnable 0" );
fog = true;
}
if(GetAsyncKeyState(VK_NUMPAD3)<0){
if(fps == true){
PushToConsole("ShowFps 0");
fps = false;
} else {
PushToConsole("ShowFps 1");
fps = true;
}
if(GetAsyncKeyState(VK_NUMPAD4)<0){
if(spread == true){
PushToConsole("PerturbRotationEffect 0.000000" );
PushToConsole("PerturbIncreaseSpeed 0.000000" );
PushToConsole("PerturbWalkPercent 0.000000" );
PushToConsole("PerturbFiringIncreaseSpeed 0.000000" );
PushToConsole("PerturbRecoil 0.000000" );
PushToConsole("FireMovePerturb 0.000000" );
PushToConsole("ZoomedFireMoveDuckPerturb 0.000000" );
PushToConsole("ZoomedFireMovePerturb 0.000000" );
PushToConsole("ZoomedFireDuckPerturb 0.000000" );
spread = true;
}
if(GetAsyncKeyState(VK_NUMPAD5)<0){
if(KnockBack == true){
PushToConsole("KnockBack 0" );
KnockBack = false;
} else {
PushToConsole("KnockBack 1" );
KnockBack = true;
}
if(GetAsyncKeyState(VK_NUMPAD6)<0){
if(Bright == true){
PushToConsole("FullBright 0" );
Bright = false;
} else {
PushToConsole("FullBright 1" );
Bright = true;
}
if(GetAsyncKeyState(VK_NUMPAD7)<0){
if(hands == true){
PushToConsole("Hands 1" );
hands = false;
} else {
PushToConsole("Hands 0" );
hands = true;
}
if(GetAsyncKeyState(VK_NUMPAD8)<0){
if(wire == true){
PushToConsole( "WireFrame 0" );
wire = false;
} else {
PushToConsole( "WireFrame 1" );
wire = true;
}
if(GetAsyncKeyState(VK_NUMPAD9)<0){
if(fire == true){
PushToConsole( "ShowFirePath 0" );
fire = false;
} else {
PushToConsole( "ShowFirePath 1" );
fire = true;
}
Sleep(200);
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
system("start https://mpgh.net/");
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}