Go Back   UnKnoWnCheaTs - Multiplayer Game Hacking and Cheats

  • Radar class Radar class
    sponsored advertisements
    Reply
     
    Thread Tools

    Radar class
    Old 15th February 2010, 12:17 PM   #1
    s0beit
    Master Contributor

    s0beit's Avatar

    Join Date: Oct 2005
    Location: Chicago
    Posts: 1,319
    Reputation: 50199
    Rep Power: 514
    s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!
    Points: 118,719, Level: 49
    Points: 118,719, Level: 49 Points: 118,719, Level: 49 Points: 118,719, Level: 49
    Level up: 59%, 2,181 Points needed
    Level up: 59% Level up: 59% Level up: 59%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar classRadar class
    Radar class

    Simple radar class, it uses D3D9 but it can operate without D3D9 (engine)

    Code:
    #ifndef __RADAR_HEADER__
    #define __RADAR_HEADER__
    
    class Radar
    {
    public:
    	
    	void SetWidth( int w );
    	void SetHeight( int h );
    	void SetX( int x );
    	void SetY( int y );
    
    	void SetBounds( int x, int y, int w, int h );
    
    	void Render( IDirect3DDevice9* pDevice );
    
    private:
    
    	bool CalcPoint( vec3_t Origin, int *cx, int *cy, float range );
    	bool IsInSpace( int x, int y );
    
    	int rx, ry, rw, rh;
    
    };
    
    #endif
    Code:
    #include "stdafx.h"
    #include "Radar.h"
    
    void Radar::SetWidth( int w ){ this->rw = w; }
    void Radar::SetHeight( int h ){ this->rh = h; }
    void Radar::SetX( int x ){ this->rx = x; }
    void Radar::SetY( int y ){ this->ry = y; }
    
    void Radar::SetBounds( int x, int y, int w, int h )
    {
    	SetX( x );
    	SetY( y );
    	SetWidth( w );
    	SetHeight( h );
    }
    
    void Radar::Render( IDirect3DDevice9* pDevice )
    {
    	D3DRender Render( pDevice );
    
    	//Radar Base
    	Render.Fill( rx, ry, rw, rh, D3DCOLOR_RGBA( 128, 128, 128, 255 ) );
    	Render.Outline( rx, ry, rw, rh, 1, D3DCOLOR_RGBA( 0, 0, 0, 255 ) );
    	Render.Fill( rx + ( rw / 2 ), ry, 1, rw, D3DCOLOR_RGBA( 0, 0, 0, 255 ) );
    	Render.Fill( rx, ry + ( rh / 2 ), rw, 1, D3DCOLOR_RGBA( 0, 0, 0, 255 ) );
    
    	refDef_t *pRef = GEngineHelper.GetRef();
    
    	if( pRef == NULL )
    		return;
    
    	entity_t *pLocalEntity = GEngineHelper.GetEntityByIndex( GEngineHelper.GetLocalIndex() );
    
    	if( pLocalEntity == NULL )
    		return;
    
    	client_info_t *pLocalInfo = GEngineHelper.GetClientInfoByIndex( GEngineHelper.GetLocalIndex() );
    
    	if( pLocalInfo == NULL )
    		return;
    
    	for( int i = 0; i < 18; i++ )
    	{
    		entity_t *pEntity = GEngineHelper.GetEntityByIndex( i );
    
    		if( pEntity == NULL )
    			continue;
    
    		client_info_t *pEntityInfo = GEngineHelper.GetClientInfoByIndex( i );
    
    		if( pEntityInfo == NULL )
    			continue;
    		
    		if( pEntity->IsAlive() == false )
    			continue;
    
    		if( pLocalEntity->Index == pEntity->Index )
    			continue;
    
    		int cx = 0, cy = 0;
    
    		if( CalcPoint( pEntity->Origin, &cx, &cy, 10.f ) == false )
    			continue;
    
    		D3DCOLOR RenderColor = ( pEntityInfo->IsOnSameTeam( pLocalInfo ) ) ? 
    			D3DCOLOR_RGBA( 0, 0, 255, 255 ) : D3DCOLOR_RGBA( 255, 0, 0, 255 );
    
    		cx -= 3;
    		cy -= 3;
    
    		Render.Outline( cx, cy, 6, 6, 1, D3DCOLOR_RGBA( 0, 0, 0, 255 ) );
    		Render.Fill( cx + 1, cy + 1, 5, 5, RenderColor );
    	}
    }
    
    bool Radar::CalcPoint( vec3_t vec, int *nx, int *ny, float flRange )
    {
    	float fy = ( D3DXToRadian( GEngineHelper.GetViewAngles()[ YAW ] ) - 180.f );
    	float fc = cos( fy );
    	float fs = sin( fy );
    
    	float dx = vec[ 0 ] - GEngineHelper.GetRef()->m_viewOrigin[ 0 ];
    	float dy = vec[ 1 ] - GEngineHelper.GetRef()->m_viewOrigin[ 1 ];
    
    	float px = dy * ( -fc ) + ( dx * fs );
    	float py = dx * ( -fc ) - ( dy * fs );
    
    	int irrx = ( rx + ( rw / 2 ) ) + int( px / flRange );
    	int irry = ( ry + ( rh / 2 ) ) + int( py / flRange );
    
    	if( IsInSpace( irrx, irry ) == false )
    		return false;
    
    	*nx = irrx;
    	*ny = irry;
    
    	return true;
    }
    
    bool Radar::IsInSpace( int x, int y )
    {
    	return ( ( x >= rx && y >= ry ) && ( x <= ( rx + rw ) && y <= ( ry + rh ) ) );
    }
    The D3DRender class simply handles some D3D9 rendering techniques, replace that with your engine drawing class/functions

    The colors are static, meaning you have to change them in the class, but ill upload a pic soon
    s0beit is offline
    Reply With Quote

    Old 15th February 2010, 03:15 PM   #2
    Ælius
    Master Contributor

    Ælius's Avatar

    Join Date: Sep 2005
    Location: The Netherlands
    Posts: 1,152
    Reputation: 33154
    Rep Power: 497
    Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!Ælius has a huge epeen!
    Recognitions Members who have contributed financial support towards UnKnoWnCheaTs. Donator (11)
    Awarded to members who have donated 10 times or more. Gratuity (1)
    The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote from community members, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month (1)
    Points: 62,050, Level: 36
    Points: 62,050, Level: 36 Points: 62,050, Level: 36 Points: 62,050, Level: 36
    Level up: 91%, 350 Points needed
    Level up: 91% Level up: 91% Level up: 91%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar class
    nice wurk
    Ælius is offline
    Reply With Quote

    Old 15th February 2010, 03:53 PM   #3
    SgtDrew
    Senior Member

    SgtDrew's Avatar

    Join Date: Sep 2008
    Posts: 84
    Reputation: 311
    Rep Power: 0
    SgtDrew has dreams of becoming a modSgtDrew has dreams of becoming a modSgtDrew has dreams of becoming a modSgtDrew has dreams of becoming a mod
    Very nice
    SgtDrew is offline
    Reply With Quote

    Old 15th February 2010, 04:19 PM   #4
    CallMeEclipse
    Hacked North Korea

    CallMeEclipse's Avatar

    Join Date: Jul 2009
    Location: California
    Posts: 2,312
    Reputation: 3662
    Rep Power: 386
    CallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating communityCallMeEclipse is a legend in the cheating community
    Recognitions Award symbolizing a retired staff member who dedicated a notable amount of time and effort to their past staff position. Former Staff
    Members who have contributed financial support towards UnKnoWnCheaTs. Donator (1)
    Points: 36,285, Level: 28
    Points: 36,285, Level: 28 Points: 36,285, Level: 28 Points: 36,285, Level: 28
    Level up: 99%, 15 Points needed
    Level up: 99% Level up: 99% Level up: 99%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar class
    Super-Terrific Neat-o job!
    __________________


    (12:07:17 AM) uNrEaL: One man's slap in the face is another man's slit throat
    CallMeEclipse is offline
    Reply With Quote

    Old 16th February 2010, 12:02 PM   #5
    Chod
    Supreme G0d

    Chod's Avatar

    Join Date: May 2007
    Posts: 355
    Reputation: 18340
    Rep Power: 434
    Chod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UC
    Points: 30,702, Level: 26
    Points: 30,702, Level: 26 Points: 30,702, Level: 26 Points: 30,702, Level: 26
    Level up: 12%, 1,498 Points needed
    Level up: 12% Level up: 12% Level up: 12%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar class
    On a mission to release your entire project feature-by-feature? :P
    Chod is offline
    Reply With Quote

    Old 17th February 2010, 06:01 PM   #6
    s0beit
    Master Contributor

    s0beit's Avatar

    Threadstarter
    Join Date: Oct 2005
    Location: Chicago
    Posts: 1,319
    Reputation: 50199
    Rep Power: 514
    s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!s0beit has a huge epeen!
    Points: 118,719, Level: 49
    Points: 118,719, Level: 49 Points: 118,719, Level: 49 Points: 118,719, Level: 49
    Level up: 59%, 2,181 Points needed
    Level up: 59% Level up: 59% Level up: 59%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar classRadar class
    not really, i just had a tiny bit of trouble converting it from source engine and thought i would save somebody some time, lol.

    honestly, other than detection i don't know whats stopping anybody from making a full, awesome hack.

    everything is on these boards.
    s0beit is offline
    Reply With Quote

    Old 17th February 2010, 06:10 PM   #7
    Chod
    Supreme G0d

    Chod's Avatar

    Join Date: May 2007
    Posts: 355
    Reputation: 18340
    Rep Power: 434
    Chod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UCChod Will always be a legend at UC
    Points: 30,702, Level: 26
    Points: 30,702, Level: 26 Points: 30,702, Level: 26 Points: 30,702, Level: 26
    Level up: 12%, 1,498 Points needed
    Level up: 12% Level up: 12% Level up: 12%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Last Achievements Radar classRadar classRadar classRadar class
    Quote:
    Originally Posted by s0beit View Post
    honestly, other than detection i don't know whats stopping anybody from making a full, awesome hack.
    lack of skills perhaps?
    Chod is offline
    Reply With Quote

    Old 17th February 2010, 06:47 PM   #8
    kolbybrooks
    Broken Moderator

    kolbybrooks's Avatar

    Join Date: Aug 2006
    Location: United States
    Posts: 792
    Reputation: 9311
    Rep Power: 449
    kolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATSkolbybrooks DEFINES UNKNOWNCHEATS
    Recognitions Award symbolizing a retired staff member who dedicated a notable amount of time and effort to their past staff position. Former Staff
    Points: 21,099, Level: 20
    Points: 21,099, Level: 20 Points: 21,099, Level: 20 Points: 21,099, Level: 20
    Level up: 19%, 1,301 Points needed
    Level up: 19% Level up: 19% Level up: 19%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Nawh, some people just keep some things to themselves.
    kolbybrooks is offline
    Reply With Quote

    Old 18th February 2010, 08:09 PM   #9
    sph4ck
    A God

    sph4ck's Avatar

    Join Date: Feb 2010
    Posts: 199
    Reputation: 367
    Rep Power: 348
    sph4ck is a cheater commited to the causesph4ck is a cheater commited to the causesph4ck is a cheater commited to the causesph4ck is a cheater commited to the cause
    Quote:
    Originally Posted by s0beit View Post
    Code:
        float fy = ( D3DXToRadian( GEngineHelper.GetViewAngles()[ YAW ] ) - 180.f );
    Awesome. Thanks a lot for the source. I am adding this to my BoxESP.

    What is exactly "YAW" in GetViewAngles()[ YAW ]?
    sph4ck is offline
    Reply With Quote

    Old 18th February 2010, 08:23 PM   #10
    .Encore
    Supreme G0d

    .Encore's Avatar

    Join Date: Dec 2009
    Posts: 384
    Reputation: 2731
    Rep Power: 355
    .Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community.Encore is a legend in the cheating community
    Points: 11,609, Level: 13
    Points: 11,609, Level: 13 Points: 11,609, Level: 13 Points: 11,609, Level: 13
    Level up: 47%, 691 Points needed
    Level up: 47% Level up: 47% Level up: 47%
    Activity: 0%
    Activity: 0% Activity: 0% Activity: 0%
    Code:
    #define PITCH      0
    #define YAW        1
    #define ROLL       2
    PITCH: up and down, YAW: left and right, ROLL: side to side

    .Encore is offline
    Reply With Quote

    Old 18th February 2010, 09:20 PM   #11
    sph4ck
    A God

    sph4ck's Avatar

    Join Date: Feb 2010
    Posts: 199
    Reputation: 367
    Rep Power: 348
    sph4ck is a cheater commited to the causesph4ck is a cheater commited to the causesph4ck is a cheater commited to the causesph4ck is a cheater commited to the cause
    Thanks a lot
    sph4ck is offline
    Reply With Quote
    Reply
    Similar Threads
    Thread Thread Starter Forum Replies Last Post
    [Help] Radar Help KronoteK C and C++ 2 27th December 2009 06:51 PM
    [C++ Class / Tutorial] Console Class nillenkäse 2.x Coding and Tutorials 2 27th April 2005 10:00 PM
    radar П€шв΀™ Renegade 4 11th January 2005 06:39 PM
    Helios Radar 6.0-engine radar tr1gga America's Army Operations 2.x 16 12th October 2004 03:35 AM

    Tags
    class, radar


    Forum Jump


    All times are GMT. The time now is 09:28 PM.

    Contact Us - Toggle Dark Theme
    Terms of Use Information Privacy Policy Information
    Copyright ©2000-2024, Unknowncheats™
    Radar class Radar class
    sponsored advertisement
    no new posts