Esempio n. 1
0
        void ResetInvisibility(Player p, ZSData data)
        {
            if (!data.Invisible)
            {
                return;
            }
            p.SendCpeMessage(CpeMessageType.BottomRight2, "");

            data.ResetInvisibility();
            Entities.GlobalSpawn(p, false);
        }
Esempio n. 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);
            }
        }