-
Автор темы
- #1
вроде с хедерами всё правильно сделал
C++:
namespace offsets {
// private sealed class IntroCutscene
namespace IntroCutscene {
auto isImpostor = 0x14; // public bool isImpostor;
};
// public class PlayerPhysics
namespace PlayerPhysics {
auto Speed = 0x28; // public float Speed;
auto GhostSpeed = 0x2C; // public float GhostSpeed;
};
};
C++:
#include "SetImpostor.h"
void amogus::setImpostor() {
if (config::makeImpostor)
gamevars::isImpostor = true;
else
gamevars::isImpostor = false;
}
C++:
#include "../src/game_sdk.h"
namespace amogus {
void setImpostor();
}
C++:
#include "../offsets.h"
#include "config.h"
#include "../framework.h"
// GameModule
DWORD gameModule = (DWORD)GetModuleHandle("GameAssembly.dll");
// Setup vars
namespace amogus {
namespace gamevars {
float speed = (float)(gameModule + offsets::PlayerPhysics::Speed);
bool isImpostor = (bool)(gameModule + offsets::IntroCutscene::isImpostor);
};
};
C++:
#include "../framework.h"
#include "../cheats/SetImpostor.h"
BOOL WINAPI mainfunc(HMODULE createmodule)
{
while (true)
{
amogus::setImpostor();
if (GetAsyncKeyState(VK_F1) & (1 << 0))
{
config::makeImpostor = true;
}
}
FreeLibraryAndExitThread(createmodule, 0);
return 0;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)mainfunc, 0, 0, 0);
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
C++:
namespace config {
static bool makeImpostor = false;
static bool customSpeed = false;
static float speed = 1.f;
}