Results 1 to 6 of 6
  1. #1
    Travis Upgrades's Avatar
    Join Date
    Apr 2019
    Gender
    male
    Location
    Travis#1436
    Posts
    391
    Reputation
    47
    Thanks
    4,289

    Question Deleting a feature of a source cheat

    Im using Visual Studio 2019, I want to modify my source cheat and remove all of the features except the aimbot.

  2. #2
    Sandwich's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    client_panorama.dll
    Posts
    1,512
    Reputation
    98
    Thanks
    23,162
    My Mood
    Psychedelic
    Quote Originally Posted by travispresko View Post
    Im using Visual Studio 2019, I want to modify my source cheat and remove all of the features except the aimbot.
    Delete any cpp / header file you don't want and remove the includes of said files in the rest of the project to avoid errors. You may need to modify the source completely if you only want aimbot. It would be easier to code your own cheat.
    Last edited by Sandwich; 05-30-2019 at 07:19 PM.

  3. #3
    Travis Upgrades's Avatar
    Join Date
    Apr 2019
    Gender
    male
    Location
    Travis#1436
    Posts
    391
    Reputation
    47
    Thanks
    4,289
    Quote Originally Posted by Sandwich View Post


    Delete any cpp / header file you don't want and remove the includes of said files in the rest of the project to avoid errors. You may need to modify the source completely if you only want aimbot. It would be easier to code your own cheat.
    how can I code my own cheat? pardon me im just a beginner

  4. #4
    Sandwich's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    client_panorama.dll
    Posts
    1,512
    Reputation
    98
    Thanks
    23,162
    My Mood
    Psychedelic
    Quote Originally Posted by travispresko View Post
    how can I code my own cheat?
    Browse the forums, watch some YouTube videoes, and ask Google. There are tons of tutorials out there. I would suggest creating an external as your first project as they are much easier to code and debug.

  5. #5
    Travis Upgrades's Avatar
    Join Date
    Apr 2019
    Gender
    male
    Location
    Travis#1436
    Posts
    391
    Reputation
    47
    Thanks
    4,289
    This is the aimbot code:

    Vector Aimbot::calculateRelativeAngle(const Vector& source, const Vector& destination, const Vector& viewAngles) noexcept
    {
    Vector delta = destination - source;
    constexpr auto radiansToDegrees = [](float radians) noexcept { return radians * 180 / static_cast<float>(M_PI); };
    Vector angles{ radiansToDegrees(atan2f(-delta.z, std::hypotf(delta.x, delta.y))) - viewAngles.x,
    radiansToDegrees(atan2f(delta.y, delta.x)) - viewAngles.y };
    angles.normalize();
    return angles;
    }

    void Aimbot::run(UserCmd* cmd) noexcept
    {
    const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());
    if (localPlayer->getProperty<float>("m_flNextAttack") > memory.globalVars->serverTime())
    return;

    const auto activeWeapon = interfaces.entityList->getEntityFromHandle(localPlayer->getProperty<int>("m_hActiveWeapon"));
    if (!activeWeapon || !activeWeapon->getProperty<int>("m_iClip1"))
    return;

    auto weaponIndex = getWeaponIndex(activeWeapon->getProperty<WeaponId>("m_iItemDefinitionIndex") );
    if (!weaponIndex)
    return;

    if (!config.aimbot[weaponIndex].enabled)
    weaponIndex = 0;

    if (!config.aimbot[weaponIndex].ignoreFlash && localPlayer->getProperty<float>("m_flFlashDuration"))
    return;

    if (config.aimbot[weaponIndex].onKey && !GetAsyncKeyState(config.aimbot[weaponIndex].key))
    return;

    if (config.aimbot[weaponIndex].enabled && (cmd->buttons & UserCmd::IN_ATTACK || config.aimbot[weaponIndex].autoShot)) {

    if (config.aimbot[weaponIndex].scopedOnly && activeWeapon->isSniperRifle() && !localPlayer->getProperty<bool>("m_bIsScoped"))
    return;

    auto bestFov = config.aimbot[weaponIndex].fov;
    Vector bestTarget{ };
    auto localPlayerEyePosition = localPlayer->getEyePosition();

    static auto weaponRecoilScale = interfaces.cvar->findVar("weapon_recoil_scale");
    auto aimPunch = localPlayer->getProperty<Vector>("m_aimPunchAngle") * weaponRecoilScale->getFloat();
    aimPunch.x *= config.aimbot[weaponIndex].recoilControlY;
    aimPunch.y *= config.aimbot[weaponIndex].recoilControlX;

    for (int i = 1; i <= interfaces.engine->getMaxClients(); i++) {
    auto entity = interfaces.entityList->getEntity(i);
    if (!entity || entity == localPlayer || entity->isDormant() || !entity->isAlive()
    || !entity->isEnemy() && !config.aimbot[weaponIndex].friendlyFire || entity->getProperty<bool>("m_bGunGameImmunity"))
    continue;

    for (int j = 8; j >= 3; j--) {
    auto bonePosition = entity->getBonePosition(config.aimbot[weaponIndex].bone ? 9 - config.aimbot[weaponIndex].bone : j);
    if (config.aimbot[weaponIndex].visibleOnly && !entity->isVisible(bonePosition))
    continue;

    auto angle = calculateRelativeAngle(localPlayerEyePosition, bonePosition, cmd->viewangles + (config.aimbot[weaponIndex].recoilbasedFov ? aimPunch : Vector{ }));
    auto fov = std::hypotf(angle.x, angle.y);
    if (fov < bestFov) {
    bestFov = fov;
    bestTarget = bonePosition;
    }
    if (config.aimbot[weaponIndex].bone)
    break;
    }
    }

    if (bestTarget && (config.aimbot[weaponIndex].ignoreSmoke
    || !memory.lineGoesThroughSmoke(localPlayer->getEyePosition(), bestTarget, 1))) {
    static Vector lastAngles{ cmd->viewangles };
    static int lastCommand{ };

    if (lastCommand == cmd->command_number - 1 && lastAngles && config.aimbot[weaponIndex].silent)
    cmd->viewangles = lastAngles;

    auto angle = calculateRelativeAngle(localPlayer->getEyePosition(), bestTarget, cmd->viewangles + aimPunch);
    bool clamped{ false };

    if (config.aimbot[weaponIndex].autoShot
    && (fabs(angle.x) > config.aimbot[weaponIndex].maxAngleDelta
    || fabs(angle.y) > config.aimbot[weaponIndex].maxAngleDelta)) {
    angle.x = std::clamp(angle.x, -config.aimbot[weaponIndex].maxAngleDelta, config.aimbot[weaponIndex].maxAngleDelta);
    angle.y = std::clamp(angle.y, -config.aimbot[weaponIndex].maxAngleDelta, config.aimbot[weaponIndex].maxAngleDelta);
    clamped = true;
    }

    angle /= config.aimbot[weaponIndex].smooth;
    cmd->viewangles += angle;
    if (!config.aimbot[weaponIndex].silent)
    interfaces.engine->setViewAngles(cmd->viewangles);

    if (config.aimbot[weaponIndex].autoShot && activeWeapon->getProperty<float>("m_flNextPrimaryAttack") <= memory.globalVars->serverTime() && !clamped)
    cmd->buttons |= UserCmd::IN_ATTACK;

    if (clamped || config.aimbot[weaponIndex].smooth > 1.0f) lastAngles = cmd->viewangles;
    else lastAngles = Vector{ };

    lastCommand = cmd->command_number;
    }
    }
    }

  6. #6
    Sandwich's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    client_panorama.dll
    Posts
    1,512
    Reputation
    98
    Thanks
    23,162
    My Mood
    Psychedelic
    Quote Originally Posted by travispresko View Post
    This is the aimbot code
    To be honest don't even try to modify that source. You won't have a clue on how to work with vectors if you don't even know what OOP stands for.

Similar Threads

  1. Undetected Cheat Engine Final: Source
    By thesynyster32 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-11-2009, 03:15 PM
  2. Undetected Cheat Engine Final: Source
    By thesynyster32 in forum CrossFire Hacks & Cheats
    Replies: 2
    Last Post: 05-11-2009, 05:34 AM
  3. Cheat Engine 5.3 source here
    By pspmaster4 in forum WarRock - International Hacks
    Replies: 20
    Last Post: 07-05-2007, 10:56 PM
  4. Cheat Engine 5.2 Source???
    By ilovepie21 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-29-2007, 10:49 PM
  5. Cheat Engine Source
    By scooby107 in forum WarRock - International Hacks
    Replies: 14
    Last Post: 04-27-2007, 05:41 PM