LUDIX-BoT Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


LUDIX-BoT Forum
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Call of Duty 4 Third Person

Go down 
3 posters
AuthorMessage
Shagrath




Posts : 57
Join date : 2009-10-10
Location : Istanbul/Turkey

Call of Duty 4 Third Person Empty
PostSubject: Call of Duty 4 Third Person   Call of Duty 4 Third Person EmptyMon Oct 12, 2009 6:39 am

Introduction

Hey all, this is a simple third person hack for call of duty 4 1.4... It uses strifes console function and some more simple stuff. It looks cool for screen shots etc.

I found, that with strifes function, you can use cheat protected cvar/dvar's pretty easily.

For example:

Cg_thirdPerson is cheat protected, and when you try and enable it in the console it will give you the message 'this variable is cheat protected'... So what we do is, disable the cheat protection; send the command; re-enable the protection:
Code:
if(bThirdPerson)// Enable Third Person
        {
            WriteProcessMemory(hand, (void*)(0x0056B016), &CP, 2, 0);  <-- Disable cheat cvar/dvar check
            ConPrint(0, "Third Person Enabled!"); 
            SendCommandToConsole("cg_thirdPerson 1") ;  <-- Send Cheat command to console
            WriteProcessMemory(hand, (void*)(0x0056B016), &CPOrig, 2, 0); <-- Re enable cheat cvar/dvar check :))
            bThirdPerson=false;
        }

This should stop you form being kicked for memory corruption if you do it at the right time. Any who, you should be able to do this for any of the cvar/dvars: such as: cg_drawShellshock, player_sprintCameraBob, r_fog and other small tweaks.

Source is coded in Visual Studio 2008. Full Project & Compiled module attached (includes Winject). Numpad 1: Enable, Numpad 2: Disable (may have to use numlock).

Code:
main.cpp:
Code:
// Call of duty 4 1.4 - Simple Third Person
// Credits: Quicktime, Strife, Runningbon.
//Includes
#include <windows.h>


// prototype (console)
typedef void (*g_ConPrint)(int Index, const char *fmt);
g_ConPrint trap_ConPrint = (g_ConPrint)0x004FCAB0; // Call of duty 4 1.4 offset

//Globals
bool bThirdPerson = false;
bool bThirdPersonDisable = false;
HANDLE hand = GetCurrentProcess();

//Cheat Protected
BYTE CP[] = {0xEB, 0x29};      //0056B016    EB 29          JMP SHORT iw3mp.0056B041
BYTE CPOrig[] = {0x75, 0x29}; //0056B016    75 29          JNZ SHORT iw3mp.0056B041

// Credit to Strife: Console Function
void SendCommandToConsole(char command[])
{
    __asm
    {
        push    command
        push    0
        push    0
        mov    esi, 0x004F99A0
        call    esi
        add    esp, 0x0C
    }
}

// Printing to console function (Quicktime/Runningbon)
void ConPrint(int Index, const char *fmt)
{
(trap_ConPrint)(Index, fmt);
}

DWORD WINAPI SendCommands(LPVOID)
  {
      for(;; Sleep(500))
      {
        if(GetAsyncKeyState(VK_NUMPAD1))  // Enable Third Person
        {
          bThirdPerson=true;
        }


        if(bThirdPerson)// Enable Third Person
        {
            WriteProcessMemory(hand, (void*)(0x0056B016), &CP, 2, 0);
            ConPrint(0, "Third Person Enabled!");
            SendCommandToConsole("cg_thirdPerson 1") ;
            WriteProcessMemory(hand, (void*)(0x0056B016), &CPOrig, 2, 0);
            bThirdPerson=false;
        }


        if(GetAsyncKeyState(VK_NUMPAD2)) // Disable Third Person
        {
            bThirdPersonDisable=true;
        }

         
        if(bThirdPersonDisable) // Disable Thid Person
        {
          WriteProcessMemory(hand, (void*)(0x0056B016), &CP, 2, 0);
          ConPrint(0, "Third Person Disabled!");
          SendCommandToConsole("cg_thirdPerson 0") ;
          WriteProcessMemory(hand, (void*)(0x0056B016), &CPOrig, 2, 0);
          bThirdPersonDisable=false;
        }
       

    }

      return 1;
}



BOOL APIENTRY DllMain(HMODULE hModule,DWORD AreWeInside,LPVOID lpReserved)
{

      if(AreWeInside == true)
  {
   
    ConPrint(0, "Injected OK!!");
    Beep(150,150);
    CreateThread(NULL, NULL,SendCommands, NULL, NULL, NULL);

  }
 

  return 1;

Edit:
Full Project / Compiled DLL (Includes Winject):


Last edited by Shagrath on Tue Oct 13, 2009 5:53 am; edited 2 times in total
Back to top Go down
SUXXX
Admin
Admin



Posts : 66
Join date : 2009-10-10

Call of Duty 4 Third Person Empty
PostSubject: Re: Call of Duty 4 Third Person   Call of Duty 4 Third Person EmptyMon Oct 12, 2009 11:36 am

Quote :

Source is coded in Visual Studio 2008. Full Project & Compiled module attached (includes Winject). Numpad 1: Enable, Numpad 2: Disable (may have to use numlock).
Full project eh ? Can you upload the project please ? Thanks!
Back to top Go down
http://ludix-bot.tk
Shagrath




Posts : 57
Join date : 2009-10-10
Location : Istanbul/Turkey

Call of Duty 4 Third Person Empty
PostSubject: Re: Call of Duty 4 Third Person   Call of Duty 4 Third Person EmptyTue Oct 13, 2009 5:52 am

Sorry, i forgot to add link.. edited
Back to top Go down
x0Ph




Posts : 1
Join date : 2011-01-04

Call of Duty 4 Third Person Empty
PostSubject: Re: Call of Duty 4 Third Person   Call of Duty 4 Third Person EmptyTue Jan 04, 2011 2:21 pm

Can someone tell me the offsets to 1.7 version?
Please Smile
Back to top Go down
Sponsored content





Call of Duty 4 Third Person Empty
PostSubject: Re: Call of Duty 4 Third Person   Call of Duty 4 Third Person Empty

Back to top Go down
 
Call of Duty 4 Third Person
Back to top 
Page 1 of 1
 Similar topics
-
» Call of Duty 4 Wallhack Tutorial
» Call Of Duty 1.7 No Recoil & cvarUnlocker undetected
» Call of Duty 2 Private wallhack 100% works
» Call of Duty 2 Private wallhack 100% works

Permissions in this forum:You cannot reply to topics in this forum
LUDIX-BoT Forum :: Coding :: General Coding-
Jump to: