C#:
using System.Collections.Generic;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("DeepSea", "spunK", "1.0.0")]
[Description("Notifies the server once DeepSea has respawned.")]
public class DeepSea : RustPlugin
{
#region Oxide Hooks
private void OnDeepSeaOpen()
{
foreach (var player in BasePlayer.activePlayerList)
{
if (player == null || !player.IsConnected)
continue;
player.SendConsoleCommand("gametip.showtoast", 1, Lang("Opened", player.UserIDString), "assets/icons/error.tga", 5f);
}
}
#endregion
protected override void LoadDefaultMessages()
{
lang.RegisterMessages(new Dictionary<string, string>
{
["Opened"] = "Deepsea has successfully respawned."
}, this);
}
private string Lang(string key, string playerId = null)
{
return lang.GetMessage(key, this, playerId);
}
}
}