|
|
sponsored advertisements
|
|
24th February 2008, 09:49 PM
|
#1
|
|
BF2 D3D Radar Function
hey guys have fun.
screenshot:
http://img209.imagecrap.us/img209/507/screen007tg6.png
Code:
void Radarfunc(int x, int y, int width, int height, int r, int g, int b, int a)
{
fillrgba(x,y+height,width,1,r,g,b,a);
fillrgba(x-1,y-1,1,height+1,r,g,b,a);
fillrgba(x,y-1,width,1,r,g,b,a);
fillrgba(x+width,y-1,1,height+1,r,g,b,a);
int middley = (height-1)/2;
int middlex = (width-1)/2;
fillrgba(x,y+middley,width,1,r,g,b,a);
fillrgba(x+middlex,y-1,1,height+1,r,g,b,a);
int radary = y + middley;
int radarx = x + middlex;
vec3_t viewpoint,targetpoint,vright,vup,vforward,local,dot,viewangles;
if ( player_manager )
{
CPlayer *pLocalPlayer = player_manager->GetLocalPlayer();
if ( pLocalPlayer && pLocalPlayer->Alive )
{
VectorSet(vforward,pLocalPlayer->ViewMatrix->Matrix._31,pLocalPlayer->ViewMatrix->Matrix._32,pLocalPlayer->ViewMatrix->Matrix._33);
for ( int i = 0; i <= 255; i++ )
{
CPlayer *pPlayer = player_manager->GetPlayerByIndex( i );
if ( pPlayer != NULL )
{
if ( pPlayer->Alive && pPlayer != pLocalPlayer && !pPlayer->ManDown)
{
float drawx = (pPlayer->Info->PlayerInfo->px - pLocalPlayer->Info->PlayerInfo->px);
float drawy = (pPlayer->Info->PlayerInfo->pz - pLocalPlayer->Info->PlayerInfo->pz);
VectorAngles(vforward , viewangles);
float yaw = (viewangles[1] + 90) * (M_PI*2 / 360);
float rotx = drawy * cos(yaw) + drawx * sin(yaw);
float roty = drawx * cos(yaw) - drawy * sin(yaw);
if(fabs(drawx) < 75.0f && fabs(drawy) < 75.0f)
{
if( pPlayer->Team != pLocalPlayer->Team )
{
fillrgba(radarx + rotx,radary + roty,3,3,255,0,0,255);
}
else
{
fillrgba(radarx + rotx,radary + roty,3,3,0,0,255,255);
}
}
}
}
}
}
}
}
//=============================================
void Radar(int x, int y, int w, int h, int r, int g, int b, int a,int rr, int gg, int bb, int aa)
{
int ww = w + 1;
int hh = h + 1;
y = y - ((h-1)/2);
fillrgba(x,y,ww,hh ,rr,gg,bb,aa); // Body color
Radarfunc(x,y,ww,hh ,r ,g ,b ,a); // Body outline
}
//=============================================
I Called it in endscene like this:
Code:
int y = (float)oViewport.Height / 2 + oViewport.Y;
if(radar == true)
{
Radar(10, y, 150, 150, 0, 255, 255, 255, 0, 255, 0, 100);
}
Credits : gna , Pat0
rep me ;P
Last edited by Haxing4Life; 24th February 2008 at 10:07 PM.
|
Haxing4Life is offline
|
|
|
24th February 2008, 09:55 PM
|
#2
|
It's Ram Hot
|
Interesting, Got a screenie? Look's like you need the playermanager in order to use this stuff :x
|
Quicktime is offline
|
|
24th February 2008, 10:06 PM
|
#3
|
|
i added the screenshot yours haxing
|
Haxing4Life is offline
|
|
24th February 2008, 10:14 PM
|
#4
|
It's Ram Hot
|
Nice! And cool looking bone esp ... +Rep
I take it the PlayerManager is probably within Tetsuo's or Patrick's source?
|
Quicktime is offline
|
|
24th February 2008, 10:23 PM
|
#6
|
|
Quote:
Originally Posted by Quicktime
Nice! And cool looking bone esp ... +Rep
I take it the PlayerManager is probably within Tetsuo's or Patrick's source?
|
Code:
class CPlayerManager
{
public:
virtual void AddRef();
virtual int GetRef();
virtual void Release();
virtual void Function3();
virtual void Function4();
virtual void Function5();
virtual void Function6();
virtual void Function7();
virtual CPlayer* GetPlayerByIndex(int Index);
virtual void Function8();
virtual void Function9();
virtual void Function10();
virtual CPlayer* GetLocalPlayer();
char unknown0[8];
list<CPlayer*> player_list; //000C
//char unknown1[4];
//__int32 NumberOfPlayers; //0014
char unknown2[72];
CPlayer* LocalPlayer; //0060
};
class CPlayer
{
public:
virtual void AddRef();
virtual int GetRef();
virtual void Function0();
virtual void Function1();
virtual void Function2();
virtual void Function3();
virtual void Function4();
virtual void Function5();
virtual string* GetName();
char unknown0[84];
__int32 Kit; //0058
char unknown1[8];
char Name[28]; //0064
CInfo* Info; //0080
CViewMatrix* ViewMatrix; //0084
char unknown2[4];
BYTE Unknown3; //008C
BYTE CommanderMenu; //008D
BYTE CommanderMenu2; //008E
char unknown4[5];
float Unknown5; //0094
float Unknown6; //0098
float Unknown7; //009C
float Unknown8; //00A0
float Unknown9; //00A4
char unknown10[8];
__int32 Unknown11; //00B0
__int32 Spawned; //00B4
__int32 player_code; //00B8
char unknown12[4];
float FOV; //00C0
float Zoom; //00C4 zoom
float Zoomback; //00C8 zoomback
char unknown15[9];
BYTE Alive; //00D5
char unknown16[2];
__int32 Team; //00D8
__int32 Unknown17; //00DC
char unknown18[8];
BYTE ManDown; //00E8
char unknown19[3];
__int32 Unknown20; //00EC
__int32 Unknown21; //00F0
char unknown22[4];
DWORD Ping; //00F8
char unknown22a[4];
float Unknown23; //0100
char unknown24[8];
__int32 SquadNumber; //010C
BYTE Commander; //0110
BYTE SquadLeader; //0111
BYTE Unknown25; //0112
BYTE Unknown26; //0113
char unknown27[16];
BYTE InsideControlPoint; //0124
char unknown28[7];
float Unknown29; //012C
float CommanderRelated; //0130
char unknown30[44];
float Unknown31; //0160
__int32 SquadNumber2; //0164
char unknown32[4];
float Unknown33; //016C
char unknown34[23];
BYTE Sprinting; //0187
BYTE Sprinting_cur; //0188
char unknown35[11];
float Unknown36; //0194
char unknown37[16];
BYTE Unknown38; //01A8
char unknown39[7];
float Unknown40; //01B0
float Unknown41; //01B4
float Unknown42; //01B8
__int32 Unknown43; //01BC
char unknown44[12];
__int32 Unknown45; //01CC
char unknown46[8];
__int32 Unknown47; //01D8
char unknown48[8];
__int32 Unknown49; //01E4
char unknown50[20];
__int32 NumberOfReloads; //01FC
char unknown51[8];
__int32 Unknown52; //0208
char unknown53[32];
__int32 Unknown54; //022C
char unknown55[8];
__int32 TimesPressedShootButton; //0238
__int32 Ammo; //023C
char unknown56[8];
__int32 WeaponFireMode; //0248
char unknown57[8];
BYTE CanReload; //0254
char unknown58[3];
float WeaponHeatPrimary; //0258
float WeaponHeatSecondary; //025C
char unknown59[4];
__int32 Unknown60; //0264
char unknown61[60];
map<int,int>* Team1KitUnlocks; //02A4
char unknown62[8];
map<int,int>* Team2Unlocks; //02B0
char unknown63[20];
map<int,int>* Team1SelectedWeapons; //02C8
char unknown64[12];
map<int,int>* Team2SelectedWeapons; //02D8
char unknown65[16];
__int32 Unknown66; //02EC
__int32 Unknown67; //02F0
BYTE Unknown68; //02F4
char unknown69[1];
BYTE Unknown70; //02F6
char unknown71[1];
float Unknown72; //02F8
char unknown73[16];
float Unknown74; //030C
char unknown75[4];
BYTE Unknown76; //0314
char unknown77[15];
BYTE Unknown78; //0324
};
class CViewMatrix
{
public:
char unknown0[12];
float Unknown1; //000C
char unknown2[20];
float Unknown3; //0024
char unknown4[36];
float Unknown5; //004C
float Unknown6; //0050
float Unknown7; //0054
char unknown8[8];
float Unknown9; //0060
float Unknown10; //0064
char unknown11[80];
D3DXMATRIX Matrix; //00B8
};
class CInfo
{
public:
__int32 Unknown0; //0000
CPlayerInfo* PlayerInfo; //0004
};
class CPlayerInfo
{
public:
virtual void Function0();
BYTE Unknown0; //0004
char unknown1[15];
CVehicle* Vehicle; //0014
char unknown2[36];
CHealth* HealthInfo; //003C
char unknown3[72];
D3DXMATRIX BodyMatrix; //0088
char unknown9[8];
float Unknown10; //00D0
float Unknown11; //00D4
char unknown12[264];
BYTE SelectedWeapon; //01E0
char unknown13[27];
CKitWeapons* KitWeapons; //01FC
char unknown14[36];
float BodyYaw; //0224
float RightSpeed; //0228
float ForwardSpeed; //022C
__int32 Posture; //0230
__int32 Posture_cur; //0234
float HeadPitch; //0238
float HeadElevationChange; //023C
float HeadYaw; //0240
float HeadYawChange; //0244
char unknown15[4];
__int32 PostureKey; //024C
float Unknown17; //024D
float Unknown18; //0251
BYTE dwUnknown19[0x37];//0255
CSkeleton* soldier_skeleton3p; //0290
};
class CVehicle
{
public:
char unknown0[400];
char VehicleName[16]; //0190
};
class CHealth
{
public:
char unknown0[8];
CModelTemplate* ModelTemplante; //0008
char unknown1[4];
float Health; //0010
float Unknown2; //0014
float Height; //0018
__int32 FloorType1; //001C
__int32 FloorType2; //0020
char unknown3[12];
float Unknown4; //0030
float Unknown5; //0034
float Unknown6; //0038
float Unknown7; //003C
__int8 Unknown8; //0040
char unknown9[7];
float Unknown10; //0048
float Unknown11; //004C
float Unknown12; //0050
char unknown13[12];
float Unknown14; //0060
float Unknown15; //0064
};
class CModelTemplate
{
public:
};
class CSkeleton
{
public:
char unknown0[4];
CSkeletonInfo* unk_info; //0004
CBones* bones; //0008
char unknown1[4];
D3DXMATRIX* matrices; //000C
__int32 number_of_bones; //0010
};
class CSkeletonInfo
{
public:
D3DXMATRIX matrix; //0000
__int32 Unknown1; //0040
__int8 Unknown2; //0044
__int8 Unknown3; //0045
WORD Unknown4; //0046
};
class CBones
{
public:
__int32 bone_num; //0000
__int16 bone_code; //0004
__int16 parent; //0006
__int32 unknown; //0008
float offset_x; //000C
float offset_y; //0010
float offset_z; //0014
float length; //0018
float radius; //001C
__int32 material; //0020
};
there ya go
Quote:
Originally Posted by _GHOSTER_
That screenie was posted on GD, by blade2k or something of the sort.
|
thats true
btw bone esp is posted to.
Last edited by Haxing4Life; 24th February 2008 at 10:27 PM.
|
Haxing4Life is offline
|
|
|
25th February 2008, 02:52 PM
|
#9
|
|
Great, thank you for showing us how!
__________________
Been here for while.
|
presidant is offline
|
|
25th February 2008, 03:46 PM
|
#10
|
|
Quote:
Originally Posted by SeriouslyNotGay
It would be nice to have that radar painted direcly on minimap, anyone knows were minimap size rartio is stored?
Haxin,
Code:
list<CPlayer*> player_list; //000C
Is that equal to this offset: [[RendDX9 + 242AE0] + C] ?
That offset contains no data for me.. However i got a pointer to a player 4 bytes above that, but no list of players..?
|
this pointer is in the player manager !
yours haxing
|
Haxing4Life is offline
|
|
25th February 2008, 05:34 PM
|
#12
|
A Legend
Join Date: Oct 2006
Location: Netherland
Posts: 261
Reputation: 469
Rep Power: 430
Points: 12,298, Level: 13 |
Level up: 99%, 2 Points needed |
|
verry nice release haxing
__________________
7 reasons i hack
- To win
- To pwn you
- To piss you off
- I can
- There is more to it than just cheating
- I can always find you
- I can see you from accross the map.
|
regitbull is offline
|
|
25th February 2008, 05:54 PM
|
#13
|
|
Nice release Haxing4Life and good work to all three involved. I gave you some positive reputation although i was tempted not to because you asked for it.
Quote:
Originally Posted by boom[censored]
i do my radar differently
|
And, who cares? Unless you tell or show people how your post is just worthless (you don't even thank the author for his post).
Quote:
Originally Posted by boom[censored]
oh and LOL @ Quicktime nub
|
Why his he a 'nub' as you put it because he enquired about needing the player manager class to use it? You didn't reverse the engine so your a 'nub' too. You stood on the shoulders of other programmers to do what you can do so your a 'nub' too.
Quote:
Originally Posted by boom[censored]
does he really got admin ?
|
No, he is a super moderator and a good one at that, just because someone can code doesn't mean they will be a good staff member also. Quicktime has serveral good qualities about him that make him 10 times the member you are.
You can do or knew something he didn't, who cares.. Grow up..
__________________
I've learned that something constructive comes from every defeat.
Real programmers 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.
Learning is creation and not consumption. Knowledge is not something a learner absorbs, but something a learner creates.
The path to success is paved with small wins. Even the grandest and most glorious victories rest on a string of modest but constructive steps forward.
|
Roverturbo is offline
|
|
|
25th February 2008, 06:11 PM
|
#14
|
n00bie
Join Date: Feb 2008
Posts: 8
Reputation: -234
Rep Power: 0
|
lawl
why should i thank the author anyway ?
oh and better member ? all u members are the same leaching shit then share it between yall...
not the higher up member like you and many others but people like quicktime is a prime example
Last edited by boomskeet; 25th February 2008 at 06:16 PM.
|
boomskeet is offline
|
|
26th February 2008, 12:19 AM
|
#15
|
|
Quote:
Originally Posted by boom[censored]
lawl
why should i thank the author anyway ?
oh and better member ? all u members are the same leaching shit then share it between yall...
not the higher up member like you and many others but people like quicktime is a prime example
|
Well seeing has you posted in HIS thread, you could atleast of thanked or said something about his post instead of aload of useless chit-chat. "i do my radar differently" and? Perhaps elaborate or post something constructive atleast...
Maybe there are alot of leeching people here but if you understood the whole point of the site then that would make sense. The site offers hacks/knowledge for free hence people come here and leech from it, quite simple really. Some go a step further and move into development, but thats upto them. There is no rule that you must give to take, and if you don't like it then leave.
Plus don't even try and tell me you have not leeched anything in your past, i bet your first experience of hacking was using someone elses hack that you leeched. If you made your own then you leeched knowledge from a tutorial or some form of resource. You didn't wake up one day and have all the knowledge you need to develop hacks, you was a newbie and you was a leecher at one point in time...
Either way, i don't want to hijack this thread with pointless discussion so if you want to discuss this more then feel free to private message me anytime.
__________________
I've learned that something constructive comes from every defeat.
Real programmers 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.
Learning is creation and not consumption. Knowledge is not something a learner absorbs, but something a learner creates.
The path to success is paved with small wins. Even the grandest and most glorious victories rest on a string of modest but constructive steps forward.
|
Roverturbo is offline
|
|
|
26th February 2008, 01:11 AM
|
#16
|
Posting Well
Join Date: Aug 2007
Posts: 33
Reputation: 10
Rep Power: 407
|
Quote:
Originally Posted by Haxing4Life
this pointer is in the player manager !
yours haxing
|
Thanks for your replay, really.
But I got the PlayerManager and LocalPlayer offsets, I need an offset that points to the other players.
I expect some kind of player list, such as Player2 is some random bytes after Player1 but there all pointers got random number of bytes between. Like this, were its 44 bytes between Player1 & Player2 but 94 between Player2 & Player3.
Code:
PlayerManager + 30 ; + 0720 *-> Player1
PlayerManager + 30 ; + 0764 *-> Player2
PlayerManager + 30 ; + 07F8 *-> Player3
|
SeriouslyNotGay is offline
|
|
26th February 2008, 06:45 AM
|
#17
|
Master Contributor
|
Nice work h4l Our radar func is almost the same, xD
But I think n**bs who dont understand are just copying and pasting it......
R4z8r
|
R4z8r is offline
|
|
26th February 2008, 02:18 PM
|
#18
|
|
Quote:
Nice work h4l Our radar func is almost the same, xD
But I think n**bs who dont understand are just copying and pasting it......
R4z8r
|
ya if people dont understand it, id say its best to study this or atleast read up on the math involved
Quote:
Thanks for your replay, really.
But I got the PlayerManager and LocalPlayer offsets, I need an offset that points to the other players.
I expect some kind of player list, such as Player2 is some random bytes after Player1 but there all pointers got random number of bytes between. Like this, were its 44 bytes between Player1 & Player2 but 94 between Player2 & Player3.
|
are you talking about drawing your radar "on" the actual game minimap ?
easyest way is to just draw a "+" or sumshit where u think the centre of the minimap is top right and then draw to centre there then basic math to "cap" the length so it dont draws out of the circle on your minimap
think i might do this :P
also this is a better way of stopping drawing bigger than radar:
Code:
if(fabs(x)>range || fabs(y)>range)
{
// clipping
if(y>x)
{
if(y>-x) {
x = range*x/y;
y = range;
} else {
y = -range*y/x;
x = -range;
}
} else {
if(y>-x) {
y = range*y/x;
x = range;
} else {
x = -range*x/y;
y = -range;
}
}
}
this was orginally posted by bad hal 9000
from G-D (not sure if off site linking is allowed)
this is actually better in my opinion because it draws still at the edge of the radar so if its last man left etc u know which way to go and it deosnt just not draw
Last edited by Impulse.Caliber; 26th February 2008 at 02:21 PM.
|
Impulse.Caliber is offline
|
|
|
1st December 2008, 07:18 PM
|
#19
|
Hacker Cracker
|
Has anyone tried this yet? I have tried it on BF2 and BF2142 and it appears the radar is reversed. (enemings forward of you show on the south region of the radar map)
KozmoK
__________________
KozmoK
|
Kozmo is offline
|
|
2nd December 2008, 04:34 PM
|
#20
|
Join Date: Oct 2008
Posts: 283
Reputation: 175
Rep Power: 381
|
just a lil fyi... this was posted a long ass time ago.. but im sure its still useful
|
3p1c is offline
|
|
We strive to provide all our services for free and not interrupt your visit with overly intrusive advertisements or restrictions - support us by disabling your ad blocker or whitelisting our site.
All times are GMT. The time now is 08:46 PM.
|
|
sponsored advertisement |
| | |