Пример #1
0
        internal static void PlayScript(string[] param)
        {
            if (param == null || param.Length == 0)
            {
                return;
            }
            string scriptname = param[0];

            if (param.Length > 1)
            {
                for (int i = 1; i < param.Length; i++)
                {
                    scriptname = scriptname + " " + param[i];
                }
            }

            RazorEnhanced.Scripts.EnhancedScript script = RazorEnhanced.Scripts.Search(scriptname);
            if (script != null)
            {
                if (script.Run)
                {
                    script.Stop();
                }
                else
                {
                    script.Run = true;
                }
            }
            else
            {
                RazorEnhanced.Misc.SendMessage("PlayScript: Script not exist", 33, false);
            }
        }
Пример #2
0
        private static void PlayScript(string[] param)
        {
            if (param == null && param[0] == null)
            {
                return;
            }

            RazorEnhanced.Scripts.EnhancedScript script = RazorEnhanced.Scripts.Search(param[0]);
            if (script != null)
            {
                script.Run = true;
            }
            else
            {
                RazorEnhanced.Misc.SendMessage("PlayScript: Script not exist", 33, false);
            }
        }