Public feed #531943

Unnamed

public text v1 · immutable
Raw Edit
·published 2007-06-03 00:36 UTC
rendered paste body
void DrawESP( )
{
	FLOAT	Screen[2];

	for( int i=0; i<=64; i++ )
	{
		int		CurrentLine	=	0;

		vec3_t nameSpot = { 0, 0, 40.0f };
		VectorAdd( cg_entities[i].lerpOrigin, nameSpot, nameSpot );
	
		if( CG_WorldCoordToScreenCoordFloat( nameSpot, &Screen[0], &Screen[1] ) )
		{
			if( clientInfo[i].infoValid && cg_entities[i].currentState.clientNum != cg->clientNum )
			{
				if( clientInfo[cg_entities[i].currentState.clientNum].team != clientInfo[cg->clientNum].team )
				{
					if( cod2_names->value == 1 )
					{
						char name[50];
						sprintf_s( name, sizeof( name ), va( "=[ %s ]=", clientInfo[ cg_entities[i].currentState.clientNum ].name ) );
						re.DrawMyText( RCOLOR( name ), 100, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( name ) ) / 2 * 6 ), Screen[1], 0.90f, 0.90f, colorRed, 0 );
						CurrentLine++;
					}

					if( cod2_weap->value == 1 )
					{
						char weapon[50];
						sprintf_s( weapon, sizeof( weapon ), va( "=[ %s ]=", weaponInfo[cg_entities[i].currentState.clientNum].name ) );
						re.DrawMyText( RCOLOR( weapon ), 50, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( weapon ) ) / 2 * 6 ), Screen[1] + ( 11 * CurrentLine ), 0.90f, 0.90f, colorRed, 0 );
						CurrentLine++;
					}
			
					if( cod2_dist->value == 1 )
					{
						FLOAT Distance	= VectorDistance( cg->refdef.vieworg, nameSpot );
						char Dist[50];
						sprintf_s( Dist, sizeof( Dist ), va( "=[ %.0f ]=", Distance / 40 ) );
						re.DrawMyText( RCOLOR( Dist ), 50, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( Dist ) ) / 2 * 6 ), Screen[1] + ( 11 * CurrentLine ), 0.90f, 0.90f, colorRed, 0 );
						CurrentLine++;
					}
				}
				else if( clientInfo[cg_entities[i].currentState.clientNum].team == clientInfo[cg->clientNum].team )
				{
					if( cod2_names->value == 1 )
					{
						char name[50];
						sprintf_s( name, sizeof( name ), va( "=[ %s ]=", clientInfo[ cg_entities[i].currentState.clientNum ].name ) );
						re.DrawMyText( RCOLOR( name ), 100, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( name ) ) / 2 * 6 ), Screen[1], 0.90f, 0.90f, colorBlue, 0 );
						CurrentLine++;
					}

					if( cod2_weap->value == 1 )
					{
						char weapon[50];
						sprintf_s( weapon, sizeof( weapon ), va( "=[ %s ]=", weaponInfo[cg_entities[i].currentState.clientNum].name ) );
						re.DrawMyText( RCOLOR( weapon ), 50, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( weapon ) ) / 2 * 6 ), Screen[1] + ( 11 * CurrentLine ), 0.90f, 0.90f, colorBlue, 0 );
						CurrentLine++;
					}
			
					if( cod2_dist->value == 1 )
					{
						FLOAT Distance	= VectorDistance( cg->refdef.vieworg, nameSpot );
						char Dist[50];
						sprintf_s( Dist, sizeof( Dist ), va( "=[ %.0f ]=", Distance / 40 ) );
						re.DrawMyText( RCOLOR( Dist ), 50, consoleFont, Screen[0] - ( Q_PrintStrlen( RCOLOR( Dist ) ) / 2 * 6 ), Screen[1] + ( 11 * CurrentLine ), 0.90f, 0.90f, colorBlue, 0 );
						CurrentLine++;
					}
				}
			}
		}
	}
}




VOID R_DrawMyText( LPSTR text, INT len, INT font, FLOAT x, FLOAT y, FLOAT width, FLOAT height, PFLOAT color, INT flags )
{
	//Even if i do a font check its the same
	if( show )
	{
		if( cg->snap )
		{
			if( cod2_xhair->value == 1 )
			{
				re.DrawMyText( "+", -1, consoleFont, ( myw / 2 ) - 6, ( myh / 2 ) + 9, 1.3f, 1.3f, colorRed, 0 );
			}

			DrawESP( );
		}

		re.DrawMyText( " Call Of Duty 2 Hook", -1, consoleFont, ( myw / 2 ) - 100, myh / 35, 1.3f, 1.3f, colorRed, 0 );
		re.DrawMyText( "     By Mombatu     ", -1, consoleFont, ( myw / 2 ) - 100, myh / 20, 1.3f, 1.3f, colorRed, 0 );
	}

	re.DrawMyText( text, len, font, x, y, width, height, color, flags );
}