C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using System.Collections.Generic;
namespace Oxide.Plugins
{
[Info("HomeSigns", "Wulf/lukespragg", "0.1.1", ResourceId = 1455)]
[Description("Allows players to only place signs where they can build")]
class HomeSigns : RustPlugin
{
// Do NOT edit this file, instead edit HomeSigns.en.json in the oxide/lang directory,
// or create a new language file for another language using the 'en' file as a default.void Init() => lang.RegisterMessages(new Dictionary<string, string> { ["NotAllowed"] = "Building blocked!" }, this);
object CanBuild(Planner plan, Construction prefab)
{
var player = plan.GetOwnerPlayer();
if (!prefab.hierachyName.StartsWith("sign.") || player.HasPlayerFlag(BasePlayer.PlayerFlags.HasBuildingPrivilege)) return null;
PrintToChat(player, lang.GetMessage("NotAllowed", this, player.UserIDString));
return true;
}
}
}