#Hey i dont know what is wrong with my code?

33 messages · Page 1 of 1 (latest)

old canopyBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

fickle ibex
#
#include <thread>
#include <iostream>
namespace offset
{
    // client
    constexpr ::std::ptrdiff_t dwLocalPlayer = 0xDEA964;
    constexpr ::std::ptrdiff_t dwEntityList = 0x4DFFFC4;
    constexpr ::std::ptrdiff_t dwForceAttack = 0x322DDFC;
    // entity
    constexpr ::std::ptrdiff_t m_iHealth = 0x100;
    constexpr ::std::ptrdiff_t m_iTeamNum = 0xF4;
    constexpr ::std::ptrdiff_t m_iCrosshairId = 0x11838;
}
int main()
{
    const auto memory = Memory{ "csgo.exe" };
    const auto client = memory.GetModuleAddress("client.dll");
    std::cout << std::hex << "client.dll -> 0x" << client << std::dec << std::endl;
    // hack loop
    while (true)
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(1));
        // skip if trigger key not down
        if (!GetAsyncKeyState(VK_SHIFT))
            continue;
        const auto& localPlayer = memory.Read<std::uintptr_t>(client + offset::dwLocalPlayer);
        const auto& localHealth = memory.Read<std::int32_t>(localPlayer + offset::m_iHealth);
        // skip if local player is dead
        if (!localHealth)
            continue;
        const auto& crosshairId = memory.Read<std::int32_t>(localPlayer + offset::m_iCrosshairId);
        if (!crosshairId || crosshairId > 64)
            continue;
        const auto& player = memory.Read<std::uintptr_t>(client + offset::dwEntityList + (crosshairId - 1) * 0x10);
        // skip if player is dead
        if (!memory.Read<std::int32_t>(player + offset::m_iHealth))
            continue;
        // skip if player is on our team
        if (memory.Read<std::int32_t>(player + offset::m_iTeamNum) ==
            memory.Read<std::int32_t>(localPlayer + offset::m_iTeamNum))
            continue;
        memory.Write<std::uintptr_t>(client + offset::dwForceAttack, 6);
        std::this_thread::sleep_for(std::chrono::milliseconds(20));
        memory.Write<std::uintptr_t>(client + offset::dwForceAttack, 4);
    }
    return 0;
}```
old canopyBOT
#
How to Ask A Programming Question

Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.

What To Post

State your problem clearly and provide all necessary details:

  • the relevant portion of your code, or all of it
  • the expected output
  • the actual output (or the full error) 🏆 Gold Standard: Minimal Reproducible Example
Where To Post

Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:

  • Compiler Explorer for most C/C++ snippets
  • OnlineGDB for interaction, debugging ⛔ Do not post screenshots, let alone photos of your screen!
plush sluice
#

cs:go hack, nice

fickle ibex
#

I didn’t read that far into the code kekw

#

<@&847915341954154536>

warm willow
#

Sorry i just started what was wrong

plush sluice
#

#rules

#

The wrong thing is that you didnt read them

warm willow
#

Oh shit

old canopyBOT
#

@warm willow

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.

celest girder
#

xDD

#

So, are you actually interested at all in programming by itself at all, or just wanted to compile cheats

warm willow
#

I am interested

#

just thought i would try to make that

#

but

#

couldnt figure it out so just found a discord

#

and me being stupid i didnt read the rules

fickle ibex
#

Did you write it yourself?

warm willow
#

some of it

celest girder
#

It goes against ToS of discord. It will be against any server

warm willow
#

Oh ffs

#

sorry i didnt know

celest girder
#

Well, I'd suggest not cheating in online games

#

¯_(ツ)_/¯

hearty pier
#

There's are almost a infinite amount of other programs you could write that don't involve ruining games for others

celest girder
#

There is countably infinite amount

warm willow
#

yeah it was just to have fun with friends

#

but yeah

fickle ibex
#

Shouldn’t it be an uncountable infinite?

hearty pier
#

Tbf it would probably be picked up in about 0.000001s and you'll be banned anyway

warm willow
#

alright well sorry for the post i didnt know