Example #1
0
        internal void SendPlayMessageToLobby(int LobbyId)
        {
            Lobbys[LobbyId].Started = true;
            Lobbys[LobbyId].StartStamp = Essential.GetUnixTimestamp();

            foreach (GamePlayer Player in Lobbys[LobbyId].Players)
            {
                ServerMessage SerializeLobby = new ServerMessage(Outgoing.SerializeLobby);
                SerializeLobby.AppendInt32(Player.UserId); // Player ID
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendUInt(6);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendString("0.4");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.1");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(100);
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("0.5");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.1");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendUInt(150);
                SerializeLobby.AppendUInt(2);
                SerializeLobby.AppendString("0.7");
                SerializeLobby.AppendString("-1.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(100);
                SerializeLobby.AppendUInt(3);
                SerializeLobby.AppendString("0.9");
                SerializeLobby.AppendString("-1.5");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(200);
                SerializeLobby.AppendUInt(4);
                SerializeLobby.AppendString("1.1");
                SerializeLobby.AppendString("-1.5");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendUInt(300);
                SerializeLobby.AppendUInt(5);
                SerializeLobby.AppendString("1.5");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(200);
                SerializeLobby.AppendUInt(3);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Bigparachutes > 3 ? 3 : Player.UClient.Basejump_Bigparachutes);
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Missiles > 3 ? 3 : Player.UClient.Basejump_Missiles);
                SerializeLobby.AppendUInt(2);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Shields > 3 ? 3 : Player.UClient.Basejump_Shields);
                SerializeLobby.AppendInt32(Lobbys[LobbyId].Players.Count);
                foreach (GamePlayer AllPlayboy in Lobbys[LobbyId].Players)
                {
                    SerializeLobby.AppendInt32(AllPlayboy.UserId);
                    SerializeLobby.AppendString(AllPlayboy.Username);
                    SerializeLobby.AppendString("http://localhost/getlook.php?figure=" + Essential.GetGame().GetClientManager().GetClientByHabbo(AllPlayboy.Username).GetHabbo().Figure);
                    SerializeLobby.AppendString(Essential.GetGame().GetClientManager().GetClientByHabbo(AllPlayboy.Username).GetHabbo().Gender);
                    SerializeLobby.AppendString("hhfi");
                    SerializeLobby.AppendUInt(1);
                    SerializeLobby.AppendString("BaseJumpMissile");
                    SerializeLobby.AppendInt32(1);
                        SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                }
           /*     SerializeLobby.AppendInt32(2);
                SerializeLobby.AppendString("Testityyppi");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                SerializeLobby.AppendInt32(4);
                SerializeLobby.AppendString("Testityyppi2");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                SerializeLobby.AppendInt32(3);
                SerializeLobby.AppendString("Testityyppi5");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                */
                using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\filut\testit.txt", true))
                {
                    file.WriteLine(SerializeLobby.ToString());
                }
                Player.UClient.SendMessage(SerializeLobby);
            }
          
        }