CSS .dll problem [lag]

Posts 1–10 of 10 · Page 1 of 1
CSS .dll problem [lag]
I did not make this, I had help making this code. It works and hacks work. But when I inject it, it lags a lot.. Is there a way not to make it lag, like adding a code?

Code:
#include <windows.h>

#define bypass 0x0DFAE744
#define wallhack 0x243AEC3C
#define smoke 0x243E7A3C
#define noflash 0x241D1D81
#define asuswall 0x0D8EB46C
#define nofog 0x243ECF1C

bool wallset = false;
bool smokeset = false;
bool noflashset = false;
bool asuswallset = false;
bool nofogset = false;

DWORD wall = wallhack;
DWORD sm = smoke;
DWORD fl = noflash;
DWORD as = asuswall;
DWORD nf = nofog;

void Hotkey()
{
	while(1)
	{
		if(GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(VkKeyScan('b')))
		{
			DWORD byp = bypass;
			*(DWORD*)byp = 0x1;
		}
		
		if(GetAsyncKeyState(VK_F1))
		{
			if(!wallset)
			{
				*(DWORD*)wall = 0x2;
				wallset = !wallset;
			} else {
				*(DWORD*)wall = 0x1;
				wallset = !wallset;
			}
        }
        
        if(GetAsyncKeyState(VK_F2))
		{         
			if(!smokeset)
			{
				*(DWORD*)sm = 0x0;
				smokeset = !smokeset;
			} else {
				*(DWORD*)sm = 0x1;
				smokeset = !smokeset;
			}
        }
        
        if(GetAsyncKeyState(VK_F3))
		{
			if(!noflashset)
			{
				*(DWORD*)fl = 0x276969;
				noflashset = !noflashset;
			} else {
				*(DWORD*)fl = 0x0;
				noflashset = !noflashset;
			}
		}
        
        if(GetAsyncKeyState(VK_F4))
		{
			if(!asuswallset)
			{
				*(DWORD*)as = 0x1;
				asuswallset = !asuswallset;
			} else {
				*(DWORD*)as = 0x0;
				asuswallset = !asuswallset;
			}
        }
        
        if(GetAsyncKeyState(VK_F5))
		{
			if(!nofogset)
			{
				*(DWORD*)nf = 0x0;
				nofogset = !nofogset;
			} else {
				*(DWORD*)nf = 0x1;
				nofogset = !nofogset;
			}
		}                                   

	}
}

bool APIENTRY DllMain(HINSTANCE hinst, DWORD reason, LPVOID asd)
{
	if(reason == DLL_PROCESS_ATTACH)
	{
		//MessageBox(NULL,"Injected","Injected",MB_OK);
		CreateThread(0,0,(LPTHREAD_START_ROUTINE)Hotkey,0,0,0);
	}
	return true;
}
I forgot to mention, it brings me fps to 15. Which is really low. I'm using xFaith's Valkyrie injector. Please help.
*Cough*.... >_>... how bout a sleep timer. /facepalm
Quote Originally Posted by why06 View Post
*Cough*.... >_>... how bout a sleep timer. /facepalm
uhm.. can you show me how to do that? :P
Quote Originally Posted by antonio007 View Post
uhm.. can you show me how to do that? :P
Sleep(timeInMillisecondsHere);

That easy, but make sure you put it in the right spot. Sleep(200) should suffice.
If you can code a hack then you should be able to add a sleep timer.
Quote Originally Posted by KABLE View Post
If you can code a hack then you should be able to add a sleep timer.
I did not make this, I had help making this code. It works and hacks work. But when I inject it, it lags a lot.. Is there a way not to make it lag, like adding a code?
That is all.
Quote Originally Posted by Void View Post
That is all.
TeeHee... Didn't see that

I must open thy eyes!
Add a sleep timer and set it to 200
200 always works well for me
thanks for the help guys.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us