shlifedev / among-us-memory

my among us hacking utility
196 stars 57 forks source link

How to write player positional data? #42

Open raimanya opened 4 years ago

raimanya commented 4 years ago

Can someone provide me with the code to change the players position? I've tried rewriting the WriteMemory_IsImposter() multiple times now to make it change the player position, but with no success. Please someone send me a a WriteMemory_Position() method because this is driving me insane lmao

randomcmd commented 4 years ago

I was thinking the same thing!

shlifedev commented 4 years ago

    public void WriteMemory_PositionX(float value)
        {

                int _offset_vec2_position = 80;
                var netTransform = ((int)Instance.NetTransform + _offset_vec2_position);
                var targetPointer = netTransform + 4;  
                Cheese.mem.WriteMemory(targetPointer.GetAddress(), "float", value.ToString());

        }

    public void WriteMemory_PositionY(float value)
        {

                int _offset_vec2_position = 80;
                var netTransform = ((int)Instance.NetTransform + _offset_vec2_position);
                var targetPointer = netTransform + 8;  
                Cheese.mem.WriteMemory(targetPointer.GetAddress(), "float", value.ToString());

        }

But you can't change real player position. it's network received value. So, this example code work, but no effect.

vladimirdabic commented 4 years ago

But are you able to edit the local player's position? I'm guessing the client (you) is sending your position so changing it shouldn't be a problem.

rushiiMachine commented 4 years ago

Yes you can, but if the server has checks for player positions, teleporting will not work. But if not, the player position will not change server-side until you send a position update packet.

pythonmcpi commented 3 years ago

Note that the server side anticheat now bans you for hacking if you teleport across the map and kill (at least in my case, although I was using a different mod which may be using a different method)