Where an error in a code?

Posts 1–3 of 3 · Page 1 of 1
Where an error in a code?
Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <windows.h>

#define WeaponMgr 0x29995c0
#define NoReload 0x2644

void hacks()
{
    DWORD CShell = NULL;
    while(CShell==NULL)
    {
        CShell = (DWORD)GetModuleHandleA("CShell.dll");
        Sleep(100);
    }
    while(1)
    {
		DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);
	 

   if (pWeaponMgr)
   {
       for(int i=0; i<560; i++)
{
   if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
       *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoReload ) = 150;
}
   
	   }
   
       //do the main stuff here
        Sleep(100);
    }
}

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    if(fdwReason==DLL_PROCESS_ATTACH)
    {
		MessageBoxA(0, "Оффициальный сайт: Ommegen****\n\nАвтор: DdoosS\n\nБлагодарности: MegaR, Zedox, juLVeb\n\nДата релиза: 19.12.2011","Центурион v 1.0", 0);
        DisableThreadLibraryCalls(hinstDLL);
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)hacks, NULL, NULL, NULL);
        //U might wanna put a messagebox here
    }
    return TRUE; // succesful
}
I use this code. X-Trap doesn't close game and doesn't find mine dll, but game in 3-4 seconds after start itself is closed. Where an error in a code?
every where

---------- Post added at 04:03 PM ---------- Previous post was at 04:01 PM ----------

alse you are russian do you make the hack for cf russia bcs i saw the credits it's says somebody else so from where have c+p this ?
If I clean all functions from dll games isn't closed. As soon as I have added that game of functions is closed. I can't so I to add function?

---------- Post added at 09:08 AM ---------- Previous post was at 08:10 AM ----------

And what?
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us