Exemple #1
0
        private void OnConsoleCommand(string text, ref bool shouldExecute)
        {
            shouldExecute = false;
            if (text.StartsWith("/") || text.StartsWith("@"))
            {
                text = text.Remove(0, 1);
            }

            CM.ExecuteCommand(text, null);
        }
Exemple #2
0
        private void OnUnturnedCommand(SteamPlayer player, string text, ref bool shouldExecuteCommand, ref bool shouldList)
        {
            shouldExecuteCommand = false;
            if (!text.StartsWith("/") && !text.StartsWith("@"))
            {
                return;
            }
            shouldList = false;

            CM.ExecuteCommand(text, UnturnedPlayer.Get(player));
        }