-
Notifications
You must be signed in to change notification settings - Fork 0
/
dllmain.cpp
45 lines (39 loc) · 1.14 KB
/
dllmain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
void PatchGame()
{
// Don't do anything until the game reports it has loaded to a certain stage //
while(*(int*)0xC8D4C0 < 9)
Sleep(10);
// On foot mouse camera //
memset((void*)0x523F4F, 0x0A, 1); // Vertical
memset((void*)0x524036, 0x0A, 1); // Horizontal
// In vehicle mouse camera //
memset((void*)0x525629, 0x0A, 1);
// CPad::GetLookLeft //
memset((void*)0x53FDD3, 0x0A, 1);
// CPad::GetLookRight //
memset((void*)0x53FE13, 0x0A, 1);
// CPad::GetLookBehindForCar //
memset((void*)0x53FE73, 0x0A, 1);
// CPad::GetLookBehindForPed //
memset((void*)0x5EFEC3, 0x0A, 1);
}
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)PatchGame, NULL, 0, 0);
}
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}