🔒 Closed C++ crosshair made by:jasper

Status
Not open for further replies.

WhiteListv2

Enthusiast
Code:
#include<Windows.h>

voidCrosshair(int iLength,int iWidth,DWORD dwColour);bool bDrawCrosshair=true;

int main(){while(!GetAsyncKeyState(VK_ESCAPE)){if(GetAsyncKeyState(VK_F2)&1){
bDrawCrosshair=!bDrawCrosshair;}if(bDrawCrosshair){Crosshair(100,4,0x888888);//change the arguments of this call to get the crosshair like you want it to be}}}


voidCrosshair(int iLength,int iThickness,DWORD dwColour){
HDC hDC=GetDC(NULL);int iSW,iSH;
iSH=GetSystemMetrics(1)/2;
iSW=GetSystemMetrics(0)/2;for(int i=-iThickness/2;i!=iThickness/2+1;++i){for(int j=0;j!=iLength;++j){SetPixel(hDC,iSW+i,iSH-iLength/2+j,dwColour);SetPixel(hDC,iSW-iLength/2+j,iSH+i,dwColour);}}}

CREDIT BY:JASPER
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 6
    Replies
  • 798
    Views
  • 5
    Participants
Last reply from:
prideless22

Online now

Members online
534
Guests online
846
Total visitors
1,380

Forum statistics

Threads
2,275,113
Posts
28,960,696
Members
1,233,598
Latest member
H3ll0World
Back
Top