UnliAmmo Memory Not Work, whats wrong?
>>#define ADR_MemUnliammo 0x00957F08
[HTML]
DWORD ammo;
void UnliAmmo()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PlayerPointer;
if(dwPlayerPtr != 0){
if (GetAsyncKeyState(VK_F8)) //record ammo
{
ammo = *(int*)ADR_Unliammo;
}
if(GetAsyncKeyState(VK_F5) &1) //on
{
*(int*)ADR_Unliammo = 0;
}
if(GetAsyncKeyState(VK_F6) &1) //off
{
*(int*)ADR_Unliammo = ammo ;
}
}}
[/HTML]
im already use Cpacth but not working!
[HTML]#include <windows.h>
#include "CPatch.h"
#define ADR_PlayerPointer 0x00
#define ADR_ServerPointer 0x00
#define ADR_Unliammo 0x00
CPatch pammo (ADR_Unliammo , 6);
DWORD *ingame= (DWORD*)ADR_PlayerPointer;
DWORD *outgame= (DWORD*)ADR_ServerPointer;
void ammoon()
{
if(GetAsyncKeyState(VK_F5) &1)
{
MessageBeep(MB_ICONINFORMATION);
*(int*)ADR_Unliammo= 6;
pammo.PatchOnce ((void *)"\x00\x00\x00\x00",4);
}
}
void ammooff()
{
if(GetAsyncKeyState(VK_F6) &1)
{
MessageBeep(MB_ICONINFORMATION);
*(int*)ADR_Unliammo= 0;
pammo.RestorePatch();
}
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
rapidfire();
invisible();
ammoon();
ammooff();
}
if(*outgame)
{
}
Sleep(200);
}
}
[/HTML]