GamerzPlanet - For All Your Online Gaming Needs!!

Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > ijji Games > Soldier Front > Soldier Front Hacks Discussion

Soldier Front Hacks Discussion Discuss anything about Soldier Front hacks. Soldier Front Aimbot, Soldier Front Wallhacks.



Making a cross hair wid C++ TUT

Soldier Front Hacks Discussion


Closed Thread
 
Thread Tools Display Modes
Old 08-03-2007, 07:08 PM   #1
Registered User
 
Last Online: 10-26-2008 03:36 AM
Join Date: Jun 2007
Posts: 207
Thanks: 9
Thanked 22 Times in 17 Posts
Ma44hew is on a distinguished road
iTrader: 0 / 0%
Points: 5,940.74
Bank: 0.00
Total Points: 5,940.74
Making a cross hair wid C++ TUT

With this code you can draw anything on your screen. In the example below a red crosshair is drawn in the centre of the screen. To turn it on or off press F10. To close it turn the crosshair off and press F11+F12.

code:
#include <windows.h>
bool stdcross=false;
bool on=true;
void crosshair();
void crosshair2();
void crosshair3();
void crosshair4();
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
HANDLE cross1, cross2, cross3, cross4; //multithreading
DWORD ThreadID; //get thread id

cross1 = CreateThread(NULL, //thread name
0,
(LPTHREAD_START_ROUTINE)
crosshair, //void name
NULL,
NULL,
&ThreadID);

cross2 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair2,
NULL,
NULL,
&ThreadID);

cross3 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair3,
NULL,
NULL,
&ThreadID);

cross4 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair4,
NULL,
NULL,
&ThreadID);

while(on){
Sleep(1);
if(GetAsyncKeyState(VK_F10)& (1==1)){
stdcross=!stdcross;
}
if(GetAsyncKeyState(VK_F11)& GetAsyncKeyState(VK_F12)){
on=false;
}
}
}

void crosshair(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN); //resolution
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2; //centre points
int pos2=cy/2;
HDC hwnd = GetDC(0); //needed to draw
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++) //draw a line 5 pixels long{
SetPixel(hwnd,pos1+xhair1,pos2,RGB(0,255,0)); //set each pixel
}
}
}
}
}

void crosshair2(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1-xhair1,pos2,RGB(0,255,0));
}
}
}
}
}

void crosshair3(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1,pos2+xhair1,RGB(0,255,0));
}
}
}
}
}

void crosshair4(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1,pos2-xhair1,RGB(0,255,0));
}
}
}
}
}
Ma44hew is offline  
The Following User Says Thank You to Ma44hew For This Useful Post:
kevinbronxx (08-03-2007)
Sponsored Links
Old 08-03-2007, 08:47 PM   #2
Registered User
 
Last Online: 08-18-2008 09:06 AM
Join Date: Nov 2006
Age: 27
Posts: 167
Thanks: 62
Thanked 29 Times in 13 Posts
kevinbronxx is on a distinguished road
iTrader: 0 / 0%
Points: 2,349.00
Bank: 0.00
Total Points: 2,349.00
Re: Making a cross hair wid C++ TUT

Sorry for not participating in the act, but is this the finished code?
kevinbronxx is offline  
Old 08-03-2007, 08:56 PM   #3
Registered User
 
Last Online: 11-21-2008 11:26 PM
Join Date: Feb 2007
Posts: 257
Thanks: 9
Thanked 17 Times in 9 Posts
spagetiebal is on a distinguished road
iTrader: 0 / 0%
Points: 10,675.30
Bank: 0.00
Total Points: 10,675.30
Re: Making a cross hair wid C++ TUT

where to set the code?
spagetiebal is offline  
Old 08-03-2007, 08:57 PM   #4
Registered User
 
Last Online: 11-21-2008 11:26 PM
Join Date: Feb 2007
Posts: 257
Thanks: 9
Thanked 17 Times in 9 Posts
spagetiebal is on a distinguished road
iTrader: 0 / 0%
Points: 10,675.30
Bank: 0.00
Total Points: 10,675.30
Re: Making a cross hair wid C++ TUT

#include <windows.h>
bool stdcross=false;
bool on=true;
void crosshair();
void crosshair2();
void crosshair3();
void crosshair4();
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
HANDLE cross1, cross2, cross3, cross4; //multithreading
DWORD ThreadID; //get thread id

cross1 = CreateThread(NULL, //thread name
0,
(LPTHREAD_START_ROUTINE)
crosshair, //void name
NULL,
NULL,
&ThreadID);

cross2 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair2,
NULL,
NULL,
&ThreadID);

cross3 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair3,
NULL,
NULL,
&ThreadID);

cross4 = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)
crosshair4,
NULL,
NULL,
&ThreadID);

while(on){
Sleep(1);
if(GetAsyncKeyState(VK_F10)& (1==1)){
stdcross=!stdcross;
}
if(GetAsyncKeyState(VK_F11)& GetAsyncKeyState(VK_F12)){
on=false;
}
}
}

void crosshair(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN); //resolution
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2; //centre points
int pos2=cy/2;
HDC hwnd = GetDC(0); //needed to draw
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++) //draw a line 5 pixels long{
SetPixel(hwnd,pos1+xhair1,pos2,RGB(0,255,0)); //set each pixel
}
}
}
}
}

void crosshair2(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1-xhair1,pos2,RGB(0,255,0));
}
}
}
}
}

void crosshair3(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1,pos2+xhair1,RGB(0,255,0));
}
}
}
}
}

void crosshair4(){
while(on){
Sleep(1);
if(stdcross){
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
int pos1=cx/2;
int pos2=cy/2;
HDC hwnd = GetDC(0);
while(stdcross && on){
Sleep(1);
for(int xhair1=5;xhair1<10;xhair1++){
SetPixel(hwnd,pos1,pos2-xhair1,RGB(0,255,0));
}
}
}
}
}




what to do with it?
spagetiebal is offline  
Old 08-03-2007, 09:06 PM   #5
Banned
 
Last Online: 10-06-2008 03:37 AM
Join Date: Jul 2007
Age: 19
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
nebez1 is on a distinguished road
iTrader: 0 / 0%
Points: 1,644.03
Bank: 0.00
Total Points: 1,644.03
Re: Making a cross hair wid C++ TUT

What do you think? You're supposed to compile it, durr.

Oh, and I haven't tested this myself so I don't even know if it works, but nice.
And you might want to replace TUT with CODE, because this isn't a tutorial, you just plain-out pasted the script.
nebez1 is offline  
Old 08-04-2007, 12:26 AM   #6
Registered User
 
Last Online: 10-26-2008 03:36 AM
Join Date: Jun 2007
Posts: 207
Thanks: 9
Thanked 22 Times in 17 Posts
Ma44hew is on a distinguished road
iTrader: 0 / 0%
Points: 5,940.74
Bank: 0.00
Total Points: 5,940.74
Re: Making a cross hair wid C++ TUT

Yes it is the full code.
Ma44hew is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT -7. The time now is 04:58 AM.


Powered by: vBulletin
Copyright ©2008, GamerzPlanet.Net
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Network: GamerzPlanet | ForumzPlanet | GzPUpload | GzPArcade | GzP Host | Australian Poker | Watch Desperate Housewives | Visits: