Results 1 to 11 of 11
  1. #1
    IGotBanned.'s Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    imageshack.us/photo/my-images/190/uban.png
    Posts
    1,290
    Reputation
    -49
    Thanks
    122
    My Mood
    Aggressive

    This Code No spread?

    Since I was looking for no-spread for cod4 i found this.

    Code:
    struct FViewAngle 
    { 
    	float Y; 
    	float X; 
    };
    
    float WeaponViewAngleX = 0.0f;
    float WeaponViewAngleY = 0.0f;
    
    void GetWeaponViewAngles ( FViewAngle* pReturnAngle = NULL )
    {
    	WeaponViewAngleX = *( float* )0x79E770;
    	WeaponViewAngleY = *( float* )0x79E76C;
    
    	if ( pReturnAngle )
    	{
    		pReturnAngle->X = WeaponViewAngleX;
    		pReturnAngle->Y = WeaponViewAngleY;
    	}
    }
    
    void GetPlayerViewPoint ( Vector* pReturnViewPoint )
    {
    	DWORD CG_GetPlayerViewPoint = 0x456580;
    
    	_asm
    	{
    		mov eax, 0x794474;
    		mov edx, dword ptr ds: [ pReturnViewPoint ];
    		push edx
    		call dword ptr ds: [ CG_GetPlayerViewPoint ];
    		add esp, 0x4
    	}
    }
    
    void GetWeaponSpread ( weapon_t* pWeapon, float* WeaponSpread )
    {
    	DWORD CalculateWeaponSpread = 0x416C70;
    
    	float MaxSpread = 0.0f;
    	float BaseSpread = 0.0f;
    	float SpreadMultiplier = 0.0f;
    
    	_asm
    	{
    		mov ecx, dword ptr ds: [ pWeapon ];
    		mov edx, 0x794474
    
    		lea edi, dword ptr ds: [ BaseSpread ];
    		lea esi, dword ptr ds: [ MaxSpread ];
    
    		call dword ptr ds: [ CalculateWeaponSpread ];
    
    		fld dword ptr ds: [ 0x84CAA0 ];
    		fdiv qword ptr ds: [ 0x70AEE0 ];
    		fstp dword ptr ds: [ SpreadMultiplier ];
    	}
    
    	*WeaponSpread = BaseSpread + ( ( MaxSpread - BaseSpread ) * SpreadMultiplier );
    }
    
    void TransformAngles ( FViewAngle* pViewAngles, Vector* pReturnVector, Vector* pESIReturnVector, Vector* pEDIReturnVector )
    {
    	DWORD TransformByAngles = 0x563460;
    
    	_asm
    	{
    		mov edi, dword ptr ds: [ pEDIReturnVector ];
    		mov esi, dword ptr ds: [ pESIReturnVector ];
    		mov edx, dword ptr ds: [ pViewAngles ];
    
    		mov ecx, dword ptr ds: [ pReturnVector ];
    		push ecx;
    		call dword ptr ds: [ TransformByAngles ];
    		add esp, 0x4;
    	}
    }
    
    void CalculateBulletLocation ( float* WeaponSpread, Vector* pReturnedVectorByAngle, Vector* pPlayerViewLocation, Vector* pReturnESIVector, Vector* pReturnEDIVector, Vector* pReturnBulletLocation )
    {
    	DWORD RepositionBulletLocation = 0x456470;
    
    	Vector* pCopyOfReturnESIVector = new Vector;
    	pCopyOfReturnESIVector->X = pReturnESIVector->X;
    	pCopyOfReturnESIVector->Y = pReturnESIVector->Y;
    	pCopyOfReturnESIVector->Z = pReturnESIVector->Z;
    
    	float MaxFloatVector = 8192.0f;
    
    	_asm
    	{
    		xor ecx, ecx;
    		push ecx;
    		fld dword ptr ds: [ MaxFloatVector ];
    		fstp dword ptr ds: [ esp ];	
    
    		mov edx, dword ptr ds: [ pReturnEDIVector ];
    		push edx;
    
    		mov eax, dword ptr ds: [ pReturnESIVector ];
    		push eax;
    
    		mov ecx, dword ptr ds: [ pCopyOfReturnESIVector ];
    		push ecx;
    
    		mov edx, dword ptr ds: [ pPlayerViewLocation ];
    		push edx;
    
    		push ecx;
    
    		mov eax, dword ptr ds: [ WeaponSpread ];
    		fld dword ptr ds: [ eax ];
    		fstp dword ptr ds: [ esp ];		
    		
    		mov ecx, dword ptr ds: [ 0x794474 ];
    
    		push ecx;
    		mov edi, dword ptr ds: [ pReturnBulletLocation ];
    		mov eax, dword ptr ds: [ pReturnedVectorByAngle ];
    
    		call dword ptr ds: [ RepositionBulletLocation ];
    
    		add esp, 0x1C
    	}
    
    	delete pCopyOfReturnESIVector;
    }
    
    Vector GetHitLocationBySpread ( float WeaponSpread )
    {
    	Vector pViewPoint = Vector( 0, 0, 0 );
    	GetPlayerViewPoint( &pViewPoint );
    
    	FViewAngle pWeaponAngles;
    	GetWeaponViewAngles( &pWeaponAngles );
    
    	Vector pReturnVector = Vector( 0, 0, 0 );
    	Vector pReturnESIVector = Vector( 0, 0, 0 );
    	Vector pReturnEDIVector = Vector( 0, 0, 0 );
    	TransformAngles( &pWeaponAngles, &pReturnVector, &pReturnESIVector, &pReturnEDIVector );
    
    	Vector pBulletLocation = Vector( 0, 0, 0 );
    	CalculateBulletLocation( &WeaponSpread, &pReturnVector, &pViewPoint, &pReturnESIVector, &pReturnEDIVector, &pBulletLocation );
    
    	return pBulletLocation;
    }
    
    void CalculateBulletDisplacement ( Vector* pBulletDisplacement )
    {
    	if ( !pLocalEntity || !pLocalClient )
    		return;
    
    	if ( pLocalClient->IsZoomed )
    		return;
    
    	weapon_t* pWeapon = GetWeapon( pLocalEntity->WeaponID );
    
    	if ( !pWeapon )
    		return;
    
    	float WeaponSpread = 0.0f;
    	GetWeaponSpread( pWeapon, &WeaponSpread );
    
    	*pBulletDisplacement = ( GetHitLocationBySpread( WeaponSpread ) - GetHitLocationBySpread( 0.0f ) ) * -1;
    }
    Last edited by Moto; 06-27-2011 at 07:09 PM.

  2. #2
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw
    it is, but do you know how to implement it into a hack?
    sig?

  3. #3
    IGotBanned.'s Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    imageshack.us/photo/my-images/190/uban.png
    Posts
    1,290
    Reputation
    -49
    Thanks
    122
    My Mood
    Aggressive
    Quote Originally Posted by jdslashv2 View Post
    it is, but do you know how to implement it into a hack?
    Nope Since Im not That Far Experinced yet.

    you can use it.

    Give me credits in that chase

  4. #4
    Moto's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Bay Area, CA
    Posts
    13,057
    Reputation
    707
    Thanks
    13,431
    My Mood
    Blah
    I changed it from quote to code.



  5. #5
    IGotBanned.'s Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    imageshack.us/photo/my-images/190/uban.png
    Posts
    1,290
    Reputation
    -49
    Thanks
    122
    My Mood
    Aggressive
    Quote Originally Posted by Moto View Post
    I changed it from quote to code.
    Ur random u know.

  6. #6
    Shadeyz346's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    General.
    Posts
    4,023
    Reputation
    133
    Thanks
    237
    My Mood
    In Love
    Quote Originally Posted by Moto View Post
    I changed it from quote to code.
    [highlight="C++"]struct FViewAngle
    {
    float Y;
    float X;
    };

    float WeaponViewAngleX = 0.0f;
    float WeaponViewAngleY = 0.0f;

    void GetWeaponViewAngles ( FViewAngle* pReturnAngle = NULL )
    {
    WeaponViewAngleX = *( float* )0x79E770;
    WeaponViewAngleY = *( float* )0x79E76C;

    if ( pReturnAngle )
    {
    pReturnAngle->X = WeaponViewAngleX;
    pReturnAngle->Y = WeaponViewAngleY;
    }
    }

    void GetPlayerViewPoint ( Vector* pReturnViewPoint )
    {
    DWORD CG_GetPlayerViewPoint = 0x456580;

    _asm
    {
    mov eax, 0x794474;
    mov edx, dword ptr ds: [ pReturnViewPoint ];
    push edx
    call dword ptr ds: [ CG_GetPlayerViewPoint ];
    add esp, 0x4
    }
    }

    void GetWeaponSpread ( weapon_t* pWeapon, float* WeaponSpread )
    {
    DWORD CalculateWeaponSpread = 0x416C70;

    float MaxSpread = 0.0f;
    float BaseSpread = 0.0f;
    float SpreadMultiplier = 0.0f;

    _asm
    {
    mov ecx, dword ptr ds: [ pWeapon ];
    mov edx, 0x794474

    lea edi, dword ptr ds: [ BaseSpread ];
    lea esi, dword ptr ds: [ MaxSpread ];

    call dword ptr ds: [ CalculateWeaponSpread ];

    fld dword ptr ds: [ 0x84CAA0 ];
    fdiv qword ptr ds: [ 0x70AEE0 ];
    fstp dword ptr ds: [ SpreadMultiplier ];
    }

    *WeaponSpread = BaseSpread + ( ( MaxSpread - BaseSpread ) * SpreadMultiplier );
    }

    void TransformAngles ( FViewAngle* pViewAngles, Vector* pReturnVector, Vector* pESIReturnVector, Vector* pEDIReturnVector )
    {
    DWORD TransformByAngles = 0x563460;

    _asm
    {
    mov edi, dword ptr ds: [ pEDIReturnVector ];
    mov esi, dword ptr ds: [ pESIReturnVector ];
    mov edx, dword ptr ds: [ pViewAngles ];

    mov ecx, dword ptr ds: [ pReturnVector ];
    push ecx;
    call dword ptr ds: [ TransformByAngles ];
    add esp, 0x4;
    }
    }

    void CalculateBulletLocation ( float* WeaponSpread, Vector* pReturnedVectorByAngle, Vector* pPlayerViewLocation, Vector* pReturnESIVector, Vector* pReturnEDIVector, Vector* pReturnBulletLocation )
    {
    DWORD RepositionBulletLocation = 0x456470;

    Vector* pCopyOfReturnESIVector = new Vector;
    pCopyOfReturnESIVector->X = pReturnESIVector->X;
    pCopyOfReturnESIVector->Y = pReturnESIVector->Y;
    pCopyOfReturnESIVector->Z = pReturnESIVector->Z;

    float MaxFloatVector = 8192.0f;

    _asm
    {
    xor ecx, ecx;
    push ecx;
    fld dword ptr ds: [ MaxFloatVector ];
    fstp dword ptr ds: [ esp ];

    mov edx, dword ptr ds: [ pReturnEDIVector ];
    push edx;

    mov eax, dword ptr ds: [ pReturnESIVector ];
    push eax;

    mov ecx, dword ptr ds: [ pCopyOfReturnESIVector ];
    push ecx;

    mov edx, dword ptr ds: [ pPlayerViewLocation ];
    push edx;

    push ecx;

    mov eax, dword ptr ds: [ WeaponSpread ];
    fld dword ptr ds: [ eax ];
    fstp dword ptr ds: [ esp ];

    mov ecx, dword ptr ds: [ 0x794474 ];

    push ecx;
    mov edi, dword ptr ds: [ pReturnBulletLocation ];
    mov eax, dword ptr ds: [ pReturnedVectorByAngle ];

    call dword ptr ds: [ RepositionBulletLocation ];

    add esp, 0x1C
    }

    delete pCopyOfReturnESIVector;
    }

    Vector GetHitLocationBySpread ( float WeaponSpread )
    {
    Vector pViewPoint = Vector( 0, 0, 0 );
    GetPlayerViewPoint( &pViewPoint );

    FViewAngle pWeaponAngles;
    GetWeaponViewAngles( &pWeaponAngles );

    Vector pReturnVector = Vector( 0, 0, 0 );
    Vector pReturnESIVector = Vector( 0, 0, 0 );
    Vector pReturnEDIVector = Vector( 0, 0, 0 );
    TransformAngles( &pWeaponAngles, &pReturnVector, &pReturnESIVector, &pReturnEDIVector );

    Vector pBulletLocation = Vector( 0, 0, 0 );
    CalculateBulletLocation( &WeaponSpread, &pReturnVector, &pViewPoint, &pReturnESIVector, &pReturnEDIVector, &pBulletLocation );

    return pBulletLocation;
    }

    void CalculateBulletDisplacement ( Vector* pBulletDisplacement )
    {
    if ( !pLocalEntity || !pLocalClient )
    return;

    if ( pLocalClient->IsZoomed )
    return;

    weapon_t* pWeapon = GetWeapon( pLocalEntity->WeaponID );

    if ( !pWeapon )
    return;

    float WeaponSpread = 0.0f;
    GetWeaponSpread( pWeapon, &WeaponSpread );

    *pBulletDisplacement = ( GetHitLocationBySpread( WeaponSpread ) - GetHitLocationBySpread( 0.0f ) ) * -1;
    }[/highlight]

    This you mean?

    .

  7. #7
    Skyline.'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    10,160
    Reputation
    403
    Thanks
    1,613
    Quote Originally Posted by Shadeyz346 View Post


    [highlight="C++"]struct FViewAngle
    {
    float Y;
    float X;
    };

    float WeaponViewAngleX = 0.0f;
    float WeaponViewAngleY = 0.0f;

    void GetWeaponViewAngles ( FViewAngle* pReturnAngle = NULL )
    {
    WeaponViewAngleX = *( float* )0x79E770;
    WeaponViewAngleY = *( float* )0x79E76C;

    if ( pReturnAngle )
    {
    pReturnAngle->X = WeaponViewAngleX;
    pReturnAngle->Y = WeaponViewAngleY;
    }
    }

    void GetPlayerViewPoint ( Vector* pReturnViewPoint )
    {
    DWORD CG_GetPlayerViewPoint = 0x456580;

    _asm
    {
    mov eax, 0x794474;
    mov edx, dword ptr ds: [ pReturnViewPoint ];
    push edx
    call dword ptr ds: [ CG_GetPlayerViewPoint ];
    add esp, 0x4
    }
    }

    void GetWeaponSpread ( weapon_t* pWeapon, float* WeaponSpread )
    {
    DWORD CalculateWeaponSpread = 0x416C70;

    float MaxSpread = 0.0f;
    float BaseSpread = 0.0f;
    float SpreadMultiplier = 0.0f;

    _asm
    {
    mov ecx, dword ptr ds: [ pWeapon ];
    mov edx, 0x794474

    lea edi, dword ptr ds: [ BaseSpread ];
    lea esi, dword ptr ds: [ MaxSpread ];

    call dword ptr ds: [ CalculateWeaponSpread ];

    fld dword ptr ds: [ 0x84CAA0 ];
    fdiv qword ptr ds: [ 0x70AEE0 ];
    fstp dword ptr ds: [ SpreadMultiplier ];
    }

    *WeaponSpread = BaseSpread + ( ( MaxSpread - BaseSpread ) * SpreadMultiplier );
    }

    void TransformAngles ( FViewAngle* pViewAngles, Vector* pReturnVector, Vector* pESIReturnVector, Vector* pEDIReturnVector )
    {
    DWORD TransformByAngles = 0x563460;

    _asm
    {
    mov edi, dword ptr ds: [ pEDIReturnVector ];
    mov esi, dword ptr ds: [ pESIReturnVector ];
    mov edx, dword ptr ds: [ pViewAngles ];

    mov ecx, dword ptr ds: [ pReturnVector ];
    push ecx;
    call dword ptr ds: [ TransformByAngles ];
    add esp, 0x4;
    }
    }

    void CalculateBulletLocation ( float* WeaponSpread, Vector* pReturnedVectorByAngle, Vector* pPlayerViewLocation, Vector* pReturnESIVector, Vector* pReturnEDIVector, Vector* pReturnBulletLocation )
    {
    DWORD RepositionBulletLocation = 0x456470;

    Vector* pCopyOfReturnESIVector = new Vector;
    pCopyOfReturnESIVector->X = pReturnESIVector->X;
    pCopyOfReturnESIVector->Y = pReturnESIVector->Y;
    pCopyOfReturnESIVector->Z = pReturnESIVector->Z;

    float MaxFloatVector = 8192.0f;

    _asm
    {
    xor ecx, ecx;
    push ecx;
    fld dword ptr ds: [ MaxFloatVector ];
    fstp dword ptr ds: [ esp ];

    mov edx, dword ptr ds: [ pReturnEDIVector ];
    push edx;

    mov eax, dword ptr ds: [ pReturnESIVector ];
    push eax;

    mov ecx, dword ptr ds: [ pCopyOfReturnESIVector ];
    push ecx;

    mov edx, dword ptr ds: [ pPlayerViewLocation ];
    push edx;

    push ecx;

    mov eax, dword ptr ds: [ WeaponSpread ];
    fld dword ptr ds: [ eax ];
    fstp dword ptr ds: [ esp ];

    mov ecx, dword ptr ds: [ 0x794474 ];

    push ecx;
    mov edi, dword ptr ds: [ pReturnBulletLocation ];
    mov eax, dword ptr ds: [ pReturnedVectorByAngle ];

    call dword ptr ds: [ RepositionBulletLocation ];

    add esp, 0x1C
    }

    delete pCopyOfReturnESIVector;
    }

    Vector GetHitLocationBySpread ( float WeaponSpread )
    {
    Vector pViewPoint = Vector( 0, 0, 0 );
    GetPlayerViewPoint( &pViewPoint );

    FViewAngle pWeaponAngles;
    GetWeaponViewAngles( &pWeaponAngles );

    Vector pReturnVector = Vector( 0, 0, 0 );
    Vector pReturnESIVector = Vector( 0, 0, 0 );
    Vector pReturnEDIVector = Vector( 0, 0, 0 );
    TransformAngles( &pWeaponAngles, &pReturnVector, &pReturnESIVector, &pReturnEDIVector );

    Vector pBulletLocation = Vector( 0, 0, 0 );
    CalculateBulletLocation( &WeaponSpread, &pReturnVector, &pViewPoint, &pReturnESIVector, &pReturnEDIVector, &pBulletLocation );

    return pBulletLocation;
    }

    void CalculateBulletDisplacement ( Vector* pBulletDisplacement )
    {
    if ( !pLocalEntity || !pLocalClient )
    return;

    if ( pLocalClient->IsZoomed )
    return;

    weapon_t* pWeapon = GetWeapon( pLocalEntity->WeaponID );

    if ( !pWeapon )
    return;

    float WeaponSpread = 0.0f;
    GetWeaponSpread( pWeapon, &WeaponSpread );

    *pBulletDisplacement = ( GetHitLocationBySpread( WeaponSpread ) - GetHitLocationBySpread( 0.0f ) ) * -1;
    }[/highlight]

    This you mean?

    .
    he meant that yes, but he didnt do it properly

  8. #8
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw
    why should i give you credit when i found this years ago on another site?
    sig?

  9. #9
    Shadeyz346's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    General.
    Posts
    4,023
    Reputation
    133
    Thanks
    237
    My Mood
    In Love
    Quote Originally Posted by Alex View Post


    he meant that yes, but he didnt do it properly
    The one i did is not made by [ CODE] [/CODE] shit .

  10. #10
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,643
    Reputation
    748
    Thanks
    1,818
    My Mood
    Doh
    Credits for that code goes to an other dude lol.
    Quote Originally Posted by KING View Post
    Stop FACKING SUMMONING ME TO THESE FUCKTARDS CONVOS.
    DAFUQ IS DIS FACKING SHYT.
    SHYT MAKES NO SENSE.

    On a side note. You fags are fucking hatting.
    You guys don't know shyt about spam.
    Danny would post on everysingle post every fucking hour, you couldnt tell which post was recent or anything. It was a fuck fest, he wouldnt have shyt to say....cares he posted like a fag he is.

    Josh made mutiple threads a day. And not just G, everywhere. That why everyone liked that dumb nikka.

    @Richard Nixon -Are you Endrat? @REAP @Digits2012 @Ghost -Son...I am dissapoint @Sjoerd -SMD @Canadian @FrosK -Dumb name is dumb @Nebulaa @That_Kid -Man Up @The XXX Devil -Oh look another joker avatar-how original and neat

    The rest who I didn't mention comment....Suck my left nut....but not to hard...it hurts.

  11. #11
    Skyline.'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    10,160
    Reputation
    403
    Thanks
    1,613
    Quote Originally Posted by Shadeyz346 View Post


    The one i did is not made by [ CODE] [/CODE] shit .
    shifty bugger