- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Battlefield 2 hacks cheats tutorials source code
You are Unregistered, please register to gain Full access.
Simple BF Aim + Prediction
04-18-2010, 09:30 AM
#1 The 0n3 Join Date: Nov 2007
Location: Finland
Posts: 421
Reputation: 22705 Rep Power: 287
Simple BF Aim + Prediction
PHP Code:
void CAimClass :: DoAimbot ( ) { float AimDistance , BulletDelay ; CObject * t_obj ; CObject_Weapon * weapon = gLocalPlayer -> soldierinfo -> ptr -> ActiveWeapon ; CTemplate * pWeaponTemplate = ( CTemplate *) weapon -> object_template ; float projectile_speed = player_manager -> LocalPlayer -> soldierinfo -> ptr -> ActiveWeapon -> object_template -> weapon_velocity ; D3DXVECTOR3 AimSpot , v3TempVec ; CPlayer * BestTarget = 0 ; FLOAT Saved = (FLOAT) INT_MAX ; int BestID = - 1 ; for( int i = 0 ; i < 255 ; i ++) { CPlayer * TargetPlayer = player_manager -> GetPlayerByIndex ( i ); BestID = i ; if ( TargetPlayer && IsValidTarget ( TargetPlayer ) && IsEnemyTarget ( TargetPlayer )) { if(! GetBonePos (& AimSpot , BONE_HEAD , TargetPlayer )) continue; if(! IsVisible ( AimSpot , TargetPlayer , BONE_HEAD )) continue; if(! physics_manager ) continue; D3DXVECTOR3 target_velocity_vec ( 0.0f , 0.0f , 0.0f ); if ( TargetPlayer -> soldierinfo -> ptr -> object_physics ) target_velocity_vec = ( TargetPlayer -> soldierinfo -> ptr -> object_physics -> speed ); D3DXVECTOR3 bla = AimSpot - ViewMatrix [ 3 ]; AimDistance = D3DXVec3Length (& bla ); BulletDelay = AimDistance / projectile_speed ; AimSpot = AimSpot + target_velocity_vec * BulletDelay ; v3TempVec = AimSpot - ViewMatrix [ 3 ]; D3DXVec3Normalize ( & v3TempVec , & v3TempVec ); if( AimDistance < Saved || ! AimDistance ) { if( i = BestID ) { BestTarget = TargetPlayer ; BestID = i ; } Saved = AimDistance ; } } } if ( BestTarget == NULL || IsValidTarget ( BestTarget ) == FALSE ) return; CompensateDeviation ( & v3TempVec ); // no spread call float flAspectRatio = gLocalPlayer -> Camera -> GetInsideFOV () / gLocalPlayer -> fViewFOV / 5.0f ; InputBuffer [ 4 ] = D3DXToDegree ( asinf ( D3DXVec3Dot (& ViewMatrix [ 0 ], & v3TempVec ) ) * flAspectRatio ); InputBuffer [ 5 ] = D3DXToDegree ( - asinf ( D3DXVec3Dot (& ViewMatrix [ 1 ], & v3TempVec ) ) * flAspectRatio ); }
its just an basic bf aimbot for infantry gaming including very simple prediction, it can be improved many ways and it applies for at least bf2,bf2142, bfheroes and might apply to any else with small changes
credits:
me, patrick, r4z8r(i guess) + uc-forum in general and everyone who contributes their knowledge here.
Sfab1 is online now
04-18-2010, 09:32 AM
#2 Broken Moderator
Join Date: Aug 2006
Location: United States
Posts: 760
Reputation: 33567 Rep Power: 418
Points: 23,105, Level: 21
Last Achievements Looks good; I'll have to look over it tomorrow, just getting ready for bed.
kolbybrooks is online now
04-21-2010, 12:09 PM
#3 Hacker Supreme Join Date: Mar 2008
Location: GR
Posts: 240
Reputation: 465 Rep Power: 56
Nice job Sfab, +rep
CRYSIS2000 is offline
05-01-2010, 12:03 AM
#4 Supreme H4x0|2 Join Date: Jan 2009
Location: uoy dniheB
Posts: 676
Reputation: 8706 Rep Power: 138
good work, and thanks for sharing this
__________________
" Stay on top but remain from the underground"
4bply is offline
06-30-2010, 03:54 PM
#5 n00bie Join Date: Jun 2010
Posts: 10
Reputation: 10 Rep Power: 20
Could anybody help me using this for bf2? Is it the aimbot.h? If so how would i call it in main.cpp? Thanks for your time.
An0nym0uS is offline
06-30-2010, 04:04 PM
#6 Join Date: Jul 2009
Posts: 1,069
Reputation: 49844 Rep Power: 551
Quote:
Originally Posted by
An0nym0uS Could anybody help me using this for bf2? Is it the aimbot.h? If so how would i call it in main.cpp? Thanks for your time.
And so it begins...
Make a pointer to CAimClass then call pCAimClass->DoAimbot(..) from it.
__________________
Shad0w_'s Alter Ego
disavow is online now
06-30-2010, 04:15 PM
#7 n00bie Join Date: Jun 2010
Posts: 10
Reputation: 10 Rep Power: 20
Quote:
Originally Posted by
Shad0w_ And so it begins...
Make a pointer to CAimClass then call pCAimClass->DoAimbot(..) from it.
Lol dude dont go like "and so it begins" im just trying to add a simple aimbot for mah hack. Besides the source is public so its not much to ask for simple help.
Anyways if someone could "spoonfeed" me itdbe awesome. Bye
USER RECEIVED A WARNING FOR THIS POST
Last edited by An0nym0uS; 06-30-2010 at 05:05 PM .
An0nym0uS is offline
06-30-2010, 06:25 PM
#8 UC Contributor
Join Date: Sep 2009
Location: Netherlands
Posts: 730
Reputation: 18059 Rep Power: 223
Quote:
Originally Posted by
An0nym0uS Lol dude dont go like "and so it begins" im just trying to add a simple aimbot for mah hack. Besides the source is public so its not much to ask for simple help.
Anyways if someone could "spoonfeed" me itdbe awesome. Bye
Learn c++! They are not going to "spoonfeed" you here! You also got to do something yourself
So please stop asking stupid questions like this if you don't even know what this code does!
Moderator note (Freaky123) Next time you will recieve an infraction!
__________________ Proud to be a hacker! Programming languages I know: PHP, Javascript, XHTML, Flash Actionscript, c++
Also good at: MYSQL/Oracle databases, ERD, SQL-injection and XSS
Games I hack: Battlefield Heroes, Face of Mankind and Call of Duty MW2
Last edited by Freaky123; 06-30-2010 at 10:41 PM .
Freaky123 is offline
06-30-2010, 07:01 PM
#9 Join Date: Jun 2010
Posts: 1
Reputation: 10 Rep Power: 0
Last Achievements Eh i guess ur right. Im sorry
. Ive been learning c++ but its so damn hard :/
USER RECEIVED AN INFRACTION FOR THIS POST
[An0nym0us] is offline
06-30-2010, 07:06 PM
#10 Gathering Stories
Join Date: Mar 2009
Location: University
Posts: 4,440
Reputation: 84290 Rep Power: 966
Moderator note Do not make multiple accounts An0nym0uS. It is against the rules.
__________________
The skyline was beautiful on fire. --------------------------------------------------------------
disco is offline
12-27-2010, 05:49 PM
#11 Join Date: May 2010
Location: Netherlands, near to The Hague
Posts: 297
Reputation: -2628 Rep Power: 0
Last Achievements do u just need to compile the code to a DLL file and then inject with an injector
__________________
KILl Me 1 timE , DiE UnLiMited TiMEs , UsiNG HaCks
"DrAWingS MaDE By mE, CallED Girpon "
girpon is offline
12-27-2010, 07:32 PM
#12 Join Date: Mar 2010
Location: Germany
Posts: 941
Reputation: 40621 Rep Power: 448
No lol you need to add some things like DLLMain etc and initialize the structures u need for this aimbot
Freeheadshot is online now
12-27-2010, 08:46 PM
#13 Join Date: Mar 2010
Location: Slovakia
Posts: 2,028
Reputation: 37520 Rep Power: 439
Quote:
Originally Posted by
girpon do u just need to compile the code to a DLL file and then inject with an injector
this is snipet, not copy pastable
need classes and base
TIGERHax is online now
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 10:10 AM .