So your problem solved?
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 :
You have any idea to get these infos ? I hope i'm wrong about HS ..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 } }
EDIT : Sorry, i got it.
It was because of the MessageBox function.
Last edited by larta; 11-28-2010 at 07:45 AM.
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?
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 :
This is supposed to work.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)); }
ScreenX and ScreenY are the value of the wanted pixel, found in that way :
Here, nothing happen.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; } }
Little push up ( no spam ! :P )