[Need Help]Get the screen resolution

Posts 1–7 of 7 · Page 1 of 1
[Need Help]Get the screen resolution
Hi

I got a little problem : I can't have the screen resolution.
I think what i'm doing can work, but wr crash.
I tried to use GetDeviceCaps() and GetSystemMetrics() but wr crash.

How to figure it out ?
Do I need detour ? Because I think Hackshield hook this functions.

See my code :
Code:
void CheckScreen()
{
	if (GetAsyncKeyState(VK_F5))
	{
	hDC = GetDC(NULL);
	//ScreenX = GetSystemMetrics(SM_CXSCREEN) ;
	//ScreenY = GetSystemMetrics(SM_CYSCREEN);
	ScreenX = ScreenX / 2;
	ScreenY = ScreenY / 2 - 22;
	int tmp = ScreenX;
	MessageBox(0, (LPSTR)tmp, "Infos", MB_OK); // Just to be sure of the value
	}
}
You have any idea to get these infos ? I hope i'm wrong about HS ..

EDIT : Sorry, i got it.

It was because of the MessageBox function.
So your problem solved?
No ^^

My main problem is another one :
Make a Aimbot. I think i'm in good way.
I check the color of a pixel of the crosshair, and if it is red ( not really ), It send a right click.

But i have a problem :
It doesn't work.
Nothing happend. Just my CPU is becoming overloaded... And wr lagg.
That wouldn't be an aimbot, that would be a triggerbot?
Quote Originally Posted by larta View Post
No ^^

My main problem is another one :
Make a Aimbot. I think i'm in good way.
I check the color of a pixel of the crosshair, and if it is red ( not really ), It send a right click.

But i have a problem :
It doesn't work.
Nothing happend. Just my CPU is becoming overloaded... And wr lagg.
1. by making it look for the pixel it will be a triggerbot
2. you need to make it to left click or it wont work /
Yeah sorry, i little mistake, triggerbot, right ^^

I made it left click. ( Another mistake in my prev post xD Sorry )
But hmm nothing seems happen.

Here's my code :
Code:
{
INPUT structure;
structure.type = 0;
structure.mi.dwFlags = MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP;
structure.mi.time = 100;
color = GetPixel(hDC, ScreenX, ScreenY);
if (color == 0x2555151) //( RGB : 255, 51, 51)
	SendInput(1, &structure, sizeof(structure));
}
This is supposed to work.
ScreenX and ScreenY are the value of the wanted pixel, found in that way :
Code:
void CheckScreen()
{
	if (GetAsyncKeyState(VK_F5))
	{
	hDC = GetDC(NULL);
	ScreenX = GetSystemMetrics(SM_CXSCREEN) ;
	ScreenY = GetSystemMetrics(SM_CYSCREEN);
	ScreenX = ScreenX / 2;
	ScreenY = ScreenY / 2 - 22;
	}
}
Here, nothing happen.
Little push up ( no spam ! :P )
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us