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

FREE Moved : 1.0.1 1.0.1

Нет прав для скачивания
C#:
using Newtonsoft.Json;

namespace Oxide.Plugins
{
    [Info("Moved", "Mike Hawke", "1.0.1")]
    class Moved : RustPlugin
    {
        private ConfigData configData;
        class ConfigData
        {
            [JsonProperty(PropertyName = "Text")]
            public string msg = "We Have Moved. Use F1 type connect IP:PORT and hit enter";
        }
        private bool LoadConfigVariables()
        {
            try
            {
                configData = Config.ReadObject<ConfigData>();
            }
            catch
            {
                return false;
            }
            SaveConfig(configData);
            return true;
        }
        void Init()
        {
            if (!LoadConfigVariables())
            {
                Puts("Config file issue detected. Please delete file, or check syntax and fix.");
                return;
            }
        }
        protected override void LoadDefaultConfig()
        {
            Puts("Creating new config file.");
            configData = new ConfigData();
            SaveConfig(configData);
        }
        void SaveConfig(ConfigData config)
        {
            Config.WriteObject(config, true);
        }
        object CanUserLogin(string name, string id, string ipAddress)
        {
            return configData.msg;
        }
    }
}

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