Results 1 to 5 of 5
  1. #1
    Pacnet2011's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Plainsboro
    Posts
    42
    Reputation
    10
    Thanks
    3
    My Mood
    Aggressive

    Smile 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
    Last edited by Pacnet2011; 08-16-2011 at 09:13 AM. Reason: code edit

  2. #2
    MrSkafighter's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    410
    Reputation
    23
    Thanks
    2,236
    My Mood
    Cool
    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.

  3. #3
    Pacnet2011's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Plainsboro
    Posts
    42
    Reputation
    10
    Thanks
    3
    My Mood
    Aggressive
    bump.......

  4. #4
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    zzzzzzzzzzzz
    replace pRunConsoleCommand with PushToConsole

  5. The Following User Says Thank You to kibbles18 For This Useful Post:

    Pacnet2011 (08-20-2011)

  6. #5
    Pacnet2011's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Plainsboro
    Posts
    42
    Reputation
    10
    Thanks
    3
    My Mood
    Aggressive
    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.
    Last edited by Pacnet2011; 08-20-2011 at 07:24 PM.

Similar Threads

  1. [Help Request] help with ca hacks
    By moises8 in forum Combat Arms Help
    Replies: 4
    Last Post: 05-10-2011, 06:55 PM
  2. [Help Request] Anyone can help with this ?
    By devileyebg in forum Vindictus Help
    Replies: 1
    Last Post: 05-01-2011, 04:57 PM
  3. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 01:40 PM
  4. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 10:06 PM
  5. need help or a tutorial with signatures
    By mijaelkill in forum Suggestions, Requests & Help
    Replies: 1
    Last Post: 03-09-2011, 05:45 PM