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

FREE NoclipPlugin : 1.0.0 1.0.0

Нет прав для скачивания
C#:
using Oxide.Core;
using System.Collections.Generic;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("Noclip Plugin", "AmericanSnipe", "1.0.0")]
    [Description("Allows players with permissions to toggle noclip mode.")]

    class NoclipPlugin : RustPlugin
    {
        private Dictionary<ulong, bool> noclipEnabled = new Dictionary<ulong, bool>();

        void Loaded()
        {
            permission.RegisterPermission("noclipplugin.use", this);
        }

        [ChatCommand("noclip")]
        private void ToggleNoclip(BasePlayer player)
        {
            if (!permission.UserHasPermission(player.UserIDString, "noclipplugin.use"))
            {
                SendReply(player, "You don't have permission to use this command.");
                return;
            }

            if (noclipEnabled.ContainsKey(player.userID))
            {
                noclipEnabled[player.userID] = !noclipEnabled[player.userID];
            }
            else
            {
                noclipEnabled.Add(player.userID, true);
            }

            player.SendConsoleCommand("noclip");

            SendReply(player, noclipEnabled[player.userID] ? "Noclip mode enabled." : "Noclip mode disabled.");
        }
    }
}

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