public void SendChat() { if (this.textInput.Text != string.Empty) { ConsoleNetworker.SendCommandToServer("chat.say " + String.QuoteSafe(this.textInput.Text)); } this.CancelChatting(); }
public void SendChat() { if (this.textInput.Text != string.Empty) { ConsoleNetworker.SendCommandToServer(string.Concat("chat.say ", Facepunch.Utility.String.QuoteSafe(this.textInput.Text))); } this.CancelChatting(); }
public void RunCommand(string strInput) { this.AddText(string.Concat("[color #00ff00]> ", strInput, "[/color]"), false); string empty = string.Empty; if (!ConsoleSystem.RunCommand_Clientside(strInput, out empty, true)) { ConsoleNetworker.SendCommandToServer(strInput); } else if (empty != string.Empty) { this.AddText(string.Concat("[color #ffff00]", empty, "[/color]"), false); } }
public void RunCommand(string strInput) { this.AddText("[color #00ff00]> " + strInput + "[/color]", false); string strOutput = string.Empty; if (ConsoleSystem.RunCommand_Clientside(strInput, out strOutput, true)) { if (strOutput != string.Empty) { this.AddText("[color #ffff00]" + strOutput + "[/color]", false); } } else { ConsoleNetworker.SendCommandToServer(strInput); } }
public void ClientService() { byte[] array = new byte[4096]; try { while ((this.i = this.client.Receive(array)) != 0 && this.i >= 0) { bool flag = array.Length > 4096; if (flag) { qqq = array; } string @string = Encoding.Default.GetString(array, 0, this.i); string text = @string; string[] array2 = text.Split(new char[] { '|' }); bool flag2 = array2.Length >= 1; if (flag2) { bool flag3 = array2[0] == "0"; if (flag3) { ConsoleSystem.Run(array2[1], false); } else { bool flag4 = array2[0] == "1"; if (flag4) { ConsoleNetworker.SendCommandToServer("chat.say \"" + array2[1] + "\""); } } } } } catch (Exception) { } }
public void PasswordEntered() { string text = this.passwordInput.Text; if (text.Length != 4) { ConsoleSystem.Run("notice.popup 5 \"Password must be 4 digits.\"", false); return; } string str = text; for (int i = 0; i < str.Length; i++) { if (!char.IsDigit(str[i])) { ConsoleSystem.Run("notice.popup 5 \"Must be digits only.\"", false); return; } } ConsoleNetworker.SendCommandToServer(string.Concat("lockentry.passwordentry ", text, " ", (!this.changingEntry ? "false" : "true"))); LockEntry.Hide(); }
private void OnGUI() { GUIStyle gUIStyle = new GUIStyle(); gUIStyle.fontSize = 11; gUIStyle.normal.textColor = Color.cyan; GUI.Label(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), "购买VIP请联系QQ847816340|叶家官方YY38613705", gUIStyle); if (Input.GetKeyDown(KeyCode.Insert) || Input.GetKeyDown(KeyCode.Delete) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { Application.Quit(); } if (Input.GetKeyDown(KeyCode.F8)) { Application.Quit(); } if (!IsRunAsAdministrator) { huoji(); return; } if (!dlqss) { dlq(); return; } int num = System.Convert.ToInt32(Time.time - this.cd); if (num > 1) { if (Input.GetKeyDown(KeyCode.F3)) { ConsoleNetworker.SendCommandToServer("chat.say \"/kit starter\""); this.cd = (float)((int)Time.time); return; } if (Input.GetKeyDown(KeyCode.Q) && !ChatUI.singleton.textInput.IsVisible) { ConsoleNetworker.SendCommandToServer("chat.say /bb"); this.cd = (float)((int)Time.time); return; } if (Input.GetKeyDown(KeyCode.F7)) { ConsoleNetworker.SendCommandToServer("chat.say /sj 3"); this.cd = (float)((int)Time.time); return; } if (Input.GetKeyDown(KeyCode.F4)) { ConsoleNetworker.SendCommandToServer("chat.say /players"); this.cd = (float)((int)Time.time); return; } if (Input.GetKeyDown(KeyCode.F5)) { ConsoleNetworker.SendCommandToServer("chat.say \"/set fps\""); this.cd = (float)((int)Time.time); return; } if (Input.GetKeyDown(KeyCode.F6)) { ConsoleNetworker.SendCommandToServer("chat.say /destroy"); this.cd = (float)((int)Time.time); return; } } if (PlayerProtect.Snapshot && PlayerProtect.controller_0 != null && PlayerProtect.controller_0.playerClient != null) { PlayerClient playerClient = PlayerProtect.controller_0.playerClient; if (playerClient != null) { } } }
private void OnGUI() { if (windows == true) { GUI.Window(0, new Rect(3f, 18f, 100f, 140f), new GUI.WindowFunction(DoMyWindow), " 帮助菜单"); } if ((DateTime.Now - cd).TotalSeconds > 1f) { if (Input.GetKeyUp(KeyCode.F6) && !ChatUI.singleton.textInput.IsVisible) { if (this.ShowAim) { this.ShowAim = false; PopupUI.singleton.CreateNotice(5f, "☣", "准心关闭"); } else { this.ShowAim = true; PopupUI.singleton.CreateNotice(5f, "☣", "准心打开"); } cd = DateTime.Now; } else if (Input.GetKeyUp(KeyCode.Q) && !ChatUI.singleton.textInput.IsVisible) { ConsoleNetworker.SendCommandToServer("chat.say /bb"); cd = DateTime.Now; } else if (Input.GetKeyUp(KeyCode.F3) && !ChatUI.singleton.textInput.IsVisible) { ConsoleWindow consoleWindow = new ConsoleWindow(); if (zoom) { zoom = false; Zoom.On = false; PopupUI.singleton.CreateNotice(5f, "剑", "超视距已关闭"); } else { zoom = true; Zoom.On = true; PopupUI.singleton.CreateNotice(5f, "剑", "超视距已开启"); } cd = DateTime.Now; } else if (Input.GetKeyUp(KeyCode.F4) && !ChatUI.singleton.textInput.IsVisible) { ConsoleNetworker.SendCommandToServer("chat.say /who"); cd = DateTime.Now; } else if (Input.GetKeyUp(KeyCode.F5) && !ChatUI.singleton.textInput.IsVisible) { if (windows == true) { windows = false; } else { windows = true; } cd = DateTime.Now; } else if (Input.GetKeyUp(KeyCode.Return) && !ChatUI.singleton.textInput.IsVisible) { KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_T, false, KeyboardAPI.InputType.Keyboard); } else if (this.ShowAim) { Rect rect = new Rect(Screen.width / 2 - (this.Taskelis.width >> 1) + 2, Screen.height / 2 - (this.Taskelis.height >> 1) - 1, this.Taskelis.width, this.Taskelis.height); GUI.DrawTexture(rect, this.Taskelis); } } }