示例#1
0
        public static void MoveMessage(ulong steamId, string moveType, Vector3D position)
        {
            var MoveItem = new ServerMoveItem();

            MoveItem.moveType = moveType;
            MoveItem.x        = position.X;
            MoveItem.y        = position.Y;
            MoveItem.z        = position.Z;

            var messageString = MyAPIGateway.Utilities.SerializeToXML(MoveItem);
            var data          = Encoding.UTF8.GetBytes(messageString);

            SendDataMessage(steamId, DataMessageType.Move, data);
        }
示例#2
0
        public static void MoveMessage(ulong steamId, string moveType, double x, double y, double z, long entityId = 0)
        {
            ServerMoveItem MoveItem = new ServerMoveItem( );

            MoveItem.moveType = moveType;
            MoveItem.x        = x;
            MoveItem.y        = y;
            MoveItem.z        = z;
            MoveItem.entityId = entityId;

            string messageString = MyAPIGateway.Utilities.SerializeToXML(MoveItem);

            byte[] data = Encoding.Unicode.GetBytes(messageString);
            if (steamId != 0)
            {
                SendDataMessage(steamId, DataMessageType.Move, data);
            }
            else
            {
                BroadcastDataMessage(DataMessageType.Move, data);
            }
        }
        public static void MoveMessage( ulong steamId, string moveType, Vector3D position )
        {
            ServerMoveItem MoveItem = new ServerMoveItem( );
            MoveItem.moveType = moveType;
            MoveItem.x = position.X;
            MoveItem.y = position.Y;
            MoveItem.z = position.Z;

            string messageString = MyAPIGateway.Utilities.SerializeToXML( MoveItem );
            byte[ ] data = Encoding.Unicode.GetBytes( messageString );

            SendDataMessage( steamId, DataMessageType.Move, data );
        }
        public static void MoveMessage( ulong steamId, string moveType, double x, double y, double z, long entityId = 0 )
        {
            ServerMoveItem MoveItem = new ServerMoveItem( );
            MoveItem.moveType = moveType;
            MoveItem.x = x;
            MoveItem.y = y;
            MoveItem.z = z;
            MoveItem.entityId = entityId;

            string messageString = MyAPIGateway.Utilities.SerializeToXML( MoveItem );
            byte[ ] data = Encoding.Unicode.GetBytes( messageString );
            if ( steamId != 0 ) 
                SendDataMessage( steamId, DataMessageType.Move, data );
            else
                BroadcastDataMessage( DataMessageType.Move, data );
        }