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

FREE TimeCommand : 1.0.0 1.0.0

Нет прав для скачивания
C#:
using UnityEngine;
using System;
using Oxide.Core;
using Oxide.Core.Plugins;
namespace Oxide.Plugins
{
    [Info("Time Command", "chay", "1.0.0")]
    [Description("Displays the Server's current time.")]
    class TimeCommand : RustPlugin
    {
        private void OnServerInitialized()
        {
            permission.RegisterPermission("timecommand.use", this);
        }

        [ChatCommand("time")]
        private void timeCommand(BasePlayer player, string command, string[] args)
        {
            if (!permission.UserHasPermission(player.UserIDString, "timecommand.use"))
            {
                player.ChatMessage("You do not have permission to do this...");
                return;
            }

            int hour = Mathf.FloorToInt(TOD_Sky.Instance.Cycle.Hour);
            int minute = Mathf.FloorToInt(TOD_Sky.Instance.Cycle.DateTime.Minute);

            player.ChatMessage($"The time is currently <color=#00FFFF>{hour}:{minute}</color>");
        }
    }
}

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