Register for your free account! | Forgot your password?

You last visited: Today at 04:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Psf aimbot source code!

Discussion on Psf aimbot source code! within the Soldier Front Hacks, Bots, Cheats & Exploits forum part of the Soldier Front category.

Closed Thread
 
Old   #1
 
ewan676's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 89
Received Thanks: 188
Thumbs up Psf aimbot source code!

Psf aimbot source code!

#include "../ogoid++.h"


#include "cheats.h"

#include "../sf/sf2.h"
#include "../misc/encrypted_strings.h"

#include "aimbot_helper.h"


#define _USE_MATH_DEFINES
#include <math.h>



//////////////////////////////////////////////////////////////////////////
AimbotCheat::AimbotCheat()
{
encrypted_name = estr_aimbot;

virtual_key = VK_NUMPAD0;
disable_key = VK_SHIFT;

ConfigParam param;

param.type = ConfigParam:aram_vkey;
param.address = &disable_key;
config_parameters.push_back(param);

Enable(TRUE);
}


BOOL AimbotCheat::Apply(BOOL apply)
{
if(apply && !player_manager) return FALSE;
return TRUE;
}


void AimbotCheat::Refresh(void)
{
if(!IsApplied()
|| !local_player
|| hud_manager->mouseActive
|| !local_info.Refresh()
)
return;

INPUT input;

list<CPlayer*>::iterator target_iter;

D3DXVECTOR3 temp_vector;

CPlayer* target_player;

TargetInformation target;
D3DXVECTOR3 target_pos;
D3DXVECTOR3 dir_to_target;
float target_importance;
float target_z;

TargetInformation best_target;
D3DXVECTOR3 best_dir;
D3DXVECTOR3 best_projected;
float best_importance;
BOOL got_target;

if(GetAsyncKeyState(VK_SHIFT))
{
assert(player_manager && bf2_wnd_width && bf2_wnd_height);

if( !local_player->player_object
|| !local_player->player_object->ptr
|| !local_player->player_alive
|| local_player->player_down
) return;


best_importance = 20.0f;
got_target = FALSE;


// let's iterate through the bastards
for( target_iter = player_manager->player_list.begin();
target_iter != player_manager->player_list.end();
target_iter++ )
{
target_player = *target_iter;

if( target_player == local_player
|| !target_player->player_alive
|| target_player->player_down
|| target_player->player_team == local_player->player_team
|| !target_player->player_object
|| !target_player->player_object->ptr
)
continue;

if( !target.NewTarget(target_player)
|| !target.IsGoodDistance()
|| !target.GetDirectionToTarget(&dir_to_target)
)
continue;

target_z = D3DXVec3Dot( local_info.GetAimDir(), &dir_to_target);


// the dot product is the cosine of the angle, that means, if the angle between
// the viewing direction and the direction to the target is 0, target_z will
// be 1.0.
if(target_z < cosf(AIMBOT_COVER_ANGLE))
continue;

target_importance = 10.0f - target_z;

// if not sniper the distance is important
//if( !(local_player->player_object
// && local_player->player_object == local_player->player_soldier
// && local_player->kit_num == 1 && local_info.GetSoldier()->soldier_selected_weapon == 3)
// )
// target_importance += target.GetDistanceToTarget() / 800.0f;


if( target_importance < best_importance )
{
best_importance = target_importance;
best_target = target;
best_dir = dir_to_target;
got_target = TRUE;
}
}

if(got_target && best_target.GetAimVector(&dir_to_target))
{
float angle_x, angle_y;

angle_x = asin( D3DXVec3Dot(local_info.GetAimRight(), &dir_to_target) );
angle_y = asin( D3DXVec3Dot(local_info.GetAimUp(), &dir_to_target) );

if(local_info.GetObject() == local_info.GetSoldier())
SoldierAngleToPix( &input.mi.dx, &input.mi.dy, angle_x, angle_y );
else
VehicleAngleToPix( &input.mi.dx, &input.mi.dy, angle_x, angle_y );


// limit the aim change
#ifdef AIMBOT_MAX_PIXEL_CHANGE //defined in configuration_switches_h
if(input.mi.dx > AIMBOT_MAX_PIXEL_CHANGE) input.mi.dx = AIMBOT_MAX_PIXEL_CHANGE;
else if(input.mi.dx < -AIMBOT_MAX_PIXEL_CHANGE)input.mi.dx = -AIMBOT_MAX_PIXEL_CHANGE;
if(input.mi.dy > AIMBOT_MAX_PIXEL_CHANGE) input.mi.dy = AIMBOT_MAX_PIXEL_CHANGE;
else if(input.mi.dy < -AIMBOT_MAX_PIXEL_CHANGE)input.mi.dy = -AIMBOT_MAX_PIXEL_CHANGE;
#endif

input.mi.dx *= 0.5f + 0.5f * cosf(angle_x / AIMBOT_COVER_ANGLE * M_PI * 2);
input.mi.dy *= 0.5f + 0.5f * cosf(angle_y / AIMBOT_COVER_ANGLE * M_PI * 2);

input.mi.mouseData = 0;
input.mi.dwFlags = 0;
input.mi.time = 0;
input.mi.dwExtraInfo = GetMessageExtraInfo();
input.type = INPUT_MOUSE;

SendInput( 1, &input, sizeof(input) );
}
}
}
ewan676 is offline  
Thanks
6 Users
Old 09/15/2010, 11:08   #2
 
