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

FREE ComfortableTemperature : 1.0.1 1.0.1

Нет прав для скачивания
C#:
namespace Oxide.Plugins
{
    [Info("ComfortableTemperature", "Styles", "1.0.1")]
    public class ComfortableTemperature : CovalencePlugin
    {
        private const string PermComfortableTempUse = "comfortabletemperature.use";

        private const float ColdThreshold = 10f;
        private const float HotThreshold = 30f;
        private const float ComfortableTemperature = 20f;

        private void Init()
        {
            permission.RegisterPermission(PermComfortableTempUse, this);
        }

        private object OnRunPlayerMetabolism(PlayerMetabolism metabolism, BasePlayer player, float delta)
        {
            if (!permission.UserHasPermission(player.UserIDString, PermComfortableTempUse))
                return null;

            if (metabolism.temperature.value < ColdThreshold || metabolism.temperature.value > HotThreshold)
            {
                metabolism.temperature.value = ComfortableTemperature;
            }

            return null;
        }
    }
}

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