Advertisement
Wolfrost

CSGO TraceLine

Apr 20th, 2016
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void DoTraceline()
  2. {
  3.     if (!Features::bTraceLine) return;
  4.     if (!Interfaces.Engine->IsInGame()) return;
  5.  
  6.     for (int iEntity = 0; iEntity < Interfaces.ClientEntList->GetHighestEntityIndex(); iEntity++)
  7.     {
  8.         CBaseEntity* CurrentEntity = Interfaces.ClientEntList->GetClientEntity(iEntity);
  9.  
  10.         if (CurrentEntity == me) continue;
  11.         if (CurrentEntity->Index() == Interfaces.Engine->GetLocalPlayer()) continue;
  12.         if (CurrentEntity->Health() <= 0) continue;
  13.         if (CurrentEntity->IsDormant()) continue;
  14.  
  15.         Vector W2Screen_Position;
  16.         if (WorldToScreen(CurrentEntity->Position(), W2Screen_Position))
  17.         {
  18.             Interfaces.Surface->DrawLine(ScreenW/2, 0, W2Screen_Position.x, W2Screen_Position.y);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement