Results 1 to 4 of 4
  1. #1
    >:v's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    6

    Post TeknoMW3 Nospread hack

    I was using the nospread hack of NrBot 2.8 (ik C&P), but it doesn't work when you aim with snipers.
    Can someone share a teknomw3 nospread source or (if you feel generous) the dll, thanks in advice.

  2. #2
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261
    read the quake source on ****** and learn how it works the cmd angles so you can learn from the algorithm of every call of duty game, once let the magic go in your brain so will see that it's too easy make a perfect no spread without copy&paste... and you will can able make a no spread for every call of duty game...

    simple example:



    so we just need get the spread view, it which every call of duty game has the fuction for that, anyway you can find the subroutine for mw3 searching on google because it's public... cheers.


    f*ck you
    Code:
    __usercall
    !

  3. The Following User Says Thank You to niko1921 For This Useful Post:

    >:v (09-05-2017)

  4. #3
    Threadstarter
    New Member
    >:v's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    6
    Quote Originally Posted by niko1921 View Post
    read the quake source on ****** and learn how it works the cmd angles so you can learn from the algorithm of every call of duty game, once let the magic go in your brain so will see that it's too easy make a perfect no spread without copy&paste... and you will can able make a no spread for every call of duty game...

    simple example:

    l33texplanation.jpg

    so we just need get the spread view, it which every call of duty game has the fuction for that, anyway you can find the subroutine for mw3 searching on google because it's public... cheers.

    Got this, now what should i do?
    Just put it into a .dll?

    Teach me senpai.

    Code:
     
    typedef struct
    {
        int servertime; //0x0000 
        int buttons; //0x0004 
        int viewangles[3]; //0x0008 // below here is some usefull stuffs
       char lol[0x18];.
    }usercmd_t;//Size=0x002C
     
    typedef struct
    {
        usercmd_t usercmds[128];
        int currentCmdNum; // 0x16E8
     
        usercmd_t *GetUserCmd(int cmdNum)
        {
            int id = cmdNum & 0x7F;
            return &usercmds[id];
        }
    }input_t;
     
    void ( __cdecl* R_WeaponSpread )( cg_t* cg, int weapon, float*BaseSpread, float*MaxSpread ) = ( void( __cdecl* )( cg_t*, int, float*, float* ) )0x4D3820;
    int  ( __cdecl* R_GetCurrentWeapon )( cg_t* cg ) = ( int( __cdecl* )( cg_t* ) )0x4ABCF0;
     
    void GetRandomSpread(int iSeed, float* flSpreadRight,float* flSpreadUp ) 
    { 
        DWORD dwCall = 0x5AAB80;
        int iSpreadSeed = 214013 * (214013 * (214013 * (214013 * iSeed + 2531011) + 2531011) + 2531011) + 2531011;
        __asm 
        { 
            lea eax, dword ptr ds: [ flSpreadUp ]; 
            push [ eax ];
            lea ecx, dword ptr ds: [ flSpreadRight ]; 
            push [ ecx ];
            lea esi, dword ptr ds: [ iSpreadSeed ]; 
            call dword ptr ds:[ dwCall ]; 
            add esp, 0x8 
        } 
    } 
    void GetWeaponSpread( float*Spread ) 
    { 
        float SpreadMultiplier = *(float*)0xA03D48 / 255.0f;
     
        float MaxSpread = 0.0f; 
        float BaseSpread = 0.0f; 
     
        int iLocalWeapon = R_GetCurrentWeapon( cg );
     
        R_WeaponSpread( cg, iLocalWeapon, &BaseSpread, &MaxSpread ); 
        
        *Spread = BaseSpread + ( ( MaxSpread - BaseSpread ) * SpreadMultiplier ); 
    }
    double Radians(float Degrees)
    {
        return  0.01745329238474369 * Degrees;
    }
    VOID ApplyNoSpread( )
    {
        input_t * input = ( input_t* )0x1063CA4;
        usercmd_t * pAntiAimCmd = input->GetUserCmd( input->currentCmdNum );
        antiAim( pAntiAimCmd );
        int iSeed = *( int* )0x96A60C;
     
        float flSpread, flSpreadX, flSpreadY;
     
        float flDistance = 8192.f;
     
        Vector3 ForwardVec, RightVec, UpVec, CalculatedSpreadView, SpreadView, DestinationVec, BulletAnglesVec, FinalVecAngles; 
     
        //BulletAnglesVec[ 0 ] = *( float* )0x976560;  these are working ones too
        //BulletAnglesVec[ 1 ] = *( float* )0x976564;
        //BulletAnglesVec[ 2 ] = *( float* )0x976568;
     
        BulletAnglesVec[ 0 ] = refAngles[ 0 ];
        BulletAnglesVec[ 1 ] = refAngles[ 1 ];
        BulletAnglesVec[ 2 ] = refAngles[ 2 ];
     
        gMath.AngleVectors( BulletAnglesVec, ForwardVec, RightVec, UpVec ); 
     
        GetWeaponSpread( &flSpread ); 
     
        flSpread = tan( Radians( flSpread ) ) * flDistance; 
     
        GetRandomSpread(iSeed, &flSpreadX, &flSpreadY ); 
     
        flSpreadX *= flSpread; 
        flSpreadY *= flSpread; 
     
        SpreadView[ 0 ] = refDef->vOrigin[ 0 ] + ForwardVec[ 0 ] * flDistance + RightVec[ 0 ] * flSpreadX + UpVec[ 0 ] * flSpreadY; 
        SpreadView[ 1 ] = refDef->vOrigin[ 1 ] + ForwardVec[ 1 ] * flDistance + RightVec[ 1 ] * flSpreadX + UpVec[ 1 ] * flSpreadY; 
        SpreadView[ 2 ] = refDef->vOrigin[ 2 ] + ForwardVec[ 2 ] * flDistance + RightVec[ 2 ] * flSpreadX + UpVec[ 2 ] * flSpreadY; 
     
        VectorSubtract( SpreadView, refDef->vOrigin, CalculatedSpreadView ); 
     
        gMath.VectorAngles( CalculatedSpreadView , DestinationVec ); 
        
        FinalVecAngles[ 0 ] = BulletAnglesVec[ 0 ] - DestinationVec[ 0 ]; 
        FinalVecAngles[ 1 ] = BulletAnglesVec[ 1 ] - DestinationVec[ 1 ]; 
        FinalVecAngles[ 2 ] = BulletAnglesVec[ 2 ] - DestinationVec[ 2 ];
     
        float* ViewAngleY = (float*)0x1063C98;
        Vector3 CalculatedFinalVecAngles = { ViewAngleY[ 0 ], ViewAngleY[ 1 ], 0 };
        
        CalculatedFinalVecAngles[ 0 ] += FinalVecAngles[ 0 ];
        CalculatedFinalVecAngles[ 1 ] += FinalVecAngles[ 1 ];
        CalculatedFinalVecAngles[ 2 ] = 0;
     
        if( gCvar.bSilentAim && isTargeting )
        {
            if( !clientinfo[cg->clientNum].isZoomed )
            {
                CalculatedFinalVecAngles[ 0 ] += SilentAngles[ 0 ];
                CalculatedFinalVecAngles[ 1 ] += SilentAngles[ 1 ];
                CalculatedFinalVecAngles[ 2 ] += SilentAngles[ 2 ];
            }
            else
            {
                pAntiAimCmd->viewangles[ 0 ] += ANGLE2SHORT( SilentAngles[ 0 ] );
                pAntiAimCmd->viewangles[ 1 ] += ANGLE2SHORT( SilentAngles[ 1 ] );
                pAntiAimCmd->viewangles[ 2 ] = 0;
            }
        }
     
        if( !clientinfo[cg->clientNum].isZoomed )
        {
            pAntiAimCmd->viewangles[ 0 ] = ANGLE2SHORT( CalculatedFinalVecAngles[ 0 ] );
            pAntiAimCmd->viewangles[ 1 ] = ANGLE2SHORT( CalculatedFinalVecAngles[ 1 ] );
            pAntiAimCmd->viewangles[ 2 ] = 0;
        }
    }

  5. #4
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261
    Quote Originally Posted by >:v View Post
    Got this, now what should i do?
    Just put it into a .dll?

    Teach me senpai.

    Code:
     
    typedef struct
    {
        int servertime; //0x0000 
        int buttons; //0x0004 
        int viewangles[3]; //0x0008 // below here is some usefull stuffs
       char lol[0x18];.
    }usercmd_t;//Size=0x002C
     
    typedef struct
    {
        usercmd_t usercmds[128];
        int currentCmdNum; // 0x16E8
     
        usercmd_t *GetUserCmd(int cmdNum)
        {
            int id = cmdNum & 0x7F;
            return &usercmds[id];
        }
    }input_t;
     
    void ( __cdecl* R_WeaponSpread )( cg_t* cg, int weapon, float*BaseSpread, float*MaxSpread ) = ( void( __cdecl* )( cg_t*, int, float*, float* ) )0x4D3820;
    int  ( __cdecl* R_GetCurrentWeapon )( cg_t* cg ) = ( int( __cdecl* )( cg_t* ) )0x4ABCF0;
     
    void GetRandomSpread(int iSeed, float* flSpreadRight,float* flSpreadUp ) 
    { 
        DWORD dwCall = 0x5AAB80;
        int iSpreadSeed = 214013 * (214013 * (214013 * (214013 * iSeed + 2531011) + 2531011) + 2531011) + 2531011;
        __asm 
        { 
            lea eax, dword ptr ds: [ flSpreadUp ]; 
            push [ eax ];
            lea ecx, dword ptr ds: [ flSpreadRight ]; 
            push [ ecx ];
            lea esi, dword ptr ds: [ iSpreadSeed ]; 
            call dword ptr ds:[ dwCall ]; 
            add esp, 0x8 
        } 
    } 
    void GetWeaponSpread( float*Spread ) 
    { 
        float SpreadMultiplier = *(float*)0xA03D48 / 255.0f;
     
        float MaxSpread = 0.0f; 
        float BaseSpread = 0.0f; 
     
        int iLocalWeapon = R_GetCurrentWeapon( cg );
     
        R_WeaponSpread( cg, iLocalWeapon, &BaseSpread, &MaxSpread ); 
        
        *Spread = BaseSpread + ( ( MaxSpread - BaseSpread ) * SpreadMultiplier ); 
    }
    double Radians(float Degrees)
    {
        return  0.01745329238474369 * Degrees;
    }
    VOID ApplyNoSpread( )
    {
        input_t * input = ( input_t* )0x1063CA4;
        usercmd_t * pAntiAimCmd = input->GetUserCmd( input->currentCmdNum );
        antiAim( pAntiAimCmd );
        int iSeed = *( int* )0x96A60C;
     
        float flSpread, flSpreadX, flSpreadY;
     
        float flDistance = 8192.f;
     
        Vector3 ForwardVec, RightVec, UpVec, CalculatedSpreadView, SpreadView, DestinationVec, BulletAnglesVec, FinalVecAngles; 
     
        //BulletAnglesVec[ 0 ] = *( float* )0x976560;  these are working ones too
        //BulletAnglesVec[ 1 ] = *( float* )0x976564;
        //BulletAnglesVec[ 2 ] = *( float* )0x976568;
     
        BulletAnglesVec[ 0 ] = refAngles[ 0 ];
        BulletAnglesVec[ 1 ] = refAngles[ 1 ];
        BulletAnglesVec[ 2 ] = refAngles[ 2 ];
     
        gMath.AngleVectors( BulletAnglesVec, ForwardVec, RightVec, UpVec ); 
     
        GetWeaponSpread( &flSpread ); 
     
        flSpread = tan( Radians( flSpread ) ) * flDistance; 
     
        GetRandomSpread(iSeed, &flSpreadX, &flSpreadY ); 
     
        flSpreadX *= flSpread; 
        flSpreadY *= flSpread; 
     
        SpreadView[ 0 ] = refDef->vOrigin[ 0 ] + ForwardVec[ 0 ] * flDistance + RightVec[ 0 ] * flSpreadX + UpVec[ 0 ] * flSpreadY; 
        SpreadView[ 1 ] = refDef->vOrigin[ 1 ] + ForwardVec[ 1 ] * flDistance + RightVec[ 1 ] * flSpreadX + UpVec[ 1 ] * flSpreadY; 
        SpreadView[ 2 ] = refDef->vOrigin[ 2 ] + ForwardVec[ 2 ] * flDistance + RightVec[ 2 ] * flSpreadX + UpVec[ 2 ] * flSpreadY; 
     
        VectorSubtract( SpreadView, refDef->vOrigin, CalculatedSpreadView ); 
     
        gMath.VectorAngles( CalculatedSpreadView , DestinationVec ); 
        
        FinalVecAngles[ 0 ] = BulletAnglesVec[ 0 ] - DestinationVec[ 0 ]; 
        FinalVecAngles[ 1 ] = BulletAnglesVec[ 1 ] - DestinationVec[ 1 ]; 
        FinalVecAngles[ 2 ] = BulletAnglesVec[ 2 ] - DestinationVec[ 2 ];
     
        float* ViewAngleY = (float*)0x1063C98;
        Vector3 CalculatedFinalVecAngles = { ViewAngleY[ 0 ], ViewAngleY[ 1 ], 0 };
        
        CalculatedFinalVecAngles[ 0 ] += FinalVecAngles[ 0 ];
        CalculatedFinalVecAngles[ 1 ] += FinalVecAngles[ 1 ];
        CalculatedFinalVecAngles[ 2 ] = 0;
     
        if( gCvar.bSilentAim && isTargeting )
        {
            if( !clientinfo[cg->clientNum].isZoomed )
            {
                CalculatedFinalVecAngles[ 0 ] += SilentAngles[ 0 ];
                CalculatedFinalVecAngles[ 1 ] += SilentAngles[ 1 ];
                CalculatedFinalVecAngles[ 2 ] += SilentAngles[ 2 ];
            }
            else
            {
                pAntiAimCmd->viewangles[ 0 ] += ANGLE2SHORT( SilentAngles[ 0 ] );
                pAntiAimCmd->viewangles[ 1 ] += ANGLE2SHORT( SilentAngles[ 1 ] );
                pAntiAimCmd->viewangles[ 2 ] = 0;
            }
        }
     
        if( !clientinfo[cg->clientNum].isZoomed )
        {
            pAntiAimCmd->viewangles[ 0 ] = ANGLE2SHORT( CalculatedFinalVecAngles[ 0 ] );
            pAntiAimCmd->viewangles[ 1 ] = ANGLE2SHORT( CalculatedFinalVecAngles[ 1 ] );
            pAntiAimCmd->viewangles[ 2 ] = 0;
        }
    }
    Learn to code atleast...


    f*ck you
    Code:
    __usercall
    !

Similar Threads

  1. [Preview] TeknoMW3 SinglePlayer Hack
    By Kenshin13 in forum Call of Duty Modern Warfare 3 Private Server Hacks
    Replies: 6
    Last Post: 05-13-2013, 05:31 AM
  2. looking for a nospread hack
    By obeseninja in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 5
    Last Post: 11-20-2012, 06:28 PM
  3. Setting up my nospread hack
    By cnttuchme in forum C++/C Programming
    Replies: 20
    Last Post: 10-11-2009, 11:23 PM
  4. We only need NoSpread hack!!!
    By ddd555 in forum Combat Arms Europe Hacks
    Replies: 73
    Last Post: 05-24-2009, 07:25 PM
  5. Teamspeak NoSpread hack after the patch??
    By ChairmanMao in forum Combat Arms Europe Hacks
    Replies: 17
    Last Post: 03-21-2009, 03:56 AM