- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post 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 Bad Company 2 hacks cheats tutorials source code
You are Unregistered, please register to gain Full access.
03-18-2010, 09:14 PM
#21 n00bie Join Date: Mar 2010
Posts: 12
Reputation: 9 Rep Power: 0
I have a very stupid question, i'm new to hacking, what is the php code for?
Sorry again for my noobism
adeexd is offline
03-18-2010, 09:21 PM
#22 Join Date: Sep 2009
Posts: 53
Reputation: 90 Rep Power: 31
Last Achievements Quote:
Originally Posted by
adeexd I have a very stupid question, i'm new to hacking, what is the php code for?
Sorry again for my noobism
Paste into notepad and save as .exe
Or you could learn c++
neurel is offline
03-18-2010, 09:25 PM
#23 Join Date: Feb 2005
Posts: 5,046
Reputation: 93094 Rep Power: 1116
Great posts. Quote:
Originally Posted by
adeexd I have a very stupid question, i'm new to hacking, what is the php code for?
Sorry again for my noobism
It is not PHP scripting, it is the C++ programming language displayed using the forums PHP tag for syntax highlighting. And if you can not work out what it is for, then it is of no use to you at this moment in time.
__________________
I've learned that something constructive comes from every defeat.
Sometimes i say things i shouldn't, and sometimes i say what other people are thinking.
Real programmer's don't document, if it was hard to write, it should be hard to understand.
First learn computer science and all the theory, next develop a programming style, then forget all that and just hack. Roverturbo is online now
03-18-2010, 09:31 PM
#24 n00bie Join Date: Mar 2010
Posts: 12
Reputation: 9 Rep Power: 0
so, it's not a final release, it's like an open work in progress?
adeexd is offline
03-18-2010, 10:08 PM
#25 Join Date: Feb 2005
Posts: 5,046
Reputation: 93094 Rep Power: 1116
Quote:
Originally Posted by
adeexd so, it's not a final release, it's like an open work in progress?
It's source code for people who know how to use it...
__________________
I've learned that something constructive comes from every defeat.
Sometimes i say things i shouldn't, and sometimes i say what other people are thinking.
Real programmer's don't document, if it was hard to write, it should be hard to understand.
First learn computer science and all the theory, next develop a programming style, then forget all that and just hack. Roverturbo is online now
03-18-2010, 10:10 PM
#26 Retired Admin Join Date: Sep 2006
Posts: 5,249
Reputation: 93628 Rep Power: 1107
Quote:
Originally Posted by
adeexd so, it's not a final release, it's like an open work in progress?
Quote:
Originally Posted by
Roverturbo And if you can not work out what it is for, then it is of no use to you at this moment in time.
do i need to say more?
learn_more is offline
03-19-2010, 02:53 AM
#27 The Legendary Cheater Join Date: Sep 2006
Location: Nowhere
Posts: 531
Reputation: 17131 Rep Power: 248
Points: 15,046, Level: 16
Last Achievements Quote:
Originally Posted by
dogmatt now need to find weapon data
like bullet speed / dmg & player bones
BFBC2 Information Impulser is online now
03-22-2010, 03:14 PM
#28 My household appliance is on drugs. Horrible.
Join Date: Oct 2005
Location: ALWAYS WON NEVER DEFEAT
Posts: 812
Reputation: 70378 Rep Power: 796
Some people asked me a little more info about my post here,
PHP Code:
class IRef { public: unsigned char Unknown001 [ 0x220 ]; //0000 FMatrix Matrix001 ; //0220 FMatrix Matrix002 ; //0260 FMatrix Matrix003 ; //02A0 unsigned char Unknown002 [ 0xC0 ]; //02E0 FMatrix Matrix004 ; //03A0 FMatrix Matrix005 ; //03E0 FMatrix Matrix006 ; //0420 }; class IGameRender { public: virtual void Unknown001 () = 0 ; //0000 virtual void Unknown002 () = 0 ; //0004 virtual void Unknown003 () = 0 ; //0008 virtual void Unknown005 () = 0 ; //000C virtual void Unknown006 () = 0 ; //0010 virtual void Unknown007 () = 0 ; //0014 virtual void Unknown008 () = 0 ; //0018 virtual void Unknown009 () = 0 ; //001C virtual void Unknown010 () = 0 ; //0020 virtual void Unknown011 () = 0 ; //0024 virtual void Unknown012 () = 0 ; //0028 virtual IRef * GetRef () = 0 ; //002C unsigned char Padding001 [ 0x1C ]; //0004 float FovX ; //0020 float FovY ; //0024 float A ; //0028 float ZN ; //002C float ZF ; //0030 float Aspect ; //0034 unsigned char Padding002 [ 40 ]; //0038 Engine :: FMatrix View ; //0060 unsigned char Padding003 [ 784 ]; //00A0 Engine :: FMatrix WorldTransform ; //03B0 __forceinline static IGameRender * Get () { return reinterpret_cast < IGameRender * >( * reinterpret_cast < unsigned long * >( 0x0199AB80 ) ); } //1.0.0 = 0x01534540 //1.0.1 = 0x00000000 //1.0.1.s = 0x0199AB80 };
this is for steam version, current
(1.0.1, i call it, but it is the 1st patch after retail release for future reference.)
all credits to mattdog btw, since its painfully obvious how to make your own based on his posts....very simple (scolding you secret pmer!!)
s0beit is offline
03-22-2010, 06:32 PM
#29 Level 3
Threadstarter Join Date: Dec 2006
Posts: 436
Reputation: 8917 Rep Power: 160
Just some example esp
Code:
bool ScreenProjectPoint(D3DXVECTOR3 *in, D3DXVECTOR3 *out)
{
const D3DXMATRIX &m_Screen = *(D3DXMATRIX *) &g_pGameRender->RenderData->WorldTransform;
D3DXVECTOR3 Origin = (*in);
float CX = static_cast< float >( CRender::Get()->ScreenW_1 ) / 2.0f;
float CY = static_cast< float >( CRender::Get()->ScreenH_1 ) / 2.0f;
FLOAT w = m_Screen.m [0][3] * Origin.x +
m_Screen.m [1][3] * Origin.y +
m_Screen.m [2][3] * Origin.z +
m_Screen.m [3][3];
if(w < 0.0001f)
return FALSE;
FLOAT x = m_Screen.m [0][0] * Origin.x +
m_Screen.m [1][0] * Origin.y +
m_Screen.m [2][0] * Origin.z +
m_Screen.m [3][0];
FLOAT y = m_Screen.m [0][1] * Origin.x +
m_Screen.m [1][1] * Origin.y +
m_Screen.m [2][1] * Origin.z +
m_Screen.m [3][1];
out->x = CX + CX * x / w;
out->y = CY - CY * y / w;
return TRUE;
}
if(!pFirst->Information->IsLocal())
{
D3DXVECTOR3 vLocalOrigin, vTargetOrigin;
GetOrigin( &vLocalOrigin, &pLocalPlayer->Soldier->PlayerViewMatrix );
GetOrigin( &vTargetOrigin, &pFirst->PlayerViewMatrix );
float flDistance = GetDistance( vLocalOrigin, vTargetOrigin );
D3DXVECTOR3 vScreen;
if( ScreenProjectPoint( &vTargetOrigin, &vScreen ) )
{
sprintf( cTargetInfo, "[%.1fm] %s", flDistance, pFirst->Information->Name );
if(pLocalPlayer->Team != pFirst->Information->Team)
{
ddraw.Text(vScreen.x, vScreen.y, Red, bold, DT_CENTER, cTargetInfo);
}else{
ddraw.Text(vScreen.x, vScreen.y, Blue, bold, DT_CENTER, cTargetInfo);
}
}
} note: puts tags on root of the player model
credits: s0beit, GHOSTER and dogmatt/mattdog
silverfish is online now
04-23-2010, 05:24 AM
#30 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
Quote:
Originally Posted by
s0beit This is something related, just for reference purposes
PHP Code:
v49 = MatrixFunction_001 ((int)& v131 , (int)& v154 , _ESI + 0x50 ); Matrix4_Multiply_Vector ((int) v113 , (int)& v148 , v49 ); v109 = atan2 ( v113 [ 1 ], - v113 [ 0 ]); ScaleScreenValues ((int) v113 , (int)& v113 [ 1 ], 0.800000011920929 ); if ( sub_CF6190 ( v50 ) ) { if ( *( _DWORD *)( sub_CF6190 (*( _DWORD *) _ESI ) + 0xC ) ) { v51 = *( _DWORD *) _ESI ; *( float *)& v114 = ( v113 [ 0 ] + 1.0 ) * 0.5 * *( float *)(*( _DWORD *) _ESI + 0x273B4 ); Outvector = v114 ; *( float *)& v115 = 0.5 * ( 1.0 - v113 [ 1 ]) * *( float *)( v51 + 0x273B8 ); LODWORD ( ScreenY ) = v115 ; } }
looks like d3dxVec3Project if
_ESI + 0x50 or v49 is View*proj*world dunno if MatrixFunction_001 is matrixmultiply and 0x273B4 & 0x273B8 are pviewport->Width & Height
if not its using stated below
D3DXVec3Transform almost looks as similar as what mattdog posted i think.
Think this all matts doing havent tested it also anyone know why the check on w? I know for D3DXVec3TransformCoord what w would be dived into xyz why i was think it was vec3project since in ur calc and in function you divide by w but i dunno im tired lol and havent gotten to test it cuz my comp doesnt like bfbc2 :/
Code:
::D3DXVec3Transform(&Vector4D,&Origin,&m_Screen);
if(Vector4D.w < 0.0001f)
return FALSE;
out->x = CX + CX * Vector4D.x / Vector4D.w;
out->y = CY - CY * Vector4D.y / Vector4D.w;
return TRUE;
If you dont mind post a sig to this function so i can look at it further currently still working on vertexshader math(matrix algebra) and would love to look at this thnx
Last edited by fatboy88; 04-23-2010 at 11:07 AM .
fatboy88 is online now
04-25-2010, 12:03 AM
#31 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
k i just tested it finally, works fine same shit as mattdoggy dog posted just less lines and easier to look at
credz to mattdoggy dog
Code:
D3DXVec3Transform(&Vector4D,&Vector3D,&m_Render->Ptr->screen);
if(Vector4D.w > 0.0001f){
Vector2D.x = CX + CX * Vector4D.x/Vector4D.w;
Vector2D.y = CY - CY * Vector4D.y/Vector4D.w;
Last edited by fatboy88; 04-25-2010 at 12:06 AM .
fatboy88 is online now
05-06-2010, 11:19 AM
#32 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
gah 3 post in a row but soz i had to get it right :P
what that w2s is doing s0b
Code:
::D3DXVec3TransformCoord(&Vector3D,&player->vec,&m_Render->Ptr->screen);
Vector2D.x = Viewport.X + ( 1.0f + Vector3D.x ) * Viewport.Width / 2.0f;
Vector2D.y = Viewport.Y + ( 1.0f - Vector3D.y ) * Viewport.Height / 2.0f;
now to get the real usage im going for from this world*view*proj matrix mattdog found :3
Last edited by fatboy88; 05-06-2010 at 01:04 PM .
fatboy88 is online now
05-06-2010, 03:50 PM
#33 Level ∞ Coder
Join Date: Oct 2009
Posts: 584
Reputation: 18485 Rep Power: 224
Quote:
Originally Posted by
silverfish Just some example esp
Code:
bool ScreenProjectPoint(D3DXVECTOR3 *in, D3DXVECTOR3 *out)
{
const D3DXMATRIX &m_Screen = *(D3DXMATRIX *) &g_pGameRender->RenderData->WorldTransform;
D3DXVECTOR3 Origin = (*in);
float CX = static_cast< float >( CRender::Get()->ScreenW_1 ) / 2.0f;
float CY = static_cast< float >( CRender::Get()->ScreenH_1 ) / 2.0f;
FLOAT w = m_Screen.m [0][3] * Origin.x +
m_Screen.m [1][3] * Origin.y +
m_Screen.m [2][3] * Origin.z +
m_Screen.m [3][3];
if(w < 0.0001f)
return FALSE;
FLOAT x = m_Screen.m [0][0] * Origin.x +
m_Screen.m [1][0] * Origin.y +
m_Screen.m [2][0] * Origin.z +
m_Screen.m [3][0];
FLOAT y = m_Screen.m [0][1] * Origin.x +
m_Screen.m [1][1] * Origin.y +
m_Screen.m [2][1] * Origin.z +
m_Screen.m [3][1];
out->x = CX + CX * x / w;
out->y = CY - CY * y / w;
return TRUE;
}
if(!pFirst->Information->IsLocal())
{
D3DXVECTOR3 vLocalOrigin, vTargetOrigin;
GetOrigin( &vLocalOrigin, &pLocalPlayer->Soldier->PlayerViewMatrix );
GetOrigin( &vTargetOrigin, &pFirst->PlayerViewMatrix );
float flDistance = GetDistance( vLocalOrigin, vTargetOrigin );
D3DXVECTOR3 vScreen;
if( ScreenProjectPoint( &vTargetOrigin, &vScreen ) )
{
sprintf( cTargetInfo, "[%.1fm] %s", flDistance, pFirst->Information->Name );
if(pLocalPlayer->Team != pFirst->Information->Team)
{
ddraw.Text(vScreen.x, vScreen.y, Red, bold, DT_CENTER, cTargetInfo);
}else{
ddraw.Text(vScreen.x, vScreen.y, Blue, bold, DT_CENTER, cTargetInfo);
}
}
} note: puts tags on root of the player model
credits: s0beit, GHOSTER and dogmatt/mattdog
Hey silverfish..
I was wondering if you could post What g_pGameRender->RenderData->WorldTransform is?
Like what class is g_pGameRender? CRenderer? and RenderData? and What is world transform and where are the pointers to RenderData and WorldTransform in the classes?
The only thing Iv got problems with is the W2S
CyberDwak is offline
05-06-2010, 06:12 PM
#34 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
Quote:
Originally Posted by
CyberDwak Hey silverfish..
I was wondering if you could post What g_pGameRender->RenderData->WorldTransform is?
Like what class is g_pGameRender? CRenderer? and RenderData? and What is world transform and where are the pointers to RenderData and WorldTransform in the classes?
The only thing Iv got problems with is the W2S
BFBC2 esp
..................
and you really want to type all that math vs uses d3dx functions 0_o ? The games uses nothing original d3dxvec3project
Last edited by fatboy88; 05-06-2010 at 06:18 PM .
fatboy88 is online now
05-06-2010, 06:42 PM
#35 Level 3
Threadstarter Join Date: Dec 2006
Posts: 436
Reputation: 8917 Rep Power: 160
Quote:
Originally Posted by
fatboy88 BFBC2 esp
..................
and you really want to type all that math vs uses d3dx functions 0_o ? The games uses nothing original d3dxvec3project
I don't use the code I posted.
Quote:
Originally Posted by
CyberDwak Hey silverfish..
I was wondering if you could post What g_pGameRender->RenderData->WorldTransform is?
Like what class is g_pGameRender? CRenderer? and RenderData? and What is world transform and where are the pointers to RenderData and WorldTransform in the classes?
The only thing Iv got problems with is the W2S
Code:
// v529843
CGameRender* g_pGameRender = *(CGameRender**)0x01543234; Code:
class CRendererData
{
public:
char unknown0[32]; //0x0000
float fovx; //0x0020
float fovy; //0x0024
float cam_current; //0x0028
float zn; //0x002C
float zf; //0x0030
float aspect; //0x0034
char unknown56[40]; //0x0038
D3DXMATRIX LocalPlayerCamera; //0x0060
char unknown160[784]; //0x00A0
D3DXMATRIX WorldTransform; //0x03B0
D3DXMATRIX matrix_2; //0x03F0
D3DXMATRIX matrix_3; //0x0430
}; Code:
class CGameRender
{
public:
CRendererData* RenderData; //0x0000
};
Last edited by silverfish; 05-06-2010 at 06:54 PM .
silverfish is online now
05-06-2010, 09:08 PM
#36 Donator
Join Date: Sep 2007
Posts: 722
Reputation: 26481 Rep Power: 333
Points: 20,640, Level: 19
Last Achievements You got your W2S done in just 3 lines?
Great job!
Quote:
Originally Posted by
fatboy88 gah 3 post in a row but soz i had to get it right :P
what that w2s is doing s0b
Code:
::D3DXVec3TransformCoord(&Vector3D,&player->vec,&m_Render->Ptr->screen);
Vector2D.x = Viewport.X + ( 1.0f + Vector3D.x ) * Viewport.Width / 2.0f;
Vector2D.y = Viewport.Y + ( 1.0f - Vector3D.y ) * Viewport.Height / 2.0f;
now to get the real usage im going for from this world*view*proj matrix mattdog found :3
__________________
KozmoK
Kozmo is online now
05-07-2010, 01:56 AM
#37 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
Quote:
Originally Posted by
Kozmo You got your W2S done in just 3 lines?
Great job!
it wasnt about that it was recreating this
BFBC2 esp
I knew it was ve3project.
fatboy88 is online now
05-31-2010, 11:41 AM
#38 Senior Member Join Date: May 2010
Posts: 75
Reputation: 1601 Rep Power: 39
Last Achievements i am wondering why there isnīt a public external box esp for bc2?
the problem with aero is solved, no prob at all to bypass the overlay.
Nik0n is offline
06-10-2011, 11:43 AM
#39 Donator
Join Date: Aug 2006
Posts: 349
Reputation: 20839 Rep Power: 282
Points: 17,622, Level: 17
Last Achievements Quote:
Originally Posted by
dogmatt screen matrix: 0x3B0
SIG: (0x3A0 add matrixes base 0x10 = 0x3B0)
so final w2s PHP Code:
class CRendererPtr { public: CRenderer * Ptr ; //0x0000 }; class CRenderer { public: char unknown0 [ 32 ]; //0x0000 float fovx ; //0x0020 float fovy ; //0x0024 float a ; //0x0028 float zn ; //0x002C float zf ; //0x0030 float aspect ; //0x0034 char unknown56 [ 40 ]; //0x0038 float view ; //0x0060 char unknown100 [ 844 ]; //0x0064 float screen ; //0x03B0 }; CRendererPtr * m_Render = 0x1534540 bool CBF :: ScreenProjectPoint (const Vector & in , PINT out ) { const _MATRIX & m_Screen = *( _MATRIX *) & gEngine . m_Render -> Ptr -> screen ; Vector Origin = Vector ( in . x , in . z , in . y ); // backward set to XZY FLOAT w = m_Screen . m [ 0 ][ 3 ] * Origin . x + m_Screen . m [ 1 ][ 3 ] * Origin . y + m_Screen . m [ 2 ][ 3 ] * Origin . z + m_Screen . m [ 3 ][ 3 ]; if( w < 0.0001f ) return FALSE ; FLOAT x = m_Screen . m [ 0 ][ 0 ] * Origin . x + m_Screen . m [ 1 ][ 0 ] * Origin . y + m_Screen . m [ 2 ][ 0 ] * Origin . z + m_Screen . m [ 3 ][ 0 ]; FLOAT y = m_Screen . m [ 0 ][ 1 ] * Origin . x + m_Screen . m [ 1 ][ 1 ] * Origin . y + m_Screen . m [ 2 ][ 1 ] * Origin . z + m_Screen . m [ 3 ][ 1 ]; out [ 0 ] = g_Interface -> Screen . CenterX . f + g_Interface -> Screen . CenterX . f * x / w ; out [ 1 ] = g_Interface -> Screen . CenterY . f - g_Interface -> Screen . CenterY . f * y / w ; return TRUE ; }
[Auto Merged - 3:30:10 UTC]
Hey, great job on this code man!
I have a question though, whats up with this:
FLOAT w = m_Screen.m [0][3] * Origin.x +
m_Screen.m [1][3] * Origin.y +
m_Screen.m [2][3] * Origin.z +
m_Screen.m [3][3];
if(w < 0.0001f)
return FALSE; in my matrix m_Screen.m [0][3] means column 3 and row 0, however column 3 contains the w coordinates which are always 0, so the w2s returns all the time.
0 0 0 w <---- m_Screen.m[0][3] = w = 0
0 0 0 w <---- m_Screen.m[1][3] = w = 0
0 0 0 w <---- m_Screen.m[2][3] = w = 0
0 0 0 w <---- m_Screen.m[3][3] = w = 0
What am I missing here?
I have also tried using the function fatboy posted:
Code:
bool ESP::worldToScreen(D3DXVECTOR3* target, D3DXVECTOR4* out)
{
float CX = RENDERER->m_virtualWidth/2.0f;
float CY = RENDERER->m_virtualHeight/2.0f;
D3DXVec3Transform(out, target, &(WORLDRENDER->m_render->m_matrix));
if(out->w < 0.0001f)
return false;
out->x = CX + CX * out->x/out->w;
out->y = CY - CY * out->y/out->w;
return true;
} function call:
Code:
D3DXVECTOR3 pos = *(D3DXVECTOR3*)&target->m_controlledControllable->m_worldTransform->m_transform.trans;
D3DXVECTOR4 coords;
worldToScreen(&D3DXVECTOR3(pos.x, pos.z, pos.y), &coords);
Calling this function just prints the esp in the wrong positions near the top left corner of the screen.
Any help will be appreciated!
__________________
Quote:
Originally Posted by gna
yeah but what do u wanna do with own coords???? wallhack ur self?
Quote:
Originally Posted by
CypherPresents Sometimes the registers gets fucked up while randomly hooking from my experience so I always preserve and then pop before return.
I also always use a wrapper function in the hook to made it more stable.
Last edited by Tom M; 06-10-2011 at 12:32 PM .
Tom M is offline
06-10-2011, 09:20 PM
#40 Join Date: May 2005
Posts: 1,106
Reputation: 39002 Rep Power: 495
Quote:
Originally Posted by
Tom M Hey, great job on this code man!
WORLDRENDER->m_render->m_matrix
is that the viewProjection matrix? if not use viewprojection or multiply view matrix by the projection
fatboy88 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 01:06 AM .