예제 #1
0
        public static void RunScript(string scriptName)
        {
            if (!Sync.IsServer && !MySession.Static.IsUserAdmin(Sync.MyId))
            {
                return;
            }
            var scriptId = MyStringHash.Get(scriptName);

            if (Sync.IsServer)
            {
                Static.RunScriptInternal(scriptId);
            }
            else
            {
                SendScriptRequest(scriptId);
            }
        }
예제 #2
0
        public static void RunScript(string scriptName)
        {
            if (!Sync.IsServer && !MyMultiplayer.Static.IsAdmin(MySteam.UserId))
            {
                return;
            }
            var scriptId = MyStringHash.Get(scriptName);

            if (Sync.IsServer)
            {
                Static.RunScriptInternal(scriptId);
            }
            else
            {
                SendScriptRequest(scriptId);
            }
        }