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); }
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); } }
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); }
public static void SendScriptedChatMessage(ref ScriptedChatMsg msg) { MyMultiplayer.RaiseStaticEvent(s => MyMultiplayerBase.OnScriptedChatMessageRecieved, msg); }
protected virtual void OnScriptedChatMessage(ref ScriptedChatMsg msg) { RaiseScriptedChatMessageReceived(msg.Author, msg.Text, msg.Font); }