#include <windows.h>
#include <stdio.h>
#define Playerpointer 0x00CB11C8
#define Serverpointer 0x00B39BE0
#define OFS_NoRecoil_1 0x00000000
#define OFS_NoRecoil_2 0x00000004
#define OFS_NoRecoil_3 0x00000008
DWORD *ingame= (DWORD*)Playerpointer;
void recoil()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != NULL)
{
*(float*)(dwPlayerPtr + OFS_NORECOIL1) = 0;
*(float*)(dwPlayerPtr + OFS_NORECOIL2) = 0;
*(float*)(dwPlayerPtr + OFS_NORECOIL3) = 0;
}
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
}
if(*outgame)
{
norecoil();
}
Sleep(200);
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
}
return TRUE;
}
I was trying to make a simple no recoil. I typed this. I save and when I try to buil solution it gives me this: 1>------ Build started: Project: Norecoil_gladio30, Configuration: Debug Win32 ------
1>Compiling...
1>Norecoil_gladio30.cpp
1>c:\users\magalhães\documents\visual studio 2008\projects\norecoil_gladio30\norecoil_gladio30\ norecoil_gladio30.cpp(18) : error C2065: 'OFS_NORECOIL1' : undeclared identifier
1>c:\users\magalhães\documents\visual studio 2008\projects\norecoil_gladio30\norecoil_gladio30\ norecoil_gladio30.cpp(19) : error C2065: 'OFS_NORECOIL2' : undeclared identifier
1>c:\users\magalhães\documents\visual studio 2008\projects\norecoil_gladio30\norecoil_gladio30\ norecoil_gladio30.cpp(20) : error C2065: 'OFS_NORECOIL3' : undeclared identifier
1>c:\users\magalhães\documents\visual studio 2008\projects\norecoil_gladio30\norecoil_gladio30\ norecoil_gladio30.cpp(31) : error C2065: 'outgame' : undeclared identifier
1>c:\users\magalhães\documents\visual studio 2008\projects\norecoil_gladio30\norecoil_gladio30\ norecoil_gladio30.cpp(33) : error C3861: 'norecoil': identifier not found
1>Build log was saved at "file://c:\Users\Magalhães\Documents\Visual Studio 2008\Projects\Norecoil_gladio30\Norecoil_gladio30\ Debug\BuildLog.htm"
1>Norecoil_gladio30 - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========