コード例 #1
0
def recoil():
    oldpunchx = 0.0
    oldpunchy = 0.0
    player = getPlayer()
    engine_pointer = csgo.read_int(engine_dll + signatures["dwClientState"])
    if player:
        if csgo.read_int(player + netvars["m_iShotsFired"]) > 2:
            rcs_x = csgo.read_float(
                engine_pointer + signatures["dwClientState_ViewAngles"]
            )
            rcs_y = csgo.read_float(
                engine_pointer + signatures["dwClientState_ViewAngles"] + 0x4
            )
            punchx = csgo.read_float(player + netvars["m_aimPunchAngle"])
            punchy = csgo.read_float(player + netvars["m_aimPunchAngle"] + 0x4)
            newrcsx = rcs_x - (punchx - oldpunchx) * 0.02
            newrcsy = rcs_y - (punchy - oldpunchy) * 0.02
            oldpunchx = punchx
            oldpunchy = punchy
            if nanchecker(newrcsx, newrcsy) and checkangles(newrcsx, newrcsy):
                csgo.write_float(
                    engine_pointer + signatures["dwClientState_ViewAngles"], newrcsx
                )
                csgo.write_float(
                    engine_pointer + signatures["dwClientState_ViewAngles"] + 0x4,
                    newrcsy,
                )
        else:
            oldpunchx = csgo.read_float(player + netvars["m_aimPunchAngle"])
            oldpunchy = csgo.read_float(player + netvars["m_aimPunchAngle"] + 0x4)
            newrcsx = oldpunchx
            newrcsy = oldpunchy
