diff --git a/README.md b/README.md index 045a90f..83bae00 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,4 @@ python .\main.py - No-flash - Radar hack - Trigger hack +- FOV diff --git a/cheat.py b/cheat.py index df2aae6..dd4dd9d 100644 --- a/cheat.py +++ b/cheat.py @@ -1,6 +1,7 @@ from cheats.aimbot import * from cheats.bhop import * from cheats.chams import * +from cheats.fov import * from cheats.glow import * from cheats.noflash import * from cheats.norecoil import * @@ -8,7 +9,7 @@ from cheats.radarhack import * from cheats.trigger import * -class Cheat(Bhop, Radarhack, Glow, Trigger, Norecoil, Noflash, Chams, Aimbot): +class Cheat(Bhop, Radarhack, Glow, Trigger, Norecoil, Noflash, Chams, Aimbot, Fov): def __init__(self) -> None: super().__init__() diff --git a/cheats/fov.py b/cheats/fov.py new file mode 100644 index 0000000..00bb0af --- /dev/null +++ b/cheats/fov.py @@ -0,0 +1,48 @@ +from hack import Hack +from win32api import GetAsyncKeyState + + +class Fov(Hack): + def __init__(self) -> None: + super().__init__() + + self.__fov = None + self.__factor = 5 + + def fov(self) -> None: + # Aliases + mem = self.pm + offset = self.offsets + + # Get module addresses + client = self.find_module("client") + + # Get local player + local_player = self.find_uint(client, offset["dwLocalPlayer"]) + + # Get FOV + self.__fov = self.find_uint(local_player, offset["m_iDefaultFOV"]) + + def cheat(): + if self.__fov == None: + raise ValueError("FOV isn't defined.") + fov = self.__fov + + # Reset FOV + if GetAsyncKeyState(self.vmap["END"]): + self.__fov = 90 + + # Increase FOV + elif GetAsyncKeyState(self.vmap["PAGE_UP"]) and self.__fov < 130: + self.__fov += self.__factor + + # Decrease FOV + elif GetAsyncKeyState(self.vmap["PAGE_DOWN"]) and self.__fov > 50: + self.__fov -= self.__factor + + # If modified + if fov != self.__fov: + mem.write_int( + local_player + offset["m_iDefaultFOV"], self.__fov) + + self.hack_loop(cheat) diff --git a/hack.py b/hack.py index 01dd635..03decaa 100644 --- a/hack.py +++ b/hack.py @@ -48,6 +48,9 @@ class Hack(): "SPACE": 0x20, "+": 0xBB, "LBUTTON": 0x01, + "END": 0x23, + "PAGE_UP": 0x21, + "PAGE_DOWN": 0x22, } def _find_process(self, verbose: bool = False) -> Pymem: