Jump to content

[CODE] CRadar (FAR ESP)


Syran0

Recommended Posts

radar based far esp

 

struct CRadarPlayer
{
__int32 bIsValid; //0000  -> not updating that much?!
char unknown0[12];
char Unknown1[32]; //0010
__int32 iTeam; //0030
__int32 iHealth; //0034
Vector vOrigin; //0038
QAngle qViewAngles; //0044
};

 

void __stdcall new_PaintTraverse(vgui::VPANEL vguiPanel, bool forceRepaint, bool allowForce)
{
_asm
{
	PUSH allowForce
	PUSH forceRepaint
	PUSH vguiPanel
	MOV ECX, g_pPanel
	CALL g_dwOrgPaintTraverse
}

//"MatSystemTopPanel"
const char* pszPanelName = g_pPanel->GetName(vguiPanel);
if(pszPanelName[0] == 'M' 
&& pszPanelName[3] == 'S' 
&& pszPanelName[9] == 'T'
&& pszPanelName[12] == 'P')
{
	CBaseEntity* pLocal = (CBaseEntity*)g_pEntList->GetClientEntity(g_pEngine->GetLocalPlayer());
	if(pLocal && pLocal->IsAlive() && g_pEngine->IsInGame())
	{
	    CRadarPlayer* pRadarPlayer = NULL;
	    player_info_t pInfo;
	    int iTeam = 0;
	    int r = 255, g = 255, b = 255;
	    Vector vPlayer, vScreen;
	    float fDistanceToPlayer;
	    float fBoxradius;

	    for(int index = 0; index < 32; index++)
	    {
	    	if(index == g_pEngine->GetLocalPlayer() - 1) continue;

	    	_asm
	    	{
	    		MOV ECX,DWORD PTR DS:[244035C0h]
	    		MOV EAX, index
	    		LEA EAX,DWORD PTR DS:[EAX+EAX*4]
	    		SHL EAX,6
	    		LEA EAX,DWORD PTR DS:[EAX+ECX+28h]
	    		MOV pRadarPlayer, EAX
	    	}

		    if(pRadarPlayer == NULL 
		    || (pRadarPlayer->vOrigin.x == 0 && pRadarPlayer->vOrigin.y == 0 && pRadarPlayer->vOrigin.z == 0)
		    || pRadarPlayer->iTeam == 0
		    || pRadarPlayer->iHealth == 0) continue;

	    	iTeam = pRadarPlayer->iTeam;

	    	vPlayer = pRadarPlayer->vOrigin;

		    if(vPlayer.z == (int)vPlayer.z) vPlayer.z += 32;
		    else vPlayer.z -= 32;

	    	if(gNeeded.GetVisible(pLocal->EyePosition(), vPlayer) == false)
	    	{
			    if(iTeam == 2)
			    {
			    	r = 255;
		    		g = 80;
			    	b = 60;
		    	}
		    	else if(iTeam == 3)
		    	{
		    		r = 80;
		    		g = 80;
		    		b = 255;
		    	}
			    else
			    {
			    	r = 255;
			    	g = 255;
			    	b = 255;
		    	}
		    }
		    else
		    {
			    if(iTeam == pLocal->GetTeamNumber())
			    {
			    	if(iTeam == 2)
			    	{
				    	r = 255;
				    	g = 80;
				    	b = 60;
				    }
				    if(iTeam == 3)
				    {
				    	r = 80;
				    	g = 80;
				    	b = 255;
			    	}
			    }
		    	else 
		    	{
		    		r = 150;
		    		g = 255;
		    		b = 60;
		    	}
	    	}

	    	if(gNeeded.WorldToScreen(vPlayer, vScreen))
	    	{
	    	    fDistanceToPlayer = gNeeded.GetDistance(pLocal->GetAbsOrigin(), vPlayer);
	    		fBoxradius = (100 / (fDistanceToPlayer / 100));

	    		g_pMatSystemSurface->DrawSetColor(r, g, b, 210);
	    		g_pMatSystemSurface->DrawOutlinedRect(vScreen.x - fBoxradius, vScreen.y - fBoxradius, vScreen.x + fBoxradius, vScreen.y + fBoxradius );
	    	}
	    }
	}
}
}

 

avitamin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • need to change it from database. Find the item with ID, and check the square stackable. After that need to find the item from txt file (maybe etcitem.grp) and make this <set name="consume_type" val="stackable" />.
    • Hello, please tell me how I can do this so that when I buy 10 D weapons, they will be in one stack. that's how there are 100 pieces in one nipple I already tried putting 10 pieces in one weapon in the store, but when I clicked on the TAB. they are purchased separately, 1 piece each, etc. Giran  Shop Galladucci  <npc>30097</npc> <!-- Galladucci (Weapon Merchant) --> <item>         <!-- Adena -->         <ingredient count="6680500" id="57" />         <!-- Heavy War Axe -->         <production count="10" id="91" />     </item> When I press TAB-Inventar weapons <!-- Heavy War Ax --> one each, and I need them to be in place x10
    • Is there a way to make it work on L2j Sunrise?  Is it possible to use other items to increse clan level like only donation coin as an alternate to the existing one.  Like this Clan lvl 1: 100coin, lvl2 200, lvl3 300 .... lvl 10 10000coin.   My base idea was, the clan members can buy a clan support coin from donation coin and auto deposited to the caln wh, and the leader leader can use this coint to level up the clan. Should i just forget it, maybe its possible? Im not great in programing, so I looking for help and, I hope some one like this idea.
    • Imbadon Essence server with the new High Elves update, don't miss the opening on April 19.   Grand Opening: April 19 Website: https://imbadon.com Discord Community: https://discord.gg/imbadon General Information and Features Rates: EXP x1, Adena x1 Update: High Elves Gearscore System Guaranteed Enchant System Custom Farm Zones: Imperial Tomb and Fafurion Temple Reworked Class balance Custom Solo, Clan and Party Instances Balanced stages with dynamic experience   Many players and clans are waiting for you on imbadon.com
    • Are you yearning for a connection that's both stimulating and intimate? Look no further than our premium live sex chat platform, where you'll encounter a diverse array of captivating women eager to engage in meaningful conversations and explore your deepest desires. Join our community today and discover the excitement of forging genuine connections with stunning individuals from around the globe.
  • Topics

×
×
  • Create New...