вот код:
import pymem
import pymem.process
import time
m_iTeamNum = 0xF4
dwEntityList = 0x4D05AF4
pm = pymem.Pymem("csgo.exe")
clRender = 0x70
client = pymem.process.module_from_name(pm.process_handle, "client_panorama.dll")
dwGlowObjectManager = 0x5245F08
m_iGlowIndex = (0xA40C)
dwLocalPlayer = 0xCF3A4C
m_bDormant = 0xED
m_iTeamNum = 0xF4
m_vecOrigin = 0x138
m_iShotsFired = 0xA380
dwClientState_ViewAngles = 0x4D88
dwClientState = 0x58ECFC
clientState = pm.read_int(client.lpBaseOfDll + dwClientState)
m_viewPunchAngle = 0x3020
dwClientState_ViewAngles = 0x4D88
def normalizeAngles(viewAngleX, viewAngleY):
if viewAngleX < -89.0:
viewAngleX = 89.0
if viewAngleX > 89.0:
viewAngleX = 89.0
if viewAngleY < -180.0:
viewAngleY += 360.0
if viewAngleY > 180.0:
viewAngleY -= 360.0
oldAimPunchX = 0 # Initializing var (going to be used to store the last aimPunchX)
oldAimPunchY = 0 # Initializing var (going to be used to store the last aimPunchY)
RCSPerfectPercent=1000 # Defines how much RCS we are gonna do
while True:
localPlayer = pm.read_int(client.lpBaseOfDll + dwLocalPlayer)
print(pm.read_float(clientState + dwClientState_ViewAngles))
if pm.read_int(localPlayer + m_iShotsFired) > 1: # If we have fired more than 1 shots
viewAngleX = pm.read_float(clientState + dwClientState_ViewAngles) # Get the X viewAngle
viewAngleY = pm.read_float(clientState + dwClientState_ViewAngles + 0x4) # Get the Y viewAngle
aimPunchX = pm.read_float(localPlayer + m_viewPunchAngle) # Get the X aimPunch
aimPunchY = pm.read_float(localPlayer + m_viewPunchAngle + 0x4) # Get the Y aimPunch
viewAngleX -= (aimPunchX - oldAimPunchX) * (RCSPerfectPercent * 0.02) # Subtract our AimPunch from our ViewAngle
viewAngleY -= (aimPunchY - oldAimPunchY) * (RCSPerfectPercent * 0.02) # Subtract our AimPunch from our ViewAngle
print(viewAngleX,viewAngleY)
if viewAngleX < -89.0:
viewAngleX = 89.0
if viewAngleX > 89.0:
viewAngleX = 89.0
if viewAngleY < -180.0:
viewAngleY += 360.0
if viewAngleY > 180.0:
viewAngleY -= 360.0
pm.write_float(clientState + dwClientState_ViewAngles,viewAngleX)
pm.write_float(clientState + dwClientState_ViewAngles + 0x4,viewAngleY)
oldAimPunchX = aimPunchX
oldAimPunchY = aimPunchY
else:
oldAimPunchX = 0
oldAimPunchY = 0
time.sleep(0.01)
не знаю как пофиксить