Ejemplo n.º 1
0
        public void CMD_HousePrice(Client player, int new_price)
        {
            int RightsLevel = PlayerFunctions.Player.GetRightsLevel(player);

            if (RightsLevel < 9)
            {
                player.sendChatMessage("~r~ERROR: ~w~Эта команда вам недоступна.");
                return;
            }

            if (!player.hasData("HouseMarker_ID"))
            {
                player.sendChatMessage("~r~ERROR: ~w~Встаньте на маркер дома который хотите изменить.");
                return;
            }

            House house = Main.Houses.FirstOrDefault(h => h.ID == player.getData("HouseMarker_ID"));

            if (house == null)
            {
                return;
            }

            house.SetPrice(new_price);
            player.sendChatMessage(string.Format("~b~HOUSE SCRIPT: ~w~Цена дома изменена на ~g~${0:n0}.", new_price));
        }
        public void CMD_HousePrice(Client player, int new_price)
        {
            if (!player.hasData("HouseMarker_ID"))
            {
                player.sendChatMessage("~r~ERROR: ~w~Stand in the entrance marker of the house you want to edit.");
                return;
            }

            House house = Main.Houses.FirstOrDefault(h => h.ID == player.getData("HouseMarker_ID"));

            if (house == null)
            {
                return;
            }

            house.SetPrice(new_price);
            player.sendChatMessage(string.Format("~b~HOUSE SCRIPT: ~w~House price set to ~g~${0:n0}.", new_price));
        }