joseaz's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 41
Received Thanks: 5
>.< dont understand really >.<
joseaz is offline  
Old 09/15/2010, 11:17   #3
 
cyanide004's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 31
Received Thanks: 5
leach from smartwhz
cyanide004 is offline  
Old 09/15/2010, 11:39   #4
 
elite*gold: 0
Join Date: Aug 2010
Posts: 4
Received Thanks: 1
pak **** no plsss
Anthill is offline  
Old 09/15/2010, 11:52   #5
 
elite*gold: 0
Join Date: Jun 2010
Posts: 41
Received Thanks: 2
whats that?
charljenz17 is offline  
Old 09/15/2010, 11:54   #6
 
elite*gold: 0
Join Date: May 2009
Posts: 21
Received Thanks: 0
hahaha..di nila maintindihan.
coldflame3 is offline  
Old 09/15/2010, 12:18   #7
 
elite*gold: 0
Join Date: Sep 2010
Posts: 9
Received Thanks: 11
pwede to sa java??panu ung process po?
helloworld69 is offline  
Old 09/15/2010, 12:42   #8
 
elite*gold: 0
Join Date: Jun 2010
Posts: 62
Received Thanks: 13
oo po paano mag process ni2...
d4riol4ng2 is offline  
Old 09/15/2010, 15:01   #9
 
tantan05's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 185
Received Thanks: 149
a bit like for java program
tantan05 is offline  
Thanks
12 Users
Old 09/15/2010, 15:15   #10
 
elite*gold: 0
Join Date: Jun 2010
Posts: 41
Received Thanks: 2
ah..i see. .whats the process?
charljenz17 is offline  
Old 01/06/2011, 06:16   #11
 
elite*gold: 0
Join Date: Sep 2009
Posts: 4
Received Thanks: 0
d pa ba detected to ?
marcial714 is offline  
Old 01/07/2011, 06:25   #12
 
Ovenran's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 717
Received Thanks: 361
Lol you dont have any files like that in #include section....

that's C++ btw..

but the functions are real
Ovenran is offline  
Old 01/07/2011, 08:30   #13
 
august091's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 35
Received Thanks: 21
Quote:
Originally Posted by joseaz View Post
>.< dont understand really >.<
u cant understand because ur not a programmer lol
august091 is offline  
Old 01/08/2011, 03:20   #14
 
G124nclCh4s3r's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 234
Received Thanks: 87
you can create a aimbot DLL using this and a visual basics .
G124nclCh4s3r is offline  
Old 01/08/2011, 03:38   #15
 
elite*gold: 0
Join Date: Jun 2009
Posts: 6
Received Thanks: 0
c++
mhadhee is offline  
Closed Thread


Similar Threads Similar Threads
[Source Code] Aimbot
04/10/2016 - Combat Arms Hacks, Bots, Cheats & Exploits - 26 Replies
Code: PLAYER_DATA GetMyPlayerData(void) PLAYER_DATA GetPlayerData(BYTE PlayerNumber) void SetCrosshairOnEnemy(BYTE PlayerNumber PLAYER_DATA? Yup, to make things more tidy in my programming, I like to use some structs as well as functions. My PLAYER_DATA structure holds valuable information about a player. Such as: Code:
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
02/13/2011 - AutoIt - 6 Replies
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein. Funktionsweise: 1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken 2. in meinem Programm auf "Code generieren" klicken 3. In euer Scite gehen und einfügen Hier ist der Source Code vom Programm:



All times are GMT +1. The time now is 04:09.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.