Advertisement
nilError1337

simple onetap api fix

Jul 11th, 2020
1,435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.28 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3.  
  4. namespace CFG_TEST
  5. {
  6.     class Program
  7.     {
  8.  
  9.         static void Main(string[] args)
  10.         {
  11.             Console.WriteLine("Write path to ot/scripts folder");
  12.             Console.WriteLine("For Example:");
  13.             Console.WriteLine(@"C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\ot\scripts");
  14.             string path = Console.ReadLine();
  15.             string[] files = Directory.GetFiles(path, "*.js");
  16.             foreach (var file in files)
  17.             {
  18.                 string text = File.ReadAllText(file);
  19.                 text = text.Replace("Global.Tickcount", "Globals.Tickcount");
  20.                 text = text.Replace("Global.Tickrate", "Globals.Tickrate");
  21.                 text = text.Replace("Global.TickInterval", "Globals.TickInterval");
  22.                 text = text.Replace("Global.Curtime", "Globals.Curtime");
  23.                 text = text.Replace("Global.Realtime", "Globals.Realtime");
  24.                 text = text.Replace("Global.Frametime", "Globals.Frametime");
  25.                 text = text.Replace("Global.Play(instead of PlaySound)", "Sound.Play(instead of PlaySound)");
  26.                 text = text.Replace("Global.RegisterCallback", "Cheat.RegisterCallback");
  27.                 text = text.Replace("Global.ExecuteCommand", "Cheat.ExecuteCommand");
  28.                 text = text.Replace("Global.FrameStage", "Cheat.FrameStage");
  29.                 text = text.Replace("Global.Print", "Cheat.Print");
  30.                 text = text.Replace("Global.PrintColor", "Cheat.PrintColor");
  31.                 text = text.Replace("Global.PrintChat", "Cheat.PrintChat");
  32.                 text = text.Replace("Global.Latency", "Local.Latency");
  33.                 text = text.Replace("Global.GetViewAngles", "Local.GetViewAngles");
  34.                 text = text.Replace("Global.SetViewAngles", "Local.SetViewAngles");
  35.                 text = text.Replace("Global.GetMapName", "World.GetMapName");
  36.                 text = text.Replace("Global.IsKeyPressed", "Input.IsKeyPressed");
  37.                 text = text.Replace("Global.GetCursorPosition", "Input.GetCursorPosition");
  38.                 text = text.Replace("Global.GetScreenSize", "Render.GetScreenSize");
  39.                 File.WriteAllText(file, text);
  40.             }
  41.         }
  42.  
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement