add FOV
This commit is contained in:
parent
071cc46afe
commit
616f6ddd6c
4 changed files with 54 additions and 1 deletions
|
@ -40,3 +40,4 @@ python .\main.py
|
|||
- No-flash
|
||||
- Radar hack
|
||||
- Trigger hack
|
||||
- FOV
|
||||
|
|
3
cheat.py
3
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__()
|
||||
|
||||
|
|
48
cheats/fov.py
Normal file
48
cheats/fov.py
Normal file
|
@ -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)
|
3
hack.py
3
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:
|
||||
|
|
Reference in a new issue