bool AirStrike = false; bool Helicopter = false; DWORD AirStrikeTime; DWORD HelicopterTime; VOID WorldEsp( ) { FLOAT Screen[2]; for( int i=0; i < 5000; i++ ) { if( NadeEsp->integer == 1 ) { if( ( Game->cg_entities[i].currentState.eType == 4 && Game->cg_entities[i].currentState.eType != 0 && Game->cg_entities[i].currentValid == 1 ) ) { if( CG_WorldCoordToScreenCoordFloat( Game->cg_entities[i].lerpOrigin, &Screen[0], &Screen[1] ) ) { DrawEspString( Screen[0] - 5.0f, Screen[1] + 5.0f, consoleFont, "Grenade", colorRed ); } } } if( Helicopter->integer == 1 ) { if( ( Game->cg_entities[i].currentState.eType == 12 && Game->cg_entities[i].currentState.eType != 0 && Game->cg_entities[i].currentValid == 257 ) || ( Game->cg_entities[i].currentState.eType == 12 && Game->cg_entities[i].currentState.eType != 0 && Game->cg_entities[i].currentValid == 1 ) ) { AirStrikeTime = GetTickCount(); AirStrike = true; if( CG_WorldCoordToScreenCoordFloat( Game->cg_entities[i].lerpOrigin, &Screen[0], &Screen[1] ) ) { DrawEspString( Screen[0] - 5.0f, Screen[1] + 5.0f, consoleFont, "HeliCopter", colorRed ); } } } if( AirStrike->integer == 1 ) { if( ( Game->cg_entities[i].currentState.eType == 13 && Game->cg_entities[i].currentState.eType != 0 && Game->cg_entities[i].currentValid == 1 ) ) { HelicopterTime = GetTickCount(); Helicopter = true; if( CG_WorldCoordToScreenCoordFloat( Game->cg_entities[i].lerpOrigin, &Screen[0], &Screen[1] ) ) { DrawEspString( Screen[0] - 5.0f, Screen[1] + 5.0f, consoleFont, "Air Strike", colorRed ); } } } } if( Alerts->integer == 1 ) { if( AirStrike ) { if( GetTickCount( ) - AirStrikeTime > 5000 ) { DrawString( ScreenW / 2.0f - 200.0f, 200.0f, 2.5f, 2.5f, consoleFont, "Incoming Airstike", colorRed ); AirStrike = false; } } if( Helicopter ) { if( GetTickCount( ) - AirStrikeTime > 5000 ) { DrawString( ScreenW / 2.0f - 200.0f, 200.0f, 2.5f, 2.5f, consoleFont, "Incoming Helicopter", colorRed ); Helicopter = false; } } } }