-
Автор темы
- #1
не работает fov не понимаю почему
вот код:
вот код:
C++:
// dllmain.cpp : Определяет точку входа для приложения DLL.
#include "pch.h"
#include "MinHook/MinHook.h"
#include "Windows.h"
#include <cstdio>
#include <iostream>
uintptr_t base = (uintptr_t)GetModuleHandle(NULL);
uintptr_t client_dll = (uintptr_t)GetModuleHandle("client.dll");
void CreateConsole()
{
AllocConsole();
FILE* f;
freopen_s(&f, "CONOUT$", "w", stdout);
}
void init()
{
MH_Initialize();
CreateConsole();
const uintptr_t localPlayerPawn = *(uintptr_t*)(client_dll + 0x1823A08);
const uintptr_t cameraServices = *(uintptr_t*)(localPlayerPawn + 0x1130);
if (!cameraServices)
return;
const bool isScoped = *(bool*)(localPlayerPawn + 0x22A0);
if (!isScoped && !localPlayerPawn != NULL)
{
*(int*)(cameraServices + 0x210) = 180;
}
}
DWORD WINAPI MainThread(LPVOID lpReserved)
{
CreateConsole();
init();
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, MainThread, 0, 0, 0);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}