#include <windows.h>
#include <process.h>
#include "main.h"
bool pStatus = false;
unsigned int CurrentCharPointer = *(unsigned int*)0xB6F5F0;
void __cdecl func(void *pArg)
{
*reinterpret_cast<DWORD*>(0x004B35A0) = 0x560CEC83;
*reinterpret_cast<WORD*>(0x004B35A4) = 0xF18B;
while (true)
{
Sleep(50);
if (GetAsyncKeyState(0x47))
{
pStatus = !pStatus;
if (pStatus == true)
{
AddMessageJumpQ("~g~[ON]", 500, NULL, false); // 500 - ms
}
else
{
AddMessageJumpQ("~r~[OFF]", 500, NULL, false); // 500 - ms
}
}
if (pStatus == true)
{
*reinterpret_cast<BYTE*>(0x96916D) = 1; // bullet
*reinterpret_cast<BYTE*>(0xB7CEE6) = 1; // fire
*(unsigned char*)(CurrentCharPointer + 66) = 0xCC; // all
} else
{
*reinterpret_cast<BYTE*>(0x96916D) = 0; // bullet
*reinterpret_cast<BYTE*>(0xB7CEE6) = 0; // fire
*(unsigned char*)(CurrentCharPointer + 66) = 0; // all
}
}
}
BOOL WINAPI DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ PVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
_beginthread(func, NULL, nullptr);
}
return TRUE;
}