C#:
using System;
using Newtonsoft.Json;
using Oxide.Game.Rust.Cui;
using System.Globalization;
using UnityEngine;
using Oxide.Core.Plugins;
namespace Oxide.Plugins {
[Info("Info", "vk.com/rust_fans", "1.0.0")]
class Info : RustPlugin {
#region Variables
[JsonProperty("Системный слой")]
private string Layer4 = "UI_Help";
[PluginReference]
private Plugin ImageLibrary;
#endregion
#region Command
[ChatCommand("info")]
void cmdChatOnes(BasePlayer player, string command, string[] args) => InfoUI(player);
#region Command
[ChatCommand("1")]
void cmdChatOne(BasePlayer player, string command, string[] args) => OneUI(player);
[ChatCommand("2")]
void cmdChatTwo(BasePlayer player, string command, string[] args) => TwoUI(player);
[ChatCommand("4")]
void cmdChatThree(BasePlayer player, string command, string[] args) => ThreeUI(player);
[ConsoleCommand("10")]
void cmdConsoleShop(ConsoleSystem.Arg args) {
InfoUI(args.Player());
}
#endregion
void OnServerInitialized() {
ImageLibrary.Call("AddImage", "https://i.imgur.com/aOi5Z5E.png", "Logo1");
}
#region Ui
private void InfoUI(BasePlayer player) {
CuiHelper.DestroyUi(player, Layer4);
var container = new CuiElementContainer();
container.Add(new CuiPanel {
CursorEnabled = true, RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1"
}
, Image = {
Color = "0 0 0 0", Sprite = "Assets/Content/UI/UI.Background.Tile.psd", Material = "assets/content/ui/uibackgroundblur.mat", FadeIn = 0.5f
}
, FadeOut = 0f
}
, "Overlay", Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "4 -1000", OffsetMax = "1301 -71"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1128 -71", OffsetMax = "1301 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "И Н Ф О Р М А Ц И Я", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 28, Align = TextAnchor.UpperCenter
}
, new CuiOutlineComponent {
Distance = "1 1", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "172 -71", OffsetMax = "1128 -35"
}
}
}
);
//фон текста
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "0.59 0.32 0.32 0.8"
}
, Text = {
Text = ""
}
}
, Layer4);
//Текст1
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "\n ОСНОВНОЕ ВАЙПЫ\n\n\n\n\n\n\n КОНТАКТЫ ПРОЧЕЕ", Font = "robotocondensed-bold.ttf", Color = "0.88 0.88 0.88 1", FontSize = 35, Align = TextAnchor.UpperLeft
}
, new CuiOutlineComponent {
Distance = "0.5 0.5", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -640", OffsetMax = "1128 -71"
}
}
}
);
//Текст основное
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -400", OffsetMax = "570 -152"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=#E0E0E0>●</color> x1.5/2.0 РЕЙТЫ\n<color=#E0E0E0>●</color> MAX2 КОМАНДЫ\n<color=#E0E0E0>●</color> ВАЙПБЛОК ПРЕДМЕТОВ\n<color=#E0E0E0>●</color> МОМЕНТАЛЬНЫЙ КРАФТ\n<color=#E0E0E0>●</color> УВЕДОМЛЕНИЯ О РЕЙДАХ\n<color=#E0E0E0>●</color> СТАРТОВЫЕ НАБОРЫ\n<color=#E0E0E0>●</color> УДАЛЕНИЕ И УЛУЧШЕНИЕ ПОСТРОЕК\n<color=#E0E0E0>●</color> АДМИНИСТРАЦИЯ 18+", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 20, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст вайпы
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "735 -400", OffsetMax = "1123 -152"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\nОБЫЧНЫЙ: КАЖДЫЙ ЧЕТВЕРГ\n<size=14><color=#E0E0E0>● удаляются только постройки игроков</color></size>\n\nГЛОБАЛЬНЫЙ: КАЖДЫЕ 2 НЕДЕЛИ\n<size=14><color=#E0E0E0>● удаляются постройки и рецепты игроков</color></size>\n\nС ОБНОВЛЕНИЕМ: ВНЕПЛАНОВЫЙ\n<size=14><color=#E0E0E0>● делается разработчиками, возможен в любое время</color></size>", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 20, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст контакты
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -640", OffsetMax = "570 -430"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<size=12><color=#E0E0E0>● группа вконтакте</color></size>\nHTTPS://VK.COM/CLUB198386853\n<size=12><color=#E0E0E0>● магазин проекта</color></size>\nHTTP://RUST102.GAMESTORES.RU/\n<size=12><color=#E0E0E0>● адрес сервера</color></size>\nCONNECT 185.97.254.158:20550", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 20, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст прочее
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "735 -640", OffsetMax = "1112 -430"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<size=12><color=#E0E0E0>● перезагрузки</color></size>\nКАЖДЫЙ ДЕНЬ В 5 УТРА ПО МСК\n<size=12><color=#E0E0E0>● набор в модераторы</color></size>\nОБРАЩАТЬСЯ В ЛС ГРУППЫ ВК\n<size=12><color=#E0E0E0>● жалобы и предложения</color></size>\nHTTPs://VK.COM/gizar83", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 20, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Верхняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -75", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Левая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "176 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -636"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Правая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1124 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Кнопка закрыть
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 0", AnchorMax = "1 1", OffsetMin = "0 -1000", OffsetMax = "1290 0"
}
, Button = {
Color = "1 0.89 0.77 0", Close = Layer4
}
, Text = {
Text = ""
}
}
, Layer4);
//Верхняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/aOi5Z5E.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -100", OffsetMax = "166 -80"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /info"
}
, Text = {
Text = ""
}
}
, Layer4);
//Средняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/X2eIqph.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -144", OffsetMax = "166 -121"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/NggFqf1.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -187", OffsetMax = "166 -165"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /2"
}
, Text = {
Text = ""
}
}
, Layer4);
//Привилегии
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/dOP2G40.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "140 -232", OffsetMax = "166 -205"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /4"
}
, Text = {
Text = ""
}
}
, Layer4);
CuiHelper.AddUi(player, container);
}
#region OneUi
private void OneUI(BasePlayer player) {
CuiHelper.DestroyUi(player, Layer4);
var container = new CuiElementContainer();
container.Add(new CuiPanel {
CursorEnabled = true, RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1"
}
, Image = {
Color = "0 0 0 0", Sprite = "Assets/Content/UI/UI.Background.Tile.psd", Material = "assets/content/ui/uibackgroundblur.mat", FadeIn = 0.5f
}
, FadeOut = 0f
}
, "Overlay", Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "4 -1000", OffsetMax = "1301 -71"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1128 -71", OffsetMax = "1301 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "П Р А В И Л А", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 28, Align = TextAnchor.UpperCenter
}
, new CuiOutlineComponent {
Distance = "1 1", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "172 -71", OffsetMax = "1128 -35"
}
}
}
);
//фон текста
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "0.59 0.32 0.32 0.8"
}
, Text = {
Text = ""
}
}
, Layer4);
//Текст1
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "\n <color=#E0E0E0>ОСНОВНОЕ</color> <color=red>ЗАПРЕЩЕНО</color>\n\n\n\n\n\n\n <color=#E0E0E0>ДОНАТ</color> <color=lime>РАЗРЕШЕНО</color>", Font = "robotocondensed-bold.ttf", Color = "0.98 0.65 0.40 1", FontSize = 35, Align = TextAnchor.UpperLeft
}
, new CuiOutlineComponent {
Distance = "0.5 0.5", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -640", OffsetMax = "1128 -71"
}
}
}
);
//Текст Общие положения
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -400", OffsetMax = "570 -152"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=#E0E0E0>●</color> Администрация не играет на сервере, не выдает ресурсы, не удаляет дома.\n<color=#E0E0E0>●</color> Администрация может выключить, перезапустить сервер без предупреждения игроков.\n<color=#E0E0E0>●</color> Администрация не восстанавливает вещи в случае убийства, бага, отката, вайпа, обмана и т.п.\n<color=#E0E0E0>●</color> Незнание правил не освобождает от ответственности.\n<color=#E0E0E0>●</color> В любой момент админ/модер может вызвать Вас на проверку.\n<color=#E0E0E0>●</color> Отказ от проверки/игнор/отсутствие контактов - бан.", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 14, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст запрещено
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "735 -400", OffsetMax = "1118 -152"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=red>●</color> Использование неигровых преимуществ (читы, баги, макросы) и их освещение.\n<color=red>●</color> Реклама в любом виде, спам или хейтерство по отношению к серверу/администрации.\n<color=red>●</color> Бессмысленная застройка сервера, а также возведение огромных домов, влияющих на производительность сервера.\n<color=red>●</color> Раздавать любые вещи другим игрокам по любым причинам.\n<color=red>●</color> Превышение лимита совместной игры более 3-х человек в команде.\n<color=red>●</color> Выдавать себя за администрацию или пытаться ее обмануть.", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 14, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст донат
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -640", OffsetMax = "570 -430"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=#E0E0E0>●</color> Донат является добровольным пожертвованием и не подлежит возврату.\n<color=#E0E0E0>●</color> Активация приобретенных товаров и услуг производится в чате сервера командой /store\n<color=#E0E0E0>●</color> Активированные услуги выдаются на срок и не деактивируются после вайпа\n<color=#E0E0E0>●</color> Администрация не несет ответственности за донат игроков в пользу сторонних лиц/сайтов.\n<color=#E0E0E0>●</color> Администрация не несет ответственности за ваши ошибки при оплате и другие причины на стороне игрока.", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 14, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Текст разрешено
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "735 -640", OffsetMax = "1112 -430"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=lime>●</color> игра с другими игроками без превышения лимита в 3 человека.\n<color=lime>●</color> использование нецензурной брани в разумных пределах.\n<color=lime>●</color> оккупация и застройка, в том числе шкафами построек других игроков.\n<color=lime>●</color> гриферство (обман) других игроков с целью получения лута.\n<color=lime>●</color> двойной проклик при стрельбе и изменение консольных настроек клиента.", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 14, Align = TextAnchor.UpperLeft
}
}
, Layer4);
//Верхняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -75", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Левая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "176 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -636"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Правая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1124 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Кнопка закрыть
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 0", AnchorMax = "1 1", OffsetMin = "0 -1000", OffsetMax = "1290 0"
}
, Button = {
Color = "1 0.89 0.77 0", Close = Layer4
}
, Text = {
Text = ""
}
}
, Layer4);
//Верхняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/aOi5Z5E.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -100", OffsetMax = "166 -80"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /info"
}
, Text = {
Text = ""
}
}
, Layer4);
//Средняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/X2eIqph.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -144", OffsetMax = "166 -121"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/NggFqf1.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -187", OffsetMax = "166 -165"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /2"
}
, Text = {
Text = ""
}
}
, Layer4);
//Привилегии
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/dOP2G40.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "140 -232", OffsetMax = "166 -205"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /4"
}
, Text = {
Text = ""
}
}
, Layer4);
CuiHelper.AddUi(player, container);
}
#region TwoUi
private void TwoUI(BasePlayer player) {
CuiHelper.DestroyUi(player, Layer4);
var container = new CuiElementContainer();
container.Add(new CuiPanel {
CursorEnabled = true, RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1"
}
, Image = {
Color = "0 0 0 0", Sprite = "Assets/Content/UI/UI.Background.Tile.psd", Material = "assets/content/ui/uibackgroundblur.mat", FadeIn = 0.5f
}
, FadeOut = 0f
}
, "Overlay", Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "4 -1000", OffsetMax = "1301 -71"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1128 -71", OffsetMax = "1301 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "К О М А Н Д Ы", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 28, Align = TextAnchor.UpperCenter
}
, new CuiOutlineComponent {
Distance = "1 1", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "172 -71", OffsetMax = "1128 -35"
}
}
}
);
//фон текста
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "0.59 0.32 0.32 0.8"
}
, Text = {
Text = ""
}
}
, Layer4);
//Текст
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "\nИСПОЛЬЗУЙТЕ В ЧАТЕ:", Font = "robotocondensed-bold.ttf", Color = "0.88 0.88 0.88 1", FontSize = 35, Align = TextAnchor.UpperCenter
}
, new CuiOutlineComponent {
Distance = "0.5 0.5", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "172 -640", OffsetMax = "1128 -71"
}
}
}
);
//Текст команды
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = $"0 1", OffsetMin = "188 -640", OffsetMax = "1118 -152"
}
, Button = {
Color = "1 0 0 0"
}
, Text = {
Text = "\n<color=#E0E0E0> /STORE</color> ЗАБРАТЬ ТОВАРЫ С САЙТА <color=yellow>$</color>\n<color=#E0E0E0> /TPR НИК</color> ОТПРАВИТЬ ЗАПРОС ТЕЛЕПОРТА К ИГРОКУ.\n<color=#E0E0E0> /HOME</color> УПРАВЛЕНИЕ ТОЧКАМИ ТЕЛЕПОРТА ДОМОЙ.\n<color=#E0E0E0> /UP</color> УЛУЧШЕНИЕ ТИРА ПОСТРОЕК.\n<color=#E0E0E0> /REMOVE</color> УДАЛЕНИЕ ПОСТРОЕК.\n<color=#E0E0E0> /TRADE</color> ОБМЕН ВЕЩАМИ НА РАССТОЯНИИ\n<color=#E0E0E0> /CLAN</color> УПРАВЛЕНИЕ КЛАНАМИ\n<color=#E0E0E0> /KIT</color> НАБОРЫ ВЕЩЕЙ <color=yellow>$</color>\n<color=#E0E0E0> /SIL</color> РИСОВАНИЕ НА ТАБЛИЧКАХ\n<color=#E0E0E0> /BLOCK</color> ВРЕМЕННЫЙ БЛОК ПРЕДМЕТОВ ПОСЛЕ ВАЙПА\n<color=#E0E0E0> /AD</color> АВТОЗАКРЫТИЕ ДВЕРЕЙ\n<color=#E0E0E0> /DUEL</color> ВЫЗВАТЬ НА ДУЭЛЬ\n<color=#E0E0E0> /CODE</color> АВТОВВОД ПАРОЛЕЙ\n<color=#E0E0E0> /INFO</color> ИНФОРМАЦИЯ О СЕРВЕРЕ (ЭТО МЕНЮ)\n<color=#E0E0E0> /BP</color> ОТКРЫТЬ РЮКЗАК <color=yellow>$</color>\n<color=#E0E0E0> /SKIN</color> СКИНЫ <color=yellow>$</color>\n<color=#E0E0E0> /REC</color> КАРМАННЫЙ ПЕРЕРАБОТЧИК <color=yellow>$</color>\n\n<color=yellow>$</color> - <color=orange>ЧАСТИЧНО/ПОЛНОСТЬЮ ПЛАТНАЯ УСЛУГА</color>", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 20, Align = TextAnchor.UpperCenter
}
}
, Layer4);
//Верхняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -75", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Левая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "176 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -636"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Правая полоса
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1124 -640", OffsetMax = "1128 -71"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Кнопка закрыть
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 0", AnchorMax = "1 1", OffsetMin = "0 -1000", OffsetMax = "1290 0"
}
, Button = {
Color = "1 0.89 0.77 0", Close = Layer4
}
, Text = {
Text = ""
}
}
, Layer4);
//Верхняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/aOi5Z5E.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -100", OffsetMax = "166 -80"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -110", OffsetMax = "172 -71"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /info"
}
, Text = {
Text = ""
}
}
, Layer4);
//Средняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/X2eIqph.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -144", OffsetMax = "166 -121"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -153", OffsetMax = "172 -114"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /1"
}
, Text = {
Text = ""
}
}
, Layer4);
//Нижняя копка (фон)
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "1 0.89 0.77 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/NggFqf1.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "142 -187", OffsetMax = "166 -165"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -196", OffsetMax = "172 -157"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /2"
}
, Text = {
Text = ""
}
}
, Layer4);
//Привилегии
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0.8 0.8 0.8 1"
}
, Text = {
Text = "", Align = TextAnchor.LowerCenter, FontSize = 10, Color = "0 0 0 1"
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiRawImageComponent {
Url = "https://i.imgur.com/dOP2G40.png", Color = "0 0 0 1"
}
, new CuiRectTransformComponent {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "140 -232", OffsetMax = "166 -205"
}
}
}
);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "133 -240", OffsetMax = "172 -201"
}
, Button = {
Color = "0 0 0 0", Command = "chat.say /4"
}
, Text = {
Text = ""
}
}
, Layer4);
CuiHelper.AddUi(player, container);
}
#region ThreeUi
private void ThreeUI(BasePlayer player) {
CuiHelper.DestroyUi(player, Layer4);
var container = new CuiElementContainer();
container.Add(new CuiPanel {
CursorEnabled = true, RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1"
}
, Image = {
Color = "0 0 0 0", Sprite = "Assets/Content/UI/UI.Background.Tile.psd", Material = "assets/content/ui/uibackgroundblur.mat", FadeIn = 0.5f
}
, FadeOut = 0f
}
, "Overlay", Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "4 -1000", OffsetMax = "1301 -71"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "172 -640", OffsetMax = "1128 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiButton {
RectTransform = {
AnchorMin = "0 1", AnchorMax = "0 1", OffsetMin = "1128 -71", OffsetMax = "1301 -6"
}
, Button = {
Color = "1 0.89 0.77 0.2"
}
, Text = {
Text = ""
}
}
, Layer4);
container.Add(new CuiElement {
Parent = Layer4, Components = {
new CuiTextComponent {
Text = "П Р И В И Л Е Г И И", Font = "robotocondensed-bold.ttf", Color = "1 0.89 0.77 1", FontSize = 28, Align = TextAnchor.UpperCenter
}
, new C
// ... [Code preview truncated due to length. Full source in attached file] ...