SharpMod.Message.Begin C# (CSharp) Method

Begin() public static method

Begins with the sending of a message.
public static Begin ( MessageDestination destination, int messageType, IntPtr floatValue, IntPtr playerEntity ) : void
destination MessageDestination /// The destination of a message. ///
messageType int
floatValue System.IntPtr
playerEntity System.IntPtr
return void
        public static void Begin(MessageDestination destination, int messageType, IntPtr floatValue, IntPtr playerEntity)
        {
            #if DEBUG
            messageInformation = new MessageInformation(destination, messageType, floatValue, playerEntity);
            messageInformation.CallTimeBegin = DateTime.Now;
            #endif

            MetaModEngine.engineFunctions.MessageBegin(destination, messageType, floatValue, playerEntity);
            count = 0;
        }

Usage Example

Beispiel #1
0
 public static void ShowMenu(this Player player, short keys, char displaytime, byte multipart, string text)
 {
     Message.Begin(MessageDestination.OneReliable, Message.GetUserMessageID("ShowMenu"), IntPtr.Zero, player.Pointer);
     Message.Write(keys);
     Message.Write(displaytime);
     Message.Write(multipart);
     Message.Write(text);
     Message.End();
 }