Иконка ресурса

FREE AlwaysInflatedBalloons : 1.0.1 1.0.1

Нет прав для скачивания
C#:
/*
 * Copyright (C) 2026 Game4Freak.io
 * This mod is provided under the Game4Freak EULA.
 * Full legal terms can be found at https://game4freak.io/eula/
 */

namespace Oxide.Plugins
{
    [Info("Always Inflated Balloons", "VisEntities", "1.0.1")]
    [Description("Quickly inflates hot air balloons when toggled on.")]
    public class AlwaysInflatedBalloons : RustPlugin
    {
        #region Fields

        private static AlwaysInflatedBalloons _plugin;

        #endregion Fields

        #region Oxide Hooks

        private void Init()
        {
            _plugin = this;
        }

        private void Unload()
        {
            _plugin = null;
        }

        private void OnHotAirBalloonToggled(HotAirBalloon balloon, BasePlayer player)
        {
            if (balloon == null || player == null)
                return;

            if (balloon.IsOn())
                InflateBalloon(balloon);
        }

        #endregion Oxide Hooks

        #region Balloon Inflation

        private void InflateBalloon(HotAirBalloon balloon)
        {
            balloon.inflationLevel = 1f;
            balloon.bounds = balloon.raisedBounds;
            using (BaseEntity.FlagsUpdateScope flags = balloon.StartSetFlags(BaseEntity.FlagsUpdateMode.Local))
            {
                flags.Set(HotAirBalloon.Flag_HalfInflated, true, false);
                flags.Set(HotAirBalloon.Flag_FullInflated, true, false);
            }

            balloon.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
        }

        #endregion Balloon Inflation
    }
}

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху