├── README.md └── main.py /README.md: -------------------------------------------------------------------------------- 1 | # CS2_SoundESP 2 | Simple CS2 Sound ESP. 3 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | """ 2 | External CS2 Sound/Sonar ESP 3 | by im-razvan 4 | """ 5 | 6 | import pyMeow as pm 7 | from math import sqrt, inf 8 | from winsound import Beep 9 | from time import sleep 10 | 11 | class Config: 12 | distance = 1300 13 | 14 | class Offsets: # 3.01.2024 15 | dwEntityList = 0x17C1950 16 | dwLocalPlayerPawn = 0x16C8F38 17 | m_iTeamNum = 0x3BF 18 | m_iHealth = 0x32C 19 | m_vOldOrigin = 0x1224 20 | m_hPlayerPawn = 0x7EC 21 | 22 | class Entity: 23 | def __init__(self, proc, pawn): 24 | self.proc = proc 25 | self.pawn = pawn 26 | 27 | @property 28 | def team(self): 29 | return pm.r_int(self.proc, self.pawn + Offsets.m_iTeamNum) 30 | 31 | @property 32 | def health(self): 33 | return pm.r_int(self.proc, self.pawn + Offsets.m_iHealth) 34 | 35 | @property 36 | def position(self): 37 | return pm.r_vec3(self.proc, self.pawn + Offsets.m_vOldOrigin) 38 | 39 | def distance(player, entity): 40 | return sqrt((player["x"] - entity["x"])**2 + (player["y"] - entity["y"])**2 + (player["z"] - entity["z"])**2) 41 | 42 | def main(): 43 | proc = pm.open_process("cs2.exe") 44 | base = pm.get_module(proc, "client.dll")["base"] 45 | 46 | print("Started CS2 Sound ESP.") 47 | 48 | while True: 49 | EntityList = pm.r_uint64(proc, base + Offsets.dwEntityList) 50 | 51 | localPlayer = Entity(proc, pm.r_uint64(proc, base + Offsets.dwLocalPlayerPawn)) 52 | 53 | lowestDist = inf 54 | 55 | for i in range(1,64): 56 | listEntry = pm.r_uint64(proc, EntityList + (8 * (i & 0x7FFF) >> 9) + 16) 57 | if listEntry == 0: continue 58 | entity = pm.r_uint64(proc, listEntry + 120 * (i & 0x1FF)) 59 | if entity == 0: continue 60 | entityCPawn = pm.r_uint(proc, entity + Offsets.m_hPlayerPawn) 61 | if entityCPawn == 0: continue 62 | listEntry2 = pm.r_uint64(proc, EntityList + 0x8 * ((entityCPawn & 0x7FFF) >> 9) + 16) 63 | if listEntry2 == 0: continue 64 | entityPawn = pm.r_uint64(proc, listEntry2 + 120 * (entityCPawn & 0x1FF)) 65 | if entityPawn == 0: continue 66 | 67 | player = Entity(proc, entityPawn) 68 | 69 | if localPlayer.team != player.team and player.health > 0: 70 | dist = distance(localPlayer.position, player.position) 71 | if dist < lowestDist: 72 | lowestDist = dist 73 | 74 | if lowestDist < Config.distance: 75 | pitch = max(1500, 3300 - lowestDist) 76 | duration = max(150, lowestDist / 2) 77 | Beep(int(pitch), int(duration)) 78 | sleep(duration/2500) 79 | else: 80 | sleep(.5) 81 | 82 | 83 | if __name__ == "__main__": 84 | main() --------------------------------------------------------------------------------