コード例 #2
0
ファイル: aim.py プロジェクト: barbarbar338/hammer-csgo-hack
def aim():
    player = getPlayer()
    engine_dll_pointer = csgo.read_int(engine_dll +
                                       signatures["dwClientState"])
    if player:
        localTeam = csgo.read_int(player + netvars["m_iTeamNum"])
        olddistx = 111111111111
        olddisty = 111111111111
        for i in range(1, 32):
            entity = csgo.read_int(client_dll + signatures["dwEntityList"] +
                                   i * 0x10)
            if entity:
                entity_team_id = csgo.read_int(entity + netvars["m_iTeamNum"])
                entity_hp = csgo.read_int(entity + netvars["m_iHealth"])
                entity_dormant = csgo.read_int(entity +
                                               signatures["m_bDormant"])
                target_hp = 0
                target = None
                target_dormant = None
                target_x = 0
                target_y = 0
                target_z = 0
                if localTeam != entity_team_id and entity_hp > 0:
                    entity_bones = csgo.read_int(entity +
                                                 netvars["m_dwBoneMatrix"])
                    localpos_x_angles = csgo.read_float(
                        engine_dll_pointer +
                        signatures["dwClientState_ViewAngles"])
                    localpos_y_angles = csgo.read_float(
                        engine_dll_pointer +
                        signatures["dwClientState_ViewAngles"] + 0x4)
                    localpos1 = csgo.read_float(player +
                                                netvars["m_vecOrigin"])
                    localpos2 = csgo.read_float(player +
                                                netvars["m_vecOrigin"] + 4)
                    localpos_z_angles = csgo.read_float(
                        player + netvars["m_vecViewOffset"] + 0x8)
                    localpos3 = (
                        csgo.read_float(player + netvars["m_vecOrigin"] + 8) +
                        localpos_z_angles)
                    if config["aim_type"] == "body":
                        try:
                            entitypos_x = csgo.read_float(entity_bones +
                                                          0x30 * 5 + 0xC)
                            entitypos_y = csgo.read_float(entity_bones +
                                                          0x30 * 5 + 0x1C)
                            entitypos_z = csgo.read_float(entity_bones +
                                                          0x30 * 5 + 0x2C)
                        except:
                            continue
                    elif config["aim_type"] == "random":
                        try:
                            random_value = randint(3, 9)
                            entitypos_x = csgo.read_float(entity_bones +
                                                          0x30 * random_value +
                                                          0xC)
                            entitypos_y = csgo.read_float(entity_bones +
                                                          0x30 * random_value +
                                                          0x1C)
                            entitypos_z = csgo.read_float(entity_bones +
                                                          0x30 * random_value +
                                                          0x2C)
                        except:
                            continue
                    elif config["aim_type"] == "legit":
                        try:
                            legit_range = randint(4, 8)
                            entitypos_x = csgo.read_float(entity_bones +
                                                          0x30 * legit_range +
                                                          0xC)
                            entitypos_y = csgo.read_float(entity_bones +
                                                          0x30 * 4 + 0x1C)
                            entitypos_z = csgo.read_float(entity_bones +
                                                          0x30 * legit_range +
                                                          0x2C)
                        except:
                            continue
                    else:
                        try:
                            entitypos_x = csgo.read_float(entity_bones +
                                                          0x30 * 8 + 0xC)
                            entitypos_y = csgo.read_float(entity_bones +
                                                          0x30 * 5 + 0x1C)
                            entitypos_z = csgo.read_float(entity_bones +
                                                          0x30 * 8 + 0x2C)
                        except:
                            continue
                    X, Y = calcangle(
                        localpos1,
                        localpos2,
                        localpos3,
                        entitypos_x,
                        entitypos_y,
                        entitypos_z,
                    )
                    newdist_x, newdist_y = calc_distance(
                        localpos_x_angles, localpos_y_angles, X, Y)
                    if (newdist_x < olddistx and newdist_y < olddisty
                            and newdist_x <= config["aim_fov"]
                            and newdist_y <= config["aim_fov"]):
                        olddistx, olddisty = newdist_x, newdist_y
                        target, target_hp, target_dormant = (
                            entity,
                            entity_hp,
                            entity_dormant,
                        )
                        target_x, target_y, target_z = (
                            entitypos_x,
                            entitypos_y,
                            entitypos_z,
                        )
                        if keyboard.is_pressed(config["aim_key"]) and player:
                            if target and target_hp > 0 and not target_dormant:
                                localpos1 = csgo.read_float(
                                    player + netvars["m_vecOrigin"])
                                localpos2 = csgo.read_float(
                                    player + netvars["m_vecOrigin"] + 4)
                                localpos_z_angles = csgo.read_float(
                                    player + netvars["m_vecViewOffset"] + 0x8)
                                localpos3 = (csgo.read_float(
                                    player + netvars["m_vecOrigin"] + 8) +
                                             localpos_z_angles)

                                pitch, yaw = calcangle(
                                    localpos1,
                                    localpos2,
                                    localpos3,
                                    target_x,
                                    target_y,
                                    target_z,
                                )
                                if nanchecker(pitch, yaw):
                                    normalize_x, normalize_y = normalizeAngles(
                                        pitch, yaw)
                                    punchx = csgo.read_float(
                                        player + netvars["m_aimPunchAngle"])
                                    punchy = csgo.read_float(
                                        player + netvars["m_aimPunchAngle"] +
                                        0x4)
                                    Commands = csgo.read_int(
                                        client_dll + signatures["dwInput"] +
                                        0xF4)
                                    VerifedCommands = csgo.read_int(
                                        client_dll + signatures["dwInput"] +
                                        0xF8)
                                    Desired = (csgo.read_int(
                                        engine_dll_pointer + signatures[
                                            "clientstate_last_outgoing_command"]
                                    ) + 2)
                                    OldUser = Commands + (
                                        (Desired - 1) % 150) * 100
                                    VerifedOldUser = (VerifedCommands + (
                                        (Desired - 1) % 150) * 0x68)
                                    m_buttons = csgo.read_int(OldUser + 0x30)
                                    Net_Channel = csgo.read_uint(
                                        engine_dll_pointer +
                                        signatures["clientstate_net_channel"])
                                    if config["aim_lock_type"] == "silent":
                                        csgo.write_uchar(
                                            engine_dll +
                                            signatures["dwbSendPackets"], 0)
                                        if csgo.read_int(Net_Channel +
                                                         0x18) >= Desired:
                                            csgo.write_float(
                                                OldUser + 0x0C, normalize_x)
                                            csgo.write_float(
                                                OldUser + 0x10, normalize_y)
                                            csgo.write_int(
                                                OldUser + 0x30,
                                                m_buttons | (1 << 0))
                                            csgo.write_float(
                                                VerifedOldUser + 0x0C,
                                                normalize_x,
                                            )
                                            csgo.write_float(
                                                VerifedOldUser + 0x10,
                                                normalize_y,
                                            )
                                            csgo.write_int(
                                                VerifedOldUser + 0x30,
                                                m_buttons | (1 << 0),
                                            )
                                            csgo.write_uchar(
                                                engine_dll +
                                                signatures["dwbSendPackets"],
                                                1,
                                            )
                                        else:
                                            csgo.write_uchar(
                                                engine_dll +
                                                signatures["dwbSendPackets"],
                                                1,
                                            )
                                    elif config[
                                            "aim_lock_type"] == "silentrcs":
                                        csgo.write_uchar(
                                            engine_dll +
                                            signatures["dwbSendPackets"], 0)
                                        if csgo.read_int(Net_Channel +
                                                         0x18) >= Desired:
                                            csgo.write_float(
                                                OldUser + 0x0C, normalize_x)
                                            csgo.write_float(
                                                OldUser + 0x10, normalize_y)
                                            csgo.write_int(
                                                OldUser + 0x30,
                                                m_buttons | (1 << 0))
                                            csgo.write_float(
                                                VerifedOldUser + 0x0C,
                                                normalize_x - (punchx * 2),
                                            )
                                            csgo.write_float(
                                                VerifedOldUser + 0x10,
                                                normalize_y - (punchy * 2),
                                            )
                                            csgo.write_int(
                                                VerifedOldUser + 0x30,
                                                m_buttons | (1 << 0),
                                            )
                                            csgo.write_uchar(
                                                engine_dll +
                                                signatures["dwbSendPackets"],
                                                1,
                                            )
                                        else:
                                            csgo.write_uchar(
                                                engine_dll +
                                                signatures["dwbSendPackets"],
                                                1,
                                            )
                                    else:
                                        csgo.write_float(
                                            engine_dll_pointer + signatures[
                                                "dwClientState_ViewAngles"],
                                            normalize_x,
                                        )
                                        csgo.write_float(
                                            engine_dll_pointer + signatures[
                                                "dwClientState_ViewAngles"] +
                                            0x4,
                                            normalize_y,
                                        )
コード例 #3
0
def change_skin():
    akpaint = skins[0]
    awppaint = skins[1]
    usppaint = skins[2]
    deaglepaint = skins[3]
    glockpaint = skins[4]
    fivepaint = skins[5]
    ppaint = skins[6]
    tecpaint = skins[7]
    mapaint = skins[8]
    mspaint = skins[9]
    galilpaint = skins[10]
    famaspaint = skins[11]
    augpaint = skins[12]
    sgpaint = skins[13]
    scoutpaint = skins[14]
    macpaint = skins[15]
    mpsevpaint = skins[16]
    mpninpaint = skins[17]
    pppaint = skins[18]
    pneunpaint = skins[19]
    umppaint = skins[20]
    magpaint = skins[21]
    novpaint = skins[22]
    sawpaint = skins[23]
    xmpaint = skins[24]
    engine_dll_state = csgo.read_int(engine_dll + signatures["dwClientState"])
    while True:
        if (
            not GetWindowText(GetForegroundWindow())
            == "Counter-Strike: Global Offensive"
        ):
            time.sleep(1)
            continue
        local_player = getPlayer()
        if local_player == 0:
            continue
        for i in range(0, 8):
            my_weapons = (
                csgo.read_int(local_player + netvars["m_hMyWeapons"] + (i - 1) * 0x4)
                & 0xFFF
            )
            weapon_address = csgo.read_int(
                client_dll + signatures["dwEntityList"] + (my_weapons - 1) * 0x10
            )
            if weapon_address:
                weapon_id = csgo.read_int(
                    weapon_address + netvars["m_iItemDefinitionIndex"]
                )
                weapon_owner = csgo.read_int(
                    weapon_address + netvars["m_OriginalOwnerXuidLow"]
                )
                seed = 420
                if weapon_id == 7:
                    fallbackpaint = akpaint
                    seed = 661
                elif weapon_id == 9:
                    fallbackpaint = awppaint
                    seed = 420
                elif weapon_id == 61:
                    fallbackpaint = usppaint
                    seed = 420
                elif weapon_id == 1:
                    fallbackpaint = deaglepaint
                    seed = 420
                elif weapon_id == 4:
                    fallbackpaint = glockpaint
                    seed = 420
                elif weapon_id == 3:
                    fallbackpaint = fivepaint
                    seed = 420
                elif weapon_id == 36:
                    fallbackpaint = ppaint
                    seed = 420
                elif weapon_id == 30:
                    fallbackpaint = tecpaint
                    seed = 420
                elif weapon_id == 16:
                    fallbackpaint = mapaint
                elif weapon_id == 60:
                    fallbackpaint = mspaint
                elif weapon_id == 13:
                    fallbackpaint = galilpaint
                elif weapon_id == 10:
                    fallbackpaint = famaspaint
                elif weapon_id == 262152:
                    fallbackpaint = augpaint
                elif weapon_id == 39:
                    fallbackpaint = sgpaint
                elif weapon_id == 40:
                    fallbackpaint = scoutpaint
                elif weapon_id == 17:
                    fallbackpaint = macpaint
                elif weapon_id == 33:
                    fallbackpaint = mpsevpaint
                elif weapon_id == 34:
                    fallbackpaint = mpninpaint
                elif weapon_id == 26:
                    fallbackpaint = pppaint
                elif weapon_id == 19:
                    fallbackpaint = pneunpaint
                elif weapon_id == 24:
                    fallbackpaint = umppaint
                elif weapon_id == 27:
                    fallbackpaint = magpaint
                elif weapon_id == 35:
                    fallbackpaint = novpaint
                elif weapon_id == 262173:
                    fallbackpaint = sawpaint
                elif weapon_id == 25:
                    fallbackpaint = xmpaint
                else:
                    continue
                csgo.write_int(weapon_address + netvars["m_iItemIDHigh"], -1)
                csgo.write_int(
                    weapon_address + netvars["m_nFallbackPaintKit"], fallbackpaint
                )
                csgo.write_int(weapon_address + netvars["m_iAccountID"], weapon_owner)
                csgo.write_int(weapon_address + netvars["m_nFallbackStatTrak"], 187)
                csgo.write_int(weapon_address + netvars["m_nFallbackSeed"], seed)
                csgo.write_float(
                    weapon_address + netvars["m_flFallbackWear"], float(0.000001)
                )

        if keyboard.is_pressed("f7"):
            csgo.write_int(engine_dll_state + 0x174, -1)
コード例 #4
0
ファイル: glow.py プロジェクト: barbarbar338/hammer-csgo-hack
def wgpm(glow_obj, gindex, colors):
    csgo.write_float(glow_obj + ((gindex * 0x38) + 0x4), colors["red"])
    csgo.write_float(glow_obj + ((gindex * 0x38) + 0x8), colors["green"])
    csgo.write_float(glow_obj + ((gindex * 0x38) + 0xC), colors["blue"])
    csgo.write_float(glow_obj + ((gindex * 0x38) + 0x10), colors["opacity"])
コード例 #5
0
def noflash():
    player = getPlayer()
    if player:
        flash_value = player + netvars["m_flFlashMaxAlpha"]
        if flash_value:
            csgo.write_float(flash_value, float(0))