Пример #1
0
        public void SendMapMotd()
        {
            string motd = GetMotd();

            motd = Chat.Format(motd, this);
            OnSendingMotdEvent.Call(this, ref motd);

            // Change -hax into +hax etc when in Referee mode
            //  (can't just do Replace('-', '+') though, that breaks -push)
            if (Game.Referee)
            {
                motd = motd
                       .Replace("-hax", "+hax").Replace("-noclip", "+noclip")
                       .Replace("-speed", "+speed").Replace("-respawn", "+respawn")
                       .Replace("-fly", "+fly").Replace("-thirdperson", "+thirdperson");
            }
            byte[] packet = Packet.Motd(this, motd);
            Send(packet);

            if (!Supports(CpeExt.HackControl))
            {
                return;
            }
            Send(Hacks.MakeHackControl(this, motd));
        }
Пример #2
0
        void SendMapMotd()
        {
            byte[] packet = Packet.Motd(this, level.GetMotd(this));
            if (OnSendMOTD != null)
            {
                OnSendMOTD(this, packet);
            }
            Send(packet);

            if (!HasCpeExt(CpeExt.HackControl))
            {
                return;
            }
            Send(Hacks.MakeHackControl(this));
            if (Game.Referee)
            {
                Send(Packet.HackControl(true, true, true, true, true, -1));
            }
        }
Пример #3
0
        public void SendMapMotd()
        {
            string motd = GetMotd();

            motd = Chat.Format(motd, this);
            OnSendingMotdEvent.Call(this, ref motd);

            byte[] packet = Packet.Motd(this, motd);
            Send(packet);

            if (!Supports(CpeExt.HackControl))
            {
                return;
            }
            Send(Hacks.MakeHackControl(this, motd));
            if (Game.Referee)
            {
                Send(Packet.HackControl(true, true, true, true, true, -1));
            }
        }
Пример #4
0
        public void SendMapMotd()
        {
            string motd = GetMotd();

            motd = Chat.Format(motd, this);
            OnSendingMotdEvent.Call(this, ref motd);

            // change -hax into +hax etc
            if (Game.Referee)
            {
                motd = motd.Replace('-', '+');
            }
            byte[] packet = Packet.Motd(this, motd);
            Send(packet);

            if (!Supports(CpeExt.HackControl))
            {
                return;
            }
            Send(Hacks.MakeHackControl(this, motd));
        }