Results 1 to 4 of 4

Hybrid View

  1. #1
    JoEyHaX's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    6

    CoD4 2D Radar Code

    A Simple CoD4 2D Radar!

    Code:
    #include <windows.h>
    #include "Esp.h" 
    #include "Vector.h"
    #include "Menu.h" 
    #include "ClientHooks.h" 
    #include "Draw.h" 
    
    CRadar Radar;
    
    BOOL CRadar::WorldToRadar(CEntity_t *Ent, CEntity_t *LocalEnt, CClientInfo_t *Client, CClientInfo_t *LocalClient, float *Out )
    {
    	Vec3 rotation, 
    		view = { ref->VXPos, ref->VYPos, ref->VZPos },
    		aim = { Ent->pX, Ent->pY, Ent->pZ },
    		local = { ( aim[0] - view[0] ), ( aim[1] - view[1] ), ( aim[2] - view[2] ) }; 
    
    	if( (Ent->ClientNumber == cg->clientNum) || (!Ent->Alive) || (!Ent->IsValidEnt) )
    		return 0;
    
    	iMyTeam = LocalClient->Team; 
    	iPlayerTeam = Client->Team; 
    
    	local[2] = 0.0f; 
    
    	Distance = sqrt( local[0]*local[0] + local[1]*local[1] + local[2]*local[2] ) / 25; 
    
    	Vector.vectoangles( local, rotation ); 
    	rotation[1] = Vector.AngleNormalize180( rotation[1] - cg->Yaw );
    	Vector.AngleVectors( rotation, local, 0, 0 ); 
    	VectorScale( local, Distance, local );
    
    	if		( local[0] > 100.0f )	VectorScale( local, 100.0f  / local[0], local );
    	else if	( local[0] < -100.0f )	VectorScale( local, -100.0f / local[0], local ); 
    	if		( local[1] > 100.0f )	VectorScale( local, 100.0f  / local[1], local ); 
    	else if	( local[1] < -100.0f )	VectorScale( local, -100.0f / local[1], local ); 
    
    	Out[0] = (int)-local[1] + (iPosX + 105.0f);
    	Out[1] = (int)-local[0] + (iPosY + 105.0f);
    
    	return 1;
    } 
    
    VOID CRadar::DrawRadar()
    {
    	CClientInfo_t* Client, *LocalClient;
    	CEntity_t* Ent, *LocalEnt;
    	
    	Vec2 View = { ref->Viewport_Height, ref->Viewport_Width }; 
    
    	LocalClient = Esp.GetLocalClient();
    	LocalEnt = Esp.GetLocalClient(); 
    
    	iwidth = 210.0f;
    	iheight = iwidth;
    	iPosX = View[1] * 0.025f;
    	iPosY = View[0] * 0.39375f; 
    
    	DrawMyGui( iPosX, iPosY, iwidth, iheight, Menu.dwColor_Enabled ); 
    
    	for(int i = 0; i < _MAX_PLAYERS_; i++)
    	{
    		Ent = Esp.GetEntityByIndex( i );
    		Client = Esp.GetPlayerByIndex( i ); 
    
    		if(Ent->Alive && Ent->IsValidEnt && Ent->ClientNumber != iClient && Ent->iEntityType == TYPE_HUMAN )
    		{
    			if(WorldToRadar( Ent, LocalEnt, Client, LocalClient, Final ) )
    			{ 
    				bIsEnemy = (iPlayerTeam != iMyTeam) || (iMyTeam == NULL && iPlayerTeam == NULL); 
    
    				Draw.FillRgb( Final[0] - 1.0f, Final[1] - 1.0f, 5.5, 5.5, bIsEnemy ? tred : tlblue );
    			}
    		}
    	}
    }
    
    VOID CRadar::DrawMyGui( int iPosX, int iPosY, int iwidth, int iheight, DWORD dwColor )
    {
    	Draw.DrawRectangle( iPosX , iPosY, iwidth, iheight, 2.5, dwColor ); 
    
    	Draw.FillRgb( iPosX, iPosY, iwidth, iheight, 0, 0, 0, 80 ); 
    	Draw.FillRgb( iPosX, iPosY + (iwidth / 2), iwidth, 1.0f, dwColor ); 
    	Draw.FillRgb( iPosX + (iheight / 2), iPosY, 1.0f, iheight, dwColor );
    	Draw.FillRgb( iPosX + (iwidth / 2) - 1, iPosY + (iheight / 2) - 1, 4.0f, 4.0f, 255, 255, 255, 255 ); 
    }

    Have Fun,Enjoy

  2. #2
    quanta's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    where i can put it?

  3. #3
    broken's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Slovenia
    Posts
    51
    Reputation
    10
    Thanks
    3
    My Mood
    Yeehaw
    is this undetected by pb or not???

  4. #4
    tvojama's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    343
    My Mood
    Fine
    How is it user supposed #include files that he doesn't have?

Similar Threads

  1. [Source Code] CoD4 Simple ESP Code
    By JoEyHaX in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 3
    Last Post: 08-25-2012, 04:31 AM
  2. [Source Code] CoD4 Chams Source Code
    By JoEyHaX in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 7
    Last Post: 08-17-2012, 04:00 AM
  3. Want to sell COD4 original Key codes
    By anxigaffit in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 4
    Last Post: 02-04-2010, 02:15 AM
  4. Code Resets & COD4 Hacks
    By Dave84311 in forum Hack/Release News
    Replies: 1
    Last Post: 12-15-2007, 09:08 PM
  5. need:CSS,COD4 have:m60 golds and other legit codes
    By kakashii in forum Trade Accounts/Keys/Items
    Replies: 1
    Last Post: 11-25-2007, 05:14 AM