C#:
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Oxide.Plugins
{
[Info("Notifier", "poof", "1.0.0")]
class Notifier : RustPlugin
{
#region cfg
[JsonProperty(PropertyName = "Временной промежуток сообщений")]
public float TimeNotif = 300f;
[JsonProperty(PropertyName = "список сообщений")]
public List<string> CONF_Message = new List<string>
{
"Посетите наш магазин товаров, он находится по адресу:\n<color=#1E88E5>infinitirust.gamestores.ru</color>",
"Узнать подробнее о сервере пропишите <color=#e34747>/info</color>",
"Наша группа VK <color=#1E88E5>vk.com/club190434400</color>",
};
#endregion
#region Hooks
private void OnServerInitialized()
{
timer.Repeat(TimeNotif, 0, () =>
{
foreach (var check in BasePlayer.activePlayerList)
Notif(check);
});
}
#endregion
#region Helpers
public void Notif(BasePlayer player)
{
SendReply(player, (CONF_Message[new Random().Next(0, CONF_Message.Count-1)]));
}
#endregion
}
}