Beispiel #1
0
        protected override void EndGame()
        {
            RoundEnd = DateTime.MinValue;
            UnhookStats();

            Alive.Clear();
            Infected.Clear();
            Bounties.Clear();

            Player[] players = PlayerInfo.Online.Items;
            foreach (Player pl in players)
            {
                if (pl.level != Map)
                {
                    continue;
                }
                ZSData data = Get(pl);

                data.ResetState();
                ResetInvisibility(pl, data);
            }
        }
Beispiel #2
0
        void GiveMoney(Player[] alive)
        {
            Player[] online = PlayerInfo.Online.Items;
            Random   rand   = new Random();

            foreach (Player pl in online)
            {
                if (pl.level != Map)
                {
                    continue;
                }
                ZSData data = Get(pl);
                data.ResetInvisibility();
                int reward = GetMoneyReward(pl, data, alive, rand);

                if (reward == -1)
                {
                    pl.Message("You may not hide inside a block! No " + Server.Config.Currency + " for you."); reward = 0;
                }
                else if (reward > 0)
                {
                    pl.Message("&6You gained " + reward + " " + Server.Config.Currency);
                }

                pl.SetMoney(pl.money + reward);
                data.ResetState();
                pl.Game.PledgeSurvive = false;

                if (pl.Game.Referee)
                {
                    pl.Message("You gained one " + Server.Config.Currency + " because you're a ref. Would you like a medal as well?");
                    pl.SetMoney(pl.money + 1);
                }

                RespawnPlayer(pl);
                UpdateStatus3(pl);
            }
        }