Example #1
0
        public static void SendScriptedChatMessage(ref ScriptedChatMsg msg)
        {
            EndpointId targetEndpoint = new EndpointId();
            Vector3D?  position       = null;

            Sandbox.Engine.Multiplayer.MyMultiplayer.RaiseStaticEvent <ScriptedChatMsg>(s => new Action <ScriptedChatMsg>(MyMultiplayerBase.OnScriptedChatMessageRecieved), msg, targetEndpoint, position);
        }
Example #2
0
 private static void OnScriptedChatMessageRecieved(ScriptedChatMsg msg)
 {
     if ((MySession.Static != null) && ((msg.Target == 0) || (MySession.Static.LocalPlayerId == msg.Target)))
     {
         Sandbox.Engine.Multiplayer.MyMultiplayer.Static.OnScriptedChatMessage(ref msg);
     }
 }
Example #3
0
 static void OnScriptedChatMessageRecieved(ScriptedChatMsg msg)
 {
     if (MySession.Static == null)
     {
         return;
     }
     if (msg.Target != 0 && MySession.Static.LocalPlayerId != msg.Target)
     {
         return;
     }
     MyMultiplayer.Static.OnScriptedChatMessage(ref msg);
 }
Example #4
0
 public static void SendScriptedChatMessage(ref ScriptedChatMsg msg)
 {
     MyMultiplayer.RaiseStaticEvent(s => MyMultiplayerBase.OnScriptedChatMessageRecieved, msg);
 }
Example #5
0
 protected virtual void OnScriptedChatMessage(ref ScriptedChatMsg msg)
 {
     RaiseScriptedChatMessageReceived(msg.Author, msg.Text, msg.Font);
 }