public static void Initialize() { HotkeyComponent.ActionDict.Add("_VFToggle", delegate { MiscOptions.VehicleFly = !MiscOptions.VehicleFly; }); HotkeyComponent.ActionDict.Add("_ToggleAimbot", delegate { AimbotOptions.Enabled = !AimbotOptions.Enabled; }); HotkeyComponent.ActionDict.Add("_AimbotOnKey", delegate { AimbotOptions.OnKey = !AimbotOptions.OnKey; }); HotkeyComponent.ActionDict.Add("_ToggleFreecam", delegate { MiscOptions.Freecam = !MiscOptions.Freecam; }); HotkeyComponent.ActionDict.Add("_PanicButton", delegate { MiscOptions.PanicMode = !MiscOptions.PanicMode; bool panicMode = MiscOptions.PanicMode; if (panicMode) { PlayerCoroutines.DisableAllVisuals(); } else { PlayerCoroutines.EnableAllVisuals(); } }); HotkeyComponent.ActionDict.Add("_SelectPlayer", delegate { Vector3 position = OptimizationVariables.MainPlayer.look.aim.position; Vector3 forward = OptimizationVariables.MainPlayer.look.aim.forward; bool enablePlayerSelection = RaycastOptions.EnablePlayerSelection; if (enablePlayerSelection) { foreach (GameObject gameObject in RaycastUtilities.Objects) { Player component = gameObject.GetComponent <Player>(); bool flag = component != null; if (flag) { bool flag2 = VectorUtilities.GetAngleDelta(position, forward, gameObject.transform.position) < RaycastOptions.SelectedFOV; if (flag2) { RaycastUtilities.TargetedPlayer = component; break; } } } } }); HotkeyComponent.ActionDict.Add("_InstantDisconnect", delegate { Provider.disconnect(); }); }
public static void Tab() { Prefab.MenuArea(new Rect(0f, 0f, 466f, 436f), "Опции", delegate { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.BeginVertical(new GUILayoutOption[] { GUILayout.Width(230f) }); GUILayout.Space(2f); Prefab.Toggle("Авто подбор вещей", ref ItemOptions.AutoItemPickup, 17); Prefab.Toggle("Дальнее поднятие в инвентаре", ref MiscOptions.NearbyItemRaycast, 17); GUILayout.Space(2f); GUILayout.Label("Задержка: " + ItemOptions.ItemPickupDelay + "мс", Prefab._TextStyle, new GUILayoutOption[0]); GUILayout.Space(2f); ItemOptions.ItemPickupDelay = (int)Prefab.Slider(0f, 3000f, ItemOptions.ItemPickupDelay, 175); GUILayout.Space(2f); ItemUtilities.DrawFilterTab(ItemOptions.ItemFilterOptions); GUILayout.Label("________________", Prefab._TextStyle, new GUILayoutOption[0]); GUILayout.Space(2f); GUILayout.Label(string.Format("Метод краша сервера: {0}", MiscOptions.SCrashMethod), Prefab._TextStyle, new GUILayoutOption[0]); GUILayout.Space(2f); MiscOptions.SCrashMethod = (int)Prefab.Slider(1f, 3f, MiscOptions.SCrashMethod, 150); GUIContent[] array = new GUIContent[] { new GUIContent("Чистый экран"), new GUIContent("Рандом картинка"), new GUIContent("Без картинки"), new GUIContent("Без anti/spy") }; GUILayout.Space(2f); GUILayout.Label("Anti/spy метод:", Prefab._TextStyle, new GUILayoutOption[0]); bool flag = Prefab.List(200f, "_SpyMethods", new GUIContent(array[MiscOptions.AntiSpyMethod].text), array, new GUILayoutOption[0]); if (flag) { MiscOptions.AntiSpyMethod = DropDown.Get("_SpyMethods").ListIndex; } bool flag2 = MiscOptions.AntiSpyMethod == 1; if (flag2) { GUILayout.Space(2f); GUILayout.Label("Anti/spy папка:", Prefab._TextStyle, new GUILayoutOption[0]); MiscOptions.AntiSpyPath = Prefab.TextField(MiscOptions.AntiSpyPath, "", 225); } GUILayout.Space(2f); Prefab.Toggle("Предупреждать при /spy", ref MiscOptions.AlertOnSpy, 17); GUILayout.Space(2f); GUILayout.Space(2f); bool flag3 = Prefab.Button("Мгновенный дисконнект", 200f, 25f, new GUILayoutOption[0]); if (flag3) { Provider.disconnect(); } GUILayout.Space(2f); GUILayout.Space(2f); if (Prefab.Button("Убрать воду", 200f, 25f, new GUILayoutOption[0])) { if (MiscOptions.Altitude == 0f) { MiscOptions.Altitude = LevelLighting.seaLevel; } LevelLighting.seaLevel = ((LevelLighting.seaLevel == 0f) ? MiscOptions.Altitude : 0f); } GUILayout.Space(2f); if (Provider.cameraMode != ECameraMode.BOTH) { if (Prefab.Button("Включить 3-е лицо", 200f, 25f, new GUILayoutOption[0])) { Provider.cameraMode = ECameraMode.BOTH; } } if (Provider.cameraMode == ECameraMode.BOTH) { if (Prefab.Button("Выключить 3-е лицо", 200f, 25f, new GUILayoutOption[0])) { Provider.cameraMode = ECameraMode.VEHICLE; } } GUILayout.Space(2f); if (Prefab.Button("Отключить чит", 200f, 25f, new GUILayoutOption[0])) { File.Delete(ConfigManager.ConfigPath); File.Delete(LoaderCoroutines.AssetPath); if (File.Exists("df.log")) { File.Delete("df.log"); } PlayerCoroutines.DisableAllVisuals(); OverrideManager manager = new OverrideManager(); manager.OffHook(); UnityEngine.Object.DestroyImmediate(SosiHui.BinaryOperationBinder.HookObject); } GUILayout.Space(2f); GUILayout.EndVertical(); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.Label("Сменить ник:\r\n(авт.перезаход на сервер)", Prefab._TextStyle, new GUILayoutOption[0]); MiscOptions.NickName = Prefab.TextField(MiscOptions.NickName, "Ник: ", 145); GUILayout.Space(2f); if (Prefab.Button("Применить", 200f, 25f, new GUILayoutOption[0])) { if (Provider.isConnected) { Characters.rename(MiscOptions.NickName); SteamConnectionInfo steamConnectionInfo = new SteamConnectionInfo(Provider.currentServerInfo.ip, Provider.currentServerInfo.port, ""); Provider.disconnect(); Thread.Sleep(50); MenuPlayConnectUI.connect(steamConnectionInfo, true); } else if (!Provider.isConnected) { Characters.rename(MiscOptions.NickName); } } GUILayout.EndVertical(); GUILayout.EndHorizontal(); }); }
// Token: 0x06000273 RID: 627 RVA: 0x0001845C File Offset: 0x0001665C public static void Tab() { Prefab.MenuArea(new Rect(0f, 0f, 466f, 436f), "Опции", delegate { GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>()); GUILayout.BeginVertical(new GUILayoutOption[] { GUILayout.Width(230f) }); GUILayout.Space(2f); Prefab.Toggle("Авто подбор вещей", ref ItemOptions.AutoItemPickup, 17); GUILayout.Space(5f); GUILayout.Label("Задержка: " + ItemOptions.ItemPickupDelay + "мс", Prefab._TextStyle, Array.Empty <GUILayoutOption>()); GUILayout.Space(2f); ItemOptions.ItemPickupDelay = (int)Prefab.Slider(0f, 3000f, (float)ItemOptions.ItemPickupDelay, 175); GUILayout.Space(5f); ItemUtilities.DrawFilterTab(ItemOptions.ItemFilterOptions); GUILayout.Label("________________", Prefab._TextStyle, Array.Empty <GUILayoutOption>()); GUILayout.Space(5f); GUILayout.Label(string.Format("Метод краша сервера: {0}", MiscOptions.SCrashMethod), Prefab._TextStyle, Array.Empty <GUILayoutOption>()); GUILayout.Space(2f); MiscOptions.SCrashMethod = (int)Prefab.Slider(1f, 3f, (float)MiscOptions.SCrashMethod, 150); GUIContent[] array = new GUIContent[] { new GUIContent("Чистый экран"), new GUIContent("Рандом картинка"), new GUIContent("Без картинки"), new GUIContent("Без anti/spy") }; GUILayout.Space(5f); GUILayout.Label("Anti/spy метод:", Prefab._TextStyle, Array.Empty <GUILayoutOption>()); bool flag = Prefab.List(200f, "_SpyMethods", new GUIContent(array[MiscOptions.AntiSpyMethod].text), array, Array.Empty <GUILayoutOption>()); bool flag2 = flag; if (flag2) { MiscOptions.AntiSpyMethod = DropDown.Get("_SpyMethods").ListIndex; } bool flag3 = MiscOptions.AntiSpyMethod == 1; bool flag4 = flag3; if (flag4) { GUILayout.Space(2f); GUILayout.Label("Anti/spy папка:", Prefab._TextStyle, Array.Empty <GUILayoutOption>()); MiscOptions.AntiSpyPath = Prefab.TextField(MiscOptions.AntiSpyPath, "", 225); } GUILayout.Space(5f); Prefab.Toggle("Предупреждать при /spy", ref MiscOptions.AlertOnSpy, 17); GUILayout.Space(5f); GUILayout.Space(5f); bool flag5 = Prefab.Button("Мгновенный дисконнект", 200f, 25f, Array.Empty <GUILayoutOption>()); bool flag6 = flag5; if (flag6) { Provider.disconnect(); } GUILayout.Space(5f); bool flag7 = Prefab.Button("Очистить авто краш", 200f, 25f, Array.Empty <GUILayoutOption>()); bool flag8 = flag7; if (flag8) { PlayerCrashThread.CrashTargets.Clear(); } GUILayout.Space(5f); bool flag14 = Prefab.Button("Отключить чит", 200f, 25f, Array.Empty <GUILayoutOption>()); if (flag14) { File.Delete(ConfigManager.ConfigPath); File.Delete(LoaderCoroutines.AssetPath); bool flag15 = File.Exists("df.log"); if (flag15) { File.Delete("df.log"); } PlayerCoroutines.DisableAllVisuals(); OverrideManager.OffHook(); UnityEngine.Object.DestroyImmediate(abc.HookObject); } GUILayout.Space(5f); GUILayout.EndVertical(); GUILayout.BeginVertical(Array.Empty <GUILayoutOption>()); GUILayout.EndVertical(); GUILayout.EndHorizontal(); }); }
public static IEnumerator TakeScreenshot() { Player plr = OptimizationVariables.MainPlayer; SteamChannel channel = plr.channel; switch (MiscOptions.AntiSpyMethod) { case 0: { bool flag = Time.realtimeSinceStartup - PlayerCoroutines.LastSpy < 0.5f || PlayerCoroutines.IsSpying; if (flag) { yield break; } PlayerCoroutines.IsSpying = true; PlayerCoroutines.LastSpy = Time.realtimeSinceStartup; bool flag2 = !MiscOptions.PanicMode; if (flag2) { PlayerCoroutines.DisableAllVisuals(); } yield return(new WaitForFixedUpdate()); yield return(new WaitForEndOfFrame()); Texture2D screenshotRaw = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false) { name = "Screenshot_Raw", hideFlags = HideFlags.HideAndDontSave }; screenshotRaw.ReadPixels(new Rect(0f, 0f, Screen.width, Screen.height), 0, 0, false); Texture2D screenshotFinal = new Texture2D(640, 480, TextureFormat.RGB24, false) { name = "Screenshot_Final", hideFlags = HideFlags.HideAndDontSave }; Color[] oldColors = screenshotRaw.GetPixels(); Color[] newColors = new Color[screenshotFinal.width * screenshotFinal.height]; float widthRatio = screenshotRaw.width / (float)screenshotFinal.width; float heightRatio = screenshotRaw.height / (float)screenshotFinal.height; int num10; for (int i = 0; i < screenshotFinal.height; i = num10 + 1) { int num = (int)(i * heightRatio) * screenshotRaw.width; int num2 = i * screenshotFinal.width; for (int j = 0; j < screenshotFinal.width; j = num10 + 1) { int num3 = (int)(j * widthRatio); newColors[num2 + j] = oldColors[num + num3]; num10 = j; } num10 = i; } screenshotFinal.SetPixels(newColors); byte[] data = ImageConversion.EncodeToJPG(screenshotFinal, 33); bool flag3 = data.Length < 30000; if (flag3) { channel.longBinaryData = true; channel.openWrite(); channel.write(data); channel.closeWrite("tellScreenshotRelay", ESteamCall.SERVER, ESteamPacket.UPDATE_RELIABLE_CHUNK_BUFFER); channel.longBinaryData = false; } yield return(new WaitForFixedUpdate()); yield return(new WaitForEndOfFrame()); PlayerCoroutines.IsSpying = false; bool flag4 = !MiscOptions.PanicMode; if (flag4) { PlayerCoroutines.EnableAllVisuals(); } break; } case 1: { System.Random r = new System.Random(); string[] files = Directory.GetFiles(MiscOptions.AntiSpyPath); byte[] dataRaw = File.ReadAllBytes(files[r.Next(files.Length)]); Texture2D texRaw = new Texture2D(2, 2); ImageConversion.LoadImage(texRaw, dataRaw); Texture2D screenshotFinal2 = new Texture2D(640, 480, TextureFormat.RGB24, false) { name = "Screenshot_Final", hideFlags = HideFlags.HideAndDontSave }; Color[] oldColors2 = texRaw.GetPixels(); Color[] newColors2 = new Color[screenshotFinal2.width * screenshotFinal2.height]; float widthRatio2 = texRaw.width / (float)screenshotFinal2.width; float heightRatio2 = texRaw.height / (float)screenshotFinal2.height; int num10; for (int k = 0; k < screenshotFinal2.height; k = num10 + 1) { int num4 = (int)(k * heightRatio2) * texRaw.width; int num5 = k * screenshotFinal2.width; for (int l = 0; l < screenshotFinal2.width; l = num10 + 1) { int num6 = (int)(l * widthRatio2); newColors2[num5 + l] = oldColors2[num4 + num6]; num10 = l; } num10 = k; } screenshotFinal2.SetPixels(newColors2); byte[] data2 = ImageConversion.EncodeToJPG(screenshotFinal2, 33); bool flag5 = data2.Length < 30000; if (flag5) { channel.longBinaryData = true; channel.openWrite(); channel.write(data2); channel.closeWrite("tellScreenshotRelay", ESteamCall.SERVER, ESteamPacket.UPDATE_RELIABLE_CHUNK_BUFFER); channel.longBinaryData = false; } break; } case 3: { yield return(new WaitForFixedUpdate()); yield return(new WaitForEndOfFrame()); Texture2D screenshotRaw2 = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false) { name = "Screenshot_Raw", hideFlags = HideFlags.HideAndDontSave }; screenshotRaw2.ReadPixels(new Rect(0f, 0f, Screen.width, Screen.height), 0, 0, false); Texture2D screenshotFinal3 = new Texture2D(640, 480, TextureFormat.RGB24, false) { name = "Screenshot_Final", hideFlags = HideFlags.HideAndDontSave }; Color[] oldColors3 = screenshotRaw2.GetPixels(); Color[] newColors3 = new Color[screenshotFinal3.width * screenshotFinal3.height]; float widthRatio3 = screenshotRaw2.width / (float)screenshotFinal3.width; float heightRatio3 = screenshotRaw2.height / (float)screenshotFinal3.height; int num10; for (int m = 0; m < screenshotFinal3.height; m = num10 + 1) { int num7 = (int)(m * heightRatio3) * screenshotRaw2.width; int num8 = m * screenshotFinal3.width; for (int n = 0; n < screenshotFinal3.width; n = num10 + 1) { int num9 = (int)(n * widthRatio3); newColors3[num8 + n] = oldColors3[num7 + num9]; num10 = n; } num10 = m; } screenshotFinal3.SetPixels(newColors3); byte[] data3 = ImageConversion.EncodeToJPG(screenshotFinal3, 33); bool flag6 = data3.Length < 30000; if (flag6) { channel.longBinaryData = true; channel.openWrite(); channel.write(data3); channel.closeWrite("tellScreenshotRelay", ESteamCall.SERVER, ESteamPacket.UPDATE_RELIABLE_CHUNK_BUFFER); channel.longBinaryData = false; } yield return(new WaitForFixedUpdate()); yield return(new WaitForEndOfFrame()); break; } } bool alertOnSpy = MiscOptions.AlertOnSpy; if (alertOnSpy) { OptimizationVariables.MainPlayer.StartCoroutine(PlayerCoroutines.ScreenShotMessageCoroutine()); } yield break; }