OHK why not work?

Posts 1–12 of 12 · Page 1 of 1
OHK why not work?
Code:
// 111.cpp: определяет экспортированные функции для приложения DLL.
//

#include "stdafx.h"
#include<windows.h>


#define LtClient           0x795C0
#define dmg                    0x795C0





DWORD WINAPI Hacks(LPVOID)
{
    
    bool ammodmg = true;
 while(1)
    {
#define DamageAddy 0x7A4
#define WeaponMgr 0x795C0

DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);


if (ammodmg == 1)
{
 if (pWeaponMgr)
   {
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + dmg) = 9999999.0f; //Test value.
}}} 


 }}

bool Ready2Hook()
{
    if(GetModuleHandleA("CShell.dll")   != NULL
    && GetModuleHandleA("ClientFx.fxd") != NULL)
        return 1;
    return 0;
}

DWORD WINAPI Wait(LPVOID)
{
    while(!Ready2Hook()) Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
    return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
	
        MessageBoxA(0, "All ok.","OK.", 0);
	

	CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
    }
    return 1;
}
Why this code haven't effect in the game?
Maybe X-Trap block attach?
Help!
Wrong addys and wrong value:
value is 9999.f;
Quote Originally Posted by CFhackerfree View Post
Wrong addys and wrong value:
value is 9999.f;
Value for test,addys russians.
is this for cf ru? if yes must you make other base i idk but i mean this base is in cfru patched
stdafx.h
Code:
#include "stdafx.h"
In your main.cpp/.h
Code:
#include<windows.h>
#include "stdafx.h"

#define LtClient           0x795C0
#define dmg                    0x795C0
#define DamageAddy 0x7A4
#define WeaponMgr 0x795C0



   int ammodmg = 1;

DWORD WINAPI Hacks(LPVOID)
{
    
 while(1)
    {


DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);


if (ammodmg )
{
 if (pWeaponMgr)
   {
for(int i=0; i<559; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + dmg) = 9999.0f; //Test value.
}}} 


 }
       return 1;
}
bool Ready2Hook()
{
    if(GetModuleHandleA("CShell.dll")   != NULL
    && GetModuleHandleA("ClientFx.fxd") != NULL)
 
    return 0;
}

DWORD WINAPI Wait(LPVOID)
{
    while(!Ready2Hook()) Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
    return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
	
        MessageBoxA(0, "All ok.","OK.", 0);
	

	CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
    }
    return 1;
}
test this
Quote Originally Posted by [G]a[M]e[R] View Post
is this for cf ru? if yes must you make other base i idk but i mean this base is in cfru patched
stdafx.h
Code:
#include "stdafx.h"
In your main.cpp/.h
Code:
#include<windows.h>
#include "stdafx.h"

#define LtClient           0x795C0
#define dmg                    0x795C0
#define DamageAddy 0x7A4
#define WeaponMgr 0x795C0



   int ammodmg = 1;

DWORD WINAPI Hacks(LPVOID)
{
    
 while(1)
    {


DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);


if (ammodmg )
{
 if (pWeaponMgr)
   {
for(int i=0; i<559; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + dmg) = 9999.0f; //Test value.
}}} 


 }
       return 1;
}
bool Ready2Hook()
{
    if(GetModuleHandleA("CShell.dll")   != NULL
    && GetModuleHandleA("ClientFx.fxd") != NULL)
 
    return 0;
}

DWORD WINAPI Wait(LPVOID)
{
    while(!Ready2Hook()) Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
    return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
	
        MessageBoxA(0, "All ok.","OK.", 0);
	

	CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
    }
    return 1;
}
test this
Not work...
Code:
if (ammodmg )
{
 if (pWeaponMgr)
   {
for(int i=0; i<559; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + DamageAddy) = 9999.0f; //Test value.
}}}
test this
Quote Originally Posted by [G]a[M]e[R] View Post
Code:
if (ammodmg )
{
 if (pWeaponMgr)
   {
for(int i=0; i<559; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + DamageAddy) = 9999.0f; //Test value.
}}}
test this
Not work
maybe you have the wrong WeaponMgr?
Weapon Mgr Wrong /fp
Quote Originally Posted by Ryuesi View Post
Weapon Mgr Wrong /fp
Err, you know that this is Crossfire RU, right?
Also the Offset isn´t the same as the weapon pointer.
Quote Originally Posted by Ryuesi View Post
Weapon Mgr Wrong /fp
Offsets not wrong.
Quote Originally Posted by TBo9CMepTb View Post
Offsets not wrong.
dude
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?