Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired

    Hotkey Source code

    Code:
    #include <process.h>
    #include "stdafx.h"
    #include <windows.h>
    #include <shellapi.h>
    #include <fstream>
    
    #pragma comment(lib,"shell32.lib")
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *Ltcliient = ( DWORD* )( 0x378F4D90 );
    void* CONoff = ( void* )*( DWORD* )( *Ltcliient + 0x208 );
    
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, 4;
    }
    }
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    
    return false;
    }
    void MemCopy(void* Dest, const void* Src, int Len)
    {
    DWORD OldProtect;
    DWORD OldProtect2;
    VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
    memcpy(Dest, Src, Len);
    VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
    FlushInstructionCache(GetCurrentProcess(), Dest, Len);
    }
    void main()
    {
    
    
    
    
    while (!IsGameReadyForHook()){
    Sleep(20);
    }
    bool boxes = false;//nx chams with boxes
    bool fog = false;//no fog
    bool speed = false;//speed hack
    bool spread = false;// no spread
    bool tracers = false;// tracers useless but why not
    bool showfps = false;// also useless but why not
    bool drawgun = false;// takes away your gun
    bool sjump = false;// super jump ( i toned it down so it does not hurt you when you fall its just enough to jump onto higher ledges and stuff
    bool windows = false;//windowed kinda buggy on single core computers
    bool nosway = false;// no sway. Very usefull in my opinion helps with fireing
    bool wframe = false;// wire frame iritating ....
    bool fb = false;//full bright useful on some maps
    bool glow = false;// glow usefull on some maps
    bool ps = false;//useless just harder to aim
    bool removers = false;// helps speed up game
    bool vjump = false;//heard it can help
    bool Hover = false;//hover above position
    bool KillCamOn = false;//KillCam On
    bool FFon = false;//FriendlyFire on
    bool heal = false;//heal HP
    bool rcrosshair = false;
    bool spectator = false;
    bool firerate = false;
    
    //right here is stuff that will be on when it starts up
    PushToConsole("FireSpeed 999.999999" );
    firerate= false;
    
    PushToConsole("SpectatorMode 1" );
    spectator = false;
    
    PushToConsole("CrossHairR 255");
    rcrosshair = false;
    
    PushToConsole("Heal 0");
    heal = false;
    
    PushToConsole("KillCam_On 0");
    FFon = false;
    
    PushToConsole("KillCam_On 0");
    KillCamOn = false;
    
    PushToConsole("PlayerGravity 0");
    PushToConsole("PlayerVelocity 0");
    Hover = true;
    
    PushToConsole("FallDamageMax 0.000001");
    PushToConsole("ShowFps 1");
    showfps = true;
    
    while(true){
    if(GetAsyncKeyState(VK_HOME)<0){
    if(boxes){
    PushToConsole("ModelDebug_DrawBoxes 0");
    PushToConsole("SkelModelStencil 0");
    boxes = false;
    } else {
    PushToConsole("ModelDebug_DrawBoxes 1");
    PushToConsole("SkelModelStencil 1");
    boxes = true;
    }
    }
    if(GetAsyncKeyState(VK_F11)<0){
    if(fog){
    PushToConsole("FogEnable 1");
    fog = false;
    } else {
    PushToConsole("FogEnable 0");
    fog = true;
    }
    }
    if(GetAsyncKeyState(VK_F12)<0){
    if(speed){
    PushToConsole("BaseMoveAccel 3000.000000");
    PushToConsole("StartAccel 500.000000");
    PushToConsole("MaxAccel 3000.000000");
    PushToConsole("AccelInc 6000.000000");
    PushToConsole("WalkVel 70.000000");
    PushToConsole("FRunVel 285.000000");
    PushToConsole("BRunVel 285.000000");
    PushToConsole("SRunVel 285.000000");
    PushToConsole("DuckVel 50.000000");
    speed = false;
    } else {
    PushToConsole("BaseMoveAccel 999.000000");
    PushToConsole("StartAccel 999.000000");
    PushToConsole("MaxAccel 999.000000");
    PushToConsole("AccelInc 666.000000");
    PushToConsole("WalkVel 500.000000");
    PushToConsole("FRunVel 500.000000");
    PushToConsole("BRunVel 500.000000");
    PushToConsole("SRunVel 500.000000");
    PushToConsole("DuckVel 300.000000");
    speed = true;
    }
    }
    if(GetAsyncKeyState(VK_F6)<0){
    if(spread){
    PushToConsole("PerturbRotationEffect 3.000000");
    PushToConsole("PerturbIncreaseSpeed 3.000000");
    PushToConsole("PerturbDecreaseSpeed 9.000000");
    PushToConsole("PerturbWalkPercent 0.500000");
    PushToConsole("PerturbRecoil 9.000000");
    PushToConsole("FireMovePerturb 9.000000");
    PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
    PushToConsole("ZoomedFireMovePerturb 9.000000");
    PushToConsole("ZoomedFireDuckPerturb 9.000000");
    spread = false;
    } else {
    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_F7)<0){
    if(tracers){
    PushToConsole("ShowFirePath 0");
    tracers = false;
    } else {
    PushToConsole("ShowFirePath 1");
    tracers = true;
    }
    }
    if(GetAsyncKeyState(VK_MENU)<0){
    if(sjump){
    PushToConsole("JumpVel 330.000000");
    sjump = false;
    } else {
    PushToConsole("JumpVel 660.000000");
    sjump = true;
    }
    }
    if(GetAsyncKeyState(VK_INSERT)<0){
    if(showfps){
    PushToConsole("ShowFps 0");
    showfps = false;
    } else {
    PushToConsole("ShowFps 1");
    showfps = true;
    }
    }
    
    
    if(GetAsyncKeyState(VK_F9)<0){
    if(nosway){
    PushToConsole("WeaponSway 1.000000");
    nosway = false;
    } else {
    PushToConsole("WeaponSway 0.000000");
    nosway = true;
    }
    }
    
    
    if(GetAsyncKeyState(VK_UP)<0){
    PushToConsole("PlayerGravity +200");
    }
    if(GetAsyncKeyState(VK_DOWN)<0){
    PushToConsole("PlayerGravity -200");
    }
    //
    if(GetAsyncKeyState(VK_RIGHT)<0){
    PushToConsole("PlayerGravity +800");
    }
    if(GetAsyncKeyState(VK_LEFT)<0){
    PushToConsole("PlayerGravity -800");
    }
    if(GetAsyncKeyState(VK_PAUSE)<0){
    PushToConsole("FragSelf 1");
    }
    if(GetAsyncKeyState(VK_F10)<0){
    PushToConsole("CrossHair_DefaultLength 50");
    PushToConsole("CrossHair_DefaultGapLength 1");
    PushToConsole("CrosshairGapMin 0");
    PushToConsole("CrosshairGapMax 2");
    PushToConsole("CrosshairBarMin 100");
    PushToConsole("CrosshairBarMax 100");
    PushToConsole("HitCrossHairMAXPerturb 0");
    PushToConsole("HitCrossHairMINPerturb 0");
    PushToConsole("HitCrossHairSize 0");
    PushToConsole("CrossHair_FiringDuration 0");
    PushToConsole("ScopeUDRadius 0");
    PushToConsole("ScopeLRRadius 0");
    PushToConsole("ScopeUPGap 0");
    PushToConsole("ScopeLRGap 0");
    PushToConsole("ShowBreath 0");
    }
    if(GetAsyncKeyState(VK_END)<0){
    if(windows){
    PushToConsole("Windowed 0");
    windows = false;
    } else {
    PushToConsole("Windowed 1");
    windows = true;
    }
    }
    if(GetAsyncKeyState(VK_PRIOR)<0){
    if(fb){
    PushToConsole("FullBright 1");
    fb = false;
    } else {
    PushToConsole("FullBright 0");
    fb = true;
    }
    }
    if(GetAsyncKeyState(VK_NEXT)<0){
    if(wframe){
    PushToConsole("WireFrame 1");
    wframe = false;
    } else {
    PushToConsole("WireFrame 0");
    wframe = true;
    }
    }
    if(GetAsyncKeyState(VK_RSHIFT)<0){
    if(glow){
    PushToConsole("ScreenGlowEnable 1");
    glow = false;
    } else {
    PushToConsole("ScreenGlowEnable 0");
    glow = true;
    }
    }
    if(GetAsyncKeyState(VK_DELETE)<0){
    if(ps){
    PushToConsole("ModelDebug_DrawSkeleton 1");
    ps = false;
    } else {
    PushToConsole("ModelDebug_DrawSkeleton 0");
    ps = true;
    }
    }
    
    if(GetAsyncKeyState(VK_F5)<0){
    if(removers){
    PushToConsole("ShowPerformanceStatistics 1");
    removers = false;
    } else {
    PushToConsole("ShowPerformanceStatistics 0");
    removers = true;
    }
    }
    if(GetAsyncKeyState(VK_CAPITAL)<0){
    if(vjump){
    PushToConsole("CamMaxPosYOffset 200.000000");
    PushToConsole("DuckDownCamOffSet 1000.000000");
    vjump = false;
    } else {
    PushToConsole("CamMaxPosYOffset -200.000000");
    PushToConsole("DuckDownCamOffSet -1000.000000");
    vjump = true;
    }
    }
    
    if(GetAsyncKeyState(VK_F5)<0){
    if(Hover){
    PushToConsole("PlayerGravity 0");
    PushToConsole("PlayerVelocity 0");
    Hover = false;
    	}else{
    PushToConsole("PlayerGravity 0");
    PushToConsole("PlayerVelocity 0");
    Hover = true;
    }
    }
    
    if(GetAsyncKeyState(VK_F9)<0){
    if(KillCamOn){
    		PushToConsole("KillCam_On 0");
    		KillCamOn = false;
    }else{
    	PushToConsole("KillCam_On 0");
    	KillCamOn = true;
    }
    }
    
    if(GetAsyncKeyState(VK_F5)<0){
    	if(FFon){
    		PushToConsole("KillCam_On 0");
    		FFon = false;
    	}else{
    		PushToConsole("KillCam_On 0");
    		FFon = true;
    	}
    }
    if(GetAsyncKeyState(VK_F9)<0){
    	if(heal){
    		PushToConsole("Heal 0");
    		heal = false;
    	}else{
    		PushToConsole("Heal 0");
    		heal = true;
    	}
    }
    
    if(GetAsyncKeyState(VK_HOME)<0){
    	if(rcrosshair){
    	PushToConsole("CrossHairR 255");
    	rcrosshair = false;
    	}else{
    		PushToConsole("CrossHairR 255");
    		rcrosshair = true;
    	}
    }
    
    if(GetAsyncKeyState(VK_RSHIFT)<0){
    	if(spectator){
    		PushToConsole("SpectatorMode 1" );
    		spectator = false;
    	}else{
    		PushToConsole("SpectatorMode 1" );
    		spectator = true;
    	}
    }
    
    if(GetAsyncKeyState(VK_F9)<0){
    	if(firerate){
    		PushToConsole("FireSpeed 999.999999" );
    		firerate = false;
    	}else{
    			PushToConsole("FireSpeed 999.999999" );
    			firerate = true;
    	}
    }
    
    Sleep(160);
    }
    }
    BOOL APIENTRY DllMain( HMODULE hModule,
    DWORD ul_reason_for_call,
    LPVOID lpReserved
    )
    {
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    ShellExecute;
    CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0,NULL);
    break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    break;
    }
    return TRUE;
    }
    Thank + Rep for base and alot more

  2. The Following 5 Users Say Thank You to EminemJr For This Useful Post:

    alphab0y (05-22-2011),heya:D (05-22-2011),killbunny51 (05-22-2011),nub4life (05-22-2011),SMILLY (07-06-2011)

  3. #2
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    661
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    won't work, your not calling the console from within one of the games functions.

  4. #3
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired
    It does work my friend made a hack with it.... and if there is a problem can you show me where?

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

    SMILLY (07-06-2011)

  6. #4
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    Code:
    bool firerate = false;
    PushToConsole("FireSpeed 999.999999" );
    firerate= false;
    ...
    Also, need to hook an internal DirectX function.



    Put this image in your signature if you support HTML5 development!

  7. #5
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    also would help if it wasnt just a direct copy and paste from 50 pages back... just sayin

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  8. The Following User Says Thank You to CAFlames For This Useful Post:

    lalo9 (05-24-2011)

  9. #6
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    1/2 the hacks in there don't work or are useless...

  10. #7
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired
    I didnt copy and paste from no where on this site... it my friends

  11. #8
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    Quote Originally Posted by burgessjr View Post
    I didnt copy and paste from no where on this site... it my friends
    well he c+p considering thats the LTC in PTC from over a year ago -.-

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  12. #9
    heya:D's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    75
    Reputation
    11
    Thanks
    3
    I will find somebody to edit it

  13. #10
    IcySeal's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    300
    Reputation
    34
    Thanks
    148
    My Mood
    Amused
    Quote Originally Posted by burgessjr View Post
    I didnt copy and paste from no where on this site... it my friends
    That doesn't mean he didn't, which by extension means you could.

  14. #11
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired
    so this source code is worthless?

  15. #12
    nucks's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    191
    Reputation
    6
    Thanks
    85
    My Mood
    Amazed
    its worthless

  16. The Following User Says Thank You to nucks For This Useful Post:

    Lunatic (05-26-2011)

  17. #13
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired
    Quote Originally Posted by nucks View Post
    its worthless
    yeah i noticed little nub >.>

  18. #14
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    Quote Originally Posted by burgessjr View Post
    so this source code is worthless?
    I believe its already posted somewhere

  19. #15
    EminemJr's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    3,251
    Reputation
    -159
    Thanks
    301
    My Mood
    Tired
    well get somebody to close this then??

Page 1 of 3 123 LastLast