SmileHelp with a tutorial example

Posts 15 of 5 · Page 1 of 1
Help with a tutorial example
I know C++ but didn't know the features it has for combat arms so i read a tutorial

It gave me some code to try out

Code:
//By:Mr.Skafigther[Bro]
//Credit: Nubz
//Deadline
//YOU MUST UPDATE THIS HOTKEY FOR IT TO WORK :)
//////////////////////////////////////////////////

#include "stdafx.h"
#include <windows.h>
#define Engine LTC //Replace 0x000 to Engine LTC

bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL 
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole(char *szCommand) 
{ 
	typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
	RunConsoleCommand_t pRunConsoleCommand = (RunConsoleCommand_t); //get updates on LTC
}
void main()
{
	

	while(!IsGameReadyForHook()){
		Sleep(200);
    }// bool myhack = false; (add your hacks )
	bool FPS = false;
	bool nxchams = false;
	bool superbullet = false;
	bool speed = false;
	bool emo = false;
	bool fire = false;
	bool fly = false;

	while(true)
	{// set hot-key for hack......
	if(GetAsyncKeyState(VK_NUMPAD1)<0)// FPS
		if(FPS){
		pRunConsoleCommand("ShowFPS 1");
		FPS = true;
		}else{
		pRunConsoleCommand("ShowFPS 0");
		FPS = false;
		}
	}

		if(GetAsyncKeyState(VK_NUMPAD2)<0)// nxchams
		if(nxchams){
		pRunConsoleCommand("SkelModelStencil 0");
		nxchams = false;
		}else{
		pRunConsoleCommand("SkelModelStencil 1");
		nxchams = true;
		}
	


		if(GetAsyncKeyState(VK_NUMPAD3)<0)// superbullet
		if(superbullet){
		//you can edit this....//
		superbullet = false;
		}else{
		 switch(*(int*)0x3781886C){  
    case 1: // 1 = Ingame  
       memcpy((LPVOID)0x374AF296, "\x90\x90\x90", 3); // Super Bullets On  
		superbullet = true;
		}
		}
		if(GetAsyncKeyState(VK_NUMPAD4)<0)//Speed
		if(speed){
pRunConsoleCommand("WalkVel 1000.000000");
pRunConsoleCommand("FRunVel 1000.000000");
pRunConsoleCommand("BRunVel 1000.000000");
pRunConsoleCommand("SRunVel 1000.000000");
pRunConsoleCommand("DuckVel 1000.000000");
		speed = false;
		}else{
pRunConsoleCommand("WalkVel 70.000000");
pRunConsoleCommand("FRunVel 285.000000");
pRunConsoleCommand("BRunVel 285.000000");
pRunConsoleCommand("SRunVel 285.000000");
pRunConsoleCommand("DuckVel 50.000000");
		speed = true;
		}
		
}
DWORD WINAPI dwHackThread(LPVOID) {
while( !IsGameReadyForHook() )
Sleep(300);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
			    MessageBoxA( NULL, "PacHax Test1 Hotkey\n" "PacHax Test1", "PacHax Test1", MB_YESNO| MB_ICONWARNING);
{               //You can edit the message above, please dont forget to give credit
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
But i feel like #define Engine LTC was defined for nothing because of a new PTC method. Can someone tell me if they think this would work because i want to learn, well, CA.C++

I can only test this tomorrow but i want to know if this could work


EDIT: IT DOESNT WORK BUT I NEED HELP WITH THAT
So i tried debugging but it didn't work.

The code is same as above but this is my output from the output window in MS Visual C++ 2010

Code:
1>------ Build started: Project: testh3, Configuration: Debug Win32 ------
1>  stdafx.cpp
1>  testh3.cpp
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(22): error C2059: syntax error : ';'
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(43): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(46): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(53): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(56): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(75): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(76): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(77): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(78): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(79): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(82): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(83): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(84): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(85): error C3861: 'pRunConsoleCommand': identifier not found
1>c:\users\tamu\documents\visual studio 2010\projects\testh3\testh3\testh3.cpp(86): error C3861: 'pRunConsoleCommand': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Is it that the header file windows.h's library functions aren't working? is it because of the angle brackets <windows.h> ?
is it that i use #include <windows> instead?
Maybe i have to use #include "windows.h"?

Someone please help

Also if this helps (Which it probably doesn't)
windows.h is not in my header files folder but that's probably not the case

if someone can help i can finally make hacks and i wont be a leecher
This method is old you need to update them. Today i trying to start coding again and lol i forgot almost everything so once my memory is back i can help.
zzzzzzzzzzzz
replace pRunConsoleCommand with PushToConsole
Quote Originally Posted by kibbles18 View Post
zzzzzzzzzzzz
replace pRunConsoleCommand with PushToConsole
Eh i don't really need it now but thanks anyway i will keep this is as a reference.
Posts 15 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?