Open raimanya opened 4 years ago
I was thinking the same thing!
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.
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.
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.
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)
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