using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("Stopwatch", "WuyZar", "1.0.2")]
[Description("Discord : https://discord.gg/NVwRcQwGwh")]
class Stopwatch : RustPlugin
{
private string endCommand;
private bool timerRunning;
[ConsoleCommand("s.start")]
private void ConsoleCmdStartTimer(ConsoleSystem.Arg arg)
{
if (arg.Player() != null && !arg.Player().IsAdmin)
{
arg.ReplyWith("Stopwatch : \nYou do not have permission to use this command.");
return;
}
if (timerRunning)
{
arg.ReplyWith("Stopwatch : \nA timer is already running.");
return;
}
if (arg.Args == null || arg.Args.Length == 0 || !int.TryParse(arg.Args[0], out int time))
{
arg.ReplyWith("Stopwatch : \ns.start