- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D hacking programming reversing
You are Unregistered, please register to gain Full access.
hi can u have a look at my code and help me
08-10-2010, 09:57 PM
#1 Join Date: May 2010
Posts: 455
Reputation: -32375 Rep Power: 0
hi can u have a look at my code and help me hi this my code for d3d crosshair do see anything wrong with it tell
i add it the hotkey do u think is that the right way to do it
Code:
//Globals
float ScreenCenterX = 0.0f;//Horizontal Position
float ScreenCenterY = 0.0f;//Vertical Position
bool crosshair = false;
D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
//Add this SetViewport
ScreenCenterX = ( float )pViewport->Width / 2;
ScreenCenterY = ( float )pViewport->Height / 2;
//Add this in EndScene
if(crosshair)
{
D3DRECT rec2 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+2};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 2,ScreenCenterY+20};
m_pD3Ddev->Clear(1, &rec2, D3DCLEAR_TARGET,redt, 0, 0);
m_pD3Ddev->Clear(1, &rec3, D3DCLEAR_TARGET,redt, 0, 0);
if ((GetAsyncKeyState(VK_F9)&1))
crosshair = !crosshir thank helpe me plz
afg is offline
08-10-2010, 10:04 PM
#2 Retired Admin Join Date: Sep 2006
Posts: 5,249
Reputation: 93628 Rep Power: 1106
this code is full of typo's
when are you going to stop making threads for every problem you encounter while pasting stuff together, and actually learn to program?
learn_more is offline
08-10-2010, 10:39 PM
#3 Join Date: Jul 2009
Posts: 1,069
Reputation: 49961 Rep Power: 552
Nothing wrong with it, looks the same as were you copied it from.
Maybe it's time for you to learn what about whats on your clipboard.
C and C++ - UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials
Please don't make another thread like this.
__________________
Shad0w_'s Alter Ego
disavow is online now
08-11-2010, 12:47 AM
#4
Threadstarter Join Date: May 2010
Posts: 455
Reputation: -32375 Rep Power: 0
Quote:
Originally Posted by
Shad0w_
ok one morething how can i add geran and re colour to this surce
last qeustion
Code:
#include <windows.h>
#include <stdio.h>
#include <iostream>
using namespace std;
bool Clicker = false;
void LeftClick ( )
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 1, 1, 1, 1);
mouse_event(MOUSEEVENTF_LEFTUP, 1, 1, 1, 1);
}
int main(){
//char hi[100];
int x=0; int y=0;
int x1 = 177;
int x2 = 682;
int y1 = 273;
int y2 = 777;
POINT pos;
HDC hdc = GetDC(HWND_DESKTOP); //get window
COLORREF aPixel; //variable aPixel
COLORREF oPixel; //at first
COLORREF o2Pixel;
bool clearMe = true;
bool firsttime = true;
//177m273
//682 777
while(1) {
if(clearMe==true){
system("cls");
cout << "Clicker == " << Clicker ;
clearMe=false;
}
Sleep(100);
if ((GetAsyncKeyState(VK_F9)&1))
{
//sprintf(hi,"Clicker = %d",Clicker);
//MessageBox(0,hi,"har",0);
Clicker=!Clicker;
clearMe=true;
// MessageBox(0,"before GetCursor","",0);
if(firsttime==true){
GetCursorPos(&pos);
// MessageBox(0,"before GetPixel","",0);
oPixel = GetPixel(hdc,pos.x+2,pos.y+2);
o2Pixel= GetPixel(hdc,pos.x-21,pos.y-21);
firsttime =false;
}
}
if(Clicker==true){
for(y=y1;y<y2;y=y+10){
for(x=x1;x<x2;x=x+10){
aPixel = GetPixel(hdc,x,y);
if(aPixel==oPixel){
aPixel = GetPixel(hdc,x-21,y-21);
if(aPixel==o2Pixel){
SetCursorPos(x+13,y+13);
LeftClick();
x=x2;
y=y2;
}
}
}
}
//GetPixel(
}
}
return 0;
}
afg is offline
08-11-2010, 12:52 AM
#5 Level 3
Join Date: Jan 2009
Location: This Post
Posts: 328
Reputation: 9770 Rep Power: 140
Last Achievements Quote:
Originally Posted by
sam222 ok one morething how can i add geran and re colour to this surce
last qeustion
Code:
#include <windows.h>
#include <stdio.h>
#include <iostream>
using namespace std;
bool Clicker = false;
void LeftClick ( )
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 1, 1, 1, 1);
mouse_event(MOUSEEVENTF_LEFTUP, 1, 1, 1, 1);
}
int main(){
//char hi[100];
int x=0; int y=0;
int x1 = 177;
int x2 = 682;
int y1 = 273;
int y2 = 777;
POINT pos;
HDC hdc = GetDC(HWND_DESKTOP); //get window
COLORREF aPixel; //variable aPixel
COLORREF oPixel; //at first
COLORREF o2Pixel;
bool clearMe = true;
bool firsttime = true;
//177m273
//682 777
while(1) {
if(clearMe==true){
system("cls");
cout << "Clicker == " << Clicker ;
clearMe=false;
}
Sleep(100);
if ((GetAsyncKeyState(VK_F9)&1))
{
//sprintf(hi,"Clicker = %d",Clicker);
//MessageBox(0,hi,"har",0);
Clicker=!Clicker;
clearMe=true;
// MessageBox(0,"before GetCursor","",0);
if(firsttime==true){
GetCursorPos(&pos);
// MessageBox(0,"before GetPixel","",0);
oPixel = GetPixel(hdc,pos.x+2,pos.y+2);
o2Pixel= GetPixel(hdc,pos.x-21,pos.y-21);
firsttime =false;
}
}
if(Clicker==true){
for(y=y1;y<y2;y=y+10){
for(x=x1;x<x2;x=x+10){
aPixel = GetPixel(hdc,x,y);
if(aPixel==oPixel){
aPixel = GetPixel(hdc,x-21,y-21);
if(aPixel==o2Pixel){
SetCursorPos(x+13,y+13);
LeftClick();
x=x2;
y=y2;
}
}
}
}
//GetPixel(
}
}
return 0;
}
No one is going to help you C/P a source together. Stop begging and at least try.
CLOSED.
__________________
"Love for All and Sharing is the first step to solving all the problems of humanity. "
''The art of Wuju lives on in Master Yi, and is plunged through the hearts of his foes.'' -- Soraka, the Starchild ---------------------------------------------------------------------------- Anti-Cheat Software & Programming - Other FPS Games ---------------------------------------------------------------------------- SimPle01 is online now
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 08:24 PM .