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

FREE FixUnmountableCars : 1.0.0 1.0.0

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using System;
using Oxide.Core;

namespace Oxide.Plugins
{
    [Info("Fix Unmountable Cars", "Substrata", "1.0.0")]
    [Description("Fix Unmountable Cars")]

    class FixUnmountableCars : RustPlugin
    {
        [ChatCommand("fixcars")]
		void cmdFixCars(BasePlayer player, string command, string[] args)
        {
            if (!player.IsAdmin) return;
            FixCars();
        }

        void OnServerInitialized(bool initial)
        {
            if (initial) FixCars();
        }

        void FixCars()
        {
            foreach (var ent in BaseNetworkable.serverEntities)
            {
                if (ent is ModularCar) FixCar((ent as BaseVehicle));
            }
        }

        void FixCar(BaseVehicle vehicle)
        {
            if (vehicle == null || vehicle.IsDestroyed || vehicle.AnyMounted()) return;
            vehicle.DismountAllPlayers();
            vehicle.SetFlag(BaseEntity.Flags.Reserved11, false);
        }
    }
}

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