Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 1337 Legit JasperXD Crosshair.cpp : Defines the exported functions for the DLL application.
- //
- #include "stdafx.h"
- #include <windows.h>
- #include <d3d9.h>
- #include <d3dx9.h>
- #pragma comment (lib,"d3d9")
- #pragma comment (lib,"d3dx9")
- float ScreenCenterX = 0.0f;//Horizontal Position
- float ScreenCenterY = 0.0f;//Vertical Position
- bool xhair = false;
- D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
- if (GetAsyncKeyState (VK_INSERT)&1)
- {
- xhair = !xhair;
- }
- if (xhair)
- {
- D3DVIEWPORT9 viewP;
- pDevice->GetViewport( &viewP );
- DWORD ScreenCenterX = viewP.Width / 2;
- DWORD ScreenCenterY = viewP.Height / 2;
- D3DRECT rect1 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+5, ScreenCenterY+1};
- D3DRECT rect2 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+1, ScreenCenterY+5};
- pDevice->Clear( 1, &rect1, D3DCLEAR_TARGET, color, 0, 0 );
- pDevice->Clear( 1, &rect2, D3DCLEAR_TARGET, color, 0, 0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment