Results 1 to 11 of 11
  1. #1
    LeakingLeaker's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    In The Leak Room!
    Posts
    5
    Reputation
    10
    Thanks
    1

    Post Cool Cod4 Aimbot Code

    I Know this is detected and all but just don't play on Pb servers.

    Code:
    typedef WORD (*RegisterTag)( char *, int, size_t  );
    RegisterTag RegisterTag_ = (RegisterTag)0x518290;

    Code:
    bool GetBoneOrigin ( CEntity* Ent, Vector3 * Origin, WORD Bone )
    {
        if(!Ent||!Ent->bIsValidEnt||!Ent->bIsAlive) return 0;
        if(!CODGetTagPos ( Bone, Ent, Origin ) )
            Origin    = &Ent->Location; 
            return Ent->Location;}

    Code:
    class CGameServer
    {
    public:
    char unknown0[8]; //0x0000
    DWORD screenX; //0x0008 screenX
    DWORD screenY; //0x000C screenY
    float screenAspect; //0x0010 screenXBias
    DWORD serverCommandSequence; //0x0014 serverCommandSequence
    DWORD processedSnapshotNum; //0x0018 processedSnapshotNum
    DWORD boolLocalServer; //0x001C
    char GameType[4]; //0x0020 Dom, sd, sab, war, koth=HQ, dm = free for al
    };
    CGameServer* server = (CGameServer*)0x0074A908;

    Code:
    class CViewAngles
    {
    public:
        float ViewAngleY;
        float ViewAngleX;
    };
    CViewAngles* viewangles = (CViewAngles*)0xC84FD8;


    Code:
    BOOL DoAimbot( void )
    {__try{
        CEntity * pCurTarget = NULL;
        CEntity * pBestTarget = NULL;
        CClientInfo * pClientInfo = NULL;
        float fClosestDistance     = 999.0f;
        D3DXVECTOR3 vAimPos, vLocalPos,ViewOrigin, Trajectory;
        int iFound = -1;
    
        WORD HeadBone = RegisterTag_( "j_helmet", 1,7 );
        int nIndex;
        for (nIndex = 0; nIndex < MAX_PLAYERS; nIndex++ )
        {
            pCurTarget = GetEntityIndex( nIndex );
            pClientInfo = GetClientIndex( nIndex );
    //below we check valid target, enemy team and is target alive
            if ( ! ( IsValidEntity ( pCurTarget, pClientInfo )))
                continue;
    
            if ( !IsAlive( pCurTarget ) )
                continue;
    
            bool bEnemyTarget = ( pClientInfo->iTeamID != gLocalInfo->iTeamID || gLocalInfo->iTeamID == TEAM_FREE );
            if ( bEnemyTarget == FALSE )
                continue;
    //FFA check for aimbot
            if (!memcmp(server->GameType,"dm",2))
                if(nIndex == gCG->iLocalClient)
                    continue;
    
            if(!GetBoneOrigin( pCurTarget, VecAimSpot, HeadBone ))
                     continue;
    
            float flCurrent = CMath.GetDistance(camera->Location, pCurTarget->Location ) / 48.0f;
            //we check for target visibility on our just gotten aim location
            if( Trace_Target ( camera->Location,  VecAimSpot ) )
            {
                //we check if targets is on closer distance
                if (flCurrent < fClosestDistance)
                {
                    if(cvar.autozoom==1)
                    {
                        AutoZoom(true);
                    }
                    fClosestDistance    = flCurrent;
                    iFound                = nIndex;
                    pBestTarget            = pCurTarget;
                }
            }
        }
        if ( pBestTarget == NULL )
            return 1;
    
        float * AimAt = pBestTarget->Location;
        AimAt[2] -= .5f;
        
        float fEnemySpeed[3];
        //this is my poor selfpredict method
        VectorSubtract(pBestTarget->NewLocation,pBestTarget->OldLocation,fEnemySpeed);//subtract between NEW and OLD entity Location wich causes us getting the enemy speed!
        // below we apply the speed to our aiming position!
        AimAt[0] += fEnemySpeed[0] + fEnemySpeed[0];
        AimAt[1] += fEnemySpeed[1] + fEnemySpeed[1];
        AimAt[2] += fEnemySpeed[2] + fEnemySpeed[2];
        if ( cvar.autoaim == 1 )
        {
            if(cvar.aimbot == 1)
            {
                //here we set our view angles to target location
                CMath.GetAngleToOrigin( AimAt, &AimViewAngleX, &AimViewAngleY);
                viewangles->ViewAngleX += AimViewAngleX * cvar.aimspeed / 10.f;
                viewangles->ViewAngleY += AimViewAngleY * cvar.aimspeed / 10.f;
            }
        }
        if(cvar.autofire == 1)
        {
            hSendCommand(1,1,"+attack");
            hSendCommand(1,1,"-attack");
        }
    }__except(EXCEPTION_EXECUTE_HANDLER){
        return FALSE;
    }}



    I will stick this in to a .dll File Later On!

  2. The Following User Says Thank You to LeakingLeaker For This Useful Post:

    smonist (02-02-2012)

  3. #2
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw
    If you knew anything... This code isn't detected. It's the way you hook your EndFrame/Renderscene or if you've bypassed punkbuster.
    sig?

  4. #3
    JoeyXhacks's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    J: o/e/y/X/h/a/c/k/s
    Posts
    26
    Reputation
    10
    Thanks
    139
    yea jdslashv2 hes a leaker he tried to leak my private.....remember that?

  5. #4
    spikeftw's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0
    hmm how can i use this code???
    i mean how to activate this

  6. #5
    JoeyXhacks's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    J: o/e/y/X/h/a/c/k/s
    Posts
    26
    Reputation
    10
    Thanks
    139
    do u no wat C++ is?

  7. #6
    dhelpine's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Hi bro, how to make this dll ?
    tutorial please...

  8. #7
    lolque132's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    yo bro i never herd of a compiler wat is an ide yo no hablo compile into dll just gimme aimbot u fag i want free tutorial of how to code in cpeepee plz
    *COUGH*

  9. #8
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw
    Quote Originally Posted by lolque132 View Post
    yo bro i never herd of a compiler wat is an ide yo no hablo compile into dll just gimme aimbot u fag i want free tutorial of how to code in cpeepee plz
    *COUGH*
    Hey buddy! No one will hold your hand as you attempt to make your way into the cheating scene. At this rate you seem to be the type of person who will either be a fag and beg for cheats, OR you will be a c&p and never learn C++ yourself. So instead of reaching out for a hand, try to actually learn something. Go get a C++ book. Look on forums that have beginners programming sections. And don't start asking for a hand when you have compile errors, just look them up!
    sig?

  10. #9
    colton1111's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    216
    Reputation
    2
    Thanks
    11
    My Mood
    Fine
    Just look up tutorials on how to compile codes. Don't call him a fag just because you don't know what to do.
    Last edited by Lovroman; 02-25-2014 at 06:38 AM.

  11. #10
    ryan322's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    I am Having Problems i Get some Errors while trying to write this Code Any Help?

    PS Why am I a Leecher if My first time Posting lol

  12. #11
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw
    Quote Originally Posted by colton1111 View Post
    Wow you're a prick. Just look up tutorials on how to compile codes. Don't call him a fag just because you don't know what to do.
    So you think that I don't know what to do? Man you've got lots to learn. And I told him to go find online resources to help him learn to program. So learn to read the all that I typed....
    sig?

Similar Threads

  1. [Source Code] cod4 aimbot code
    By yoda23456 in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 9
    Last Post: 01-28-2011, 08:36 PM
  2. COD4 aimbot with RCON blocker?
    By javabytes in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 0
    Last Post: 07-23-2008, 07:17 PM
  3. Selling Cod4 Key Code
    By true1playa in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 3
    Last Post: 07-22-2008, 10:46 PM
  4. Cool cod4 gun sounds vid
    By bigsnake in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 2
    Last Post: 07-16-2008, 01:49 PM
  5. Playstation3 CoD4 Aimbot
    By enemy88 in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 14
    Last Post: 05-07-2008, 02:27 PM