/// <summary> /// Ban an ip. Best to use in conjunction with Player.IPAddress /// </summary> /// <param name="ip">the ip to ban</param> public static void BanIP(byte[] ip) { int count = MemoryEditor.ReadInt(BANNED_IP_COUNT); MemoryEditor.WriteInt(count + 1, BANNED_IP_COUNT); MemoryEditor.WriteBytes(ip, BANNED_IP_LIST + count * 0x04); }
/// <summary> /// Forces the server to save the player index for commands starting with '/' /// Thanks to u/tema2 /// </summary> public static void RecordCommandSource() { byte[] code_original = new byte[6] { 0xE9, 0x09, 0x0B, 0x12, 0x00, 0x90 }; byte[] code_inject = new byte[18] { 0x8B, 0x55, 0x8C, 0x89, 0x15, 0x00, 0x80, 0x43, 0x00, 0x6B, 0xD2, 0x4C, 0xE9, 0xE7, 0xF4, 0xED, 0xFF, 0x90 }; int addr_original = 0x0040F4F2; int addr_inject = 0x00530000; MemoryEditor.WriteBytes(code_inject, addr_inject); MemoryEditor.WriteBytes(code_original, addr_original); }
/// <summary> /// Forces a faceoff /// </summary> public static void ForceFaceoff() { MemoryEditor.WriteBytes(0x01893200, new byte[] { 1 }); }
/// <summary> /// Resumes time on the clock /// </summary> public static void ResumeGame() { MemoryEditor.WriteBytes(0x0040B65A, new byte[] { 0 }); MemoryEditor.WriteBytes(0x004078FB, new byte[] { 1 }); }
/// <summary> /// Pauses time on the clock /// </summary> public static void PauseGame() { MemoryEditor.WriteBytes(0x0040B65A, new byte[] { 75 }); MemoryEditor.WriteBytes(0x004078FB, new byte[] { 0 }); }
/// <summary> /// Resumes time on the clock /// </summary> public static void ResumeGame() { MemoryEditor.WriteBytes(new byte[] { 0 }, 0x0040B65A); MemoryEditor.WriteBytes(new byte[] { 1 }, 0x004078FB); }
/// <summary> /// Pauses time on the clock /// </summary> public static void PauseGame() { MemoryEditor.WriteBytes(new byte[] { 75 }, 0x0040B65A); MemoryEditor.WriteBytes(new byte[] { 0 }, 0x004078FB); }