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

FREE ZealStatistics : 1.0.8 1.0.8

Нет прав для скачивания
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using Rust;
using Newtonsoft.Json;
using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;
using System.Globalization;
using Color = UnityEngine.Color;

namespace Oxide.Plugins
{
    [Info("ZealStatistics", "Kira", "1.0.8")]
    [Description("Плагин сбора статистики для сервера Rust.")]
    class ZealStatistics : RustPlugin
    {
        #region [Reference] / [Запросы]

        [PluginReference] Plugin ImageLibrary;
        private StoredData DataBase = new StoredData();

        private string GetImg(string name)
        {
            return (string) ImageLibrary?.Call("GetImage", name) ?? "";
        }

        #endregion

        #region [Configuraton] / [Конфигурация]

        static public ConfigData config;

        public class ConfigData
        {
            [JsonProperty(PropertyName = "ZealStatistics")]
            public GUICFG ZealStatistics = new GUICFG();

            public class GUICFG
            {
                [JsonProperty(PropertyName = "Allow viewing other people's statistics?")]
                public bool info;
            }
        }

        public ConfigData GetDefaultConfig()
        {
            return new ConfigData
            {
                ZealStatistics = new ConfigData.GUICFG
                {
                    info = true
                }
            };
        }

        protected override void LoadConfig()
        {
            base.LoadConfig();

            try
            {
                config = Config.ReadObject<ConfigData>();
            }
            catch
            {
                LoadDefaultConfig();
            }

            SaveConfig();
        }

        protected override void LoadDefaultConfig()
        {
            PrintError("The configuration file is damaged (or does not exist), a new...");
            config = GetDefaultConfig();
        }

        protected override void SaveConfig()
        {
            Config.WriteObject(config);
        }

        #endregion

        #region [Dictionary/Vars] / [Словари/Переменные]

        public ulong state1;
        public ulong state2;
        public ulong state3;
        public ulong state4;
        public ulong state5;

        private string Sharp = "assets/content/ui/ui.background.tile.psd";
        private string Blur = "assets/content/ui/uibackgroundblur.mat";
        private string radial = "assets/content/ui/ui.background.transparent.radial.psd";
        private string regular = "robotocondensed-regular.ttf";
        public ulong LastDamagePlayer;

        public class Filter
        {
            public string Name;
            public int Number;
        }

        public List<Filter> Filters = new List<Filter>
        {
            new Filter
            {
                Name = $"STATS_SKILL",
                Number = 0
            },
            new Filter
            {
                Name = $"STATS_SDEATH",
                Number = 1
            },
            new Filter
            {
                Name = $"STATS_SKILLINGANIMALS",
                Number = 2
            },
            new Filter
            {
                Name = $"STATS_SSULFUR",
                Number = 3
            },
            new Filter
            {
                Name = $"STATS_SSTONE",
                Number = 4
            },
            new Filter
            {
                Name = $"STATS_SMETAL",
                Number = 5
            },
            new Filter
            {
                Name = $"STATS_SWOOD",
                Number = 6
            },
            new Filter
            {
                Name = $"STATS_SHELI",
                Number = 7
            },
            new Filter
            {
                Name = $"STATS_STANK",
                Number = 8
            },
            new Filter
            {
                Name = $"STATS_STIME",
                Number = 9
            }
        };

        #endregion

        #region [Localization] / [Локализация]

        private new void LoadDefaultMessages()
        {
            PrintWarning("Load Lang file...");
            timer.In(2.5f, () =>
            {
                Dictionary<string, string> LangEN = new Dictionary<string, string>
                {
                    ["STATS_KILLS"] = "Kills",
                    ["STATS_DEATHS"] = "Deaths",
                    ["STATS_ANIMALKILLS"] = "Killing animals",
                    ["STATS_DTANK"] = "Tanks destroyed",
                    ["STATS_DHELI"] = "Helicopters destroyed",
                    ["STATS_PSULFUR"] = "Sulfur produced",
                    ["STATS_PWOOD"] = "Wood produced",
                    ["STATS_PMETALL"] = "Mined metal",
                    ["STATS_PSTONE"] = "Quarried stone",
                    ["STATS_PTIME"] = "Time playing",
                    ["STATS_GOTOGENERAL"] = "Go to general statistics",
                    ["STATS_GOTODASHBOARD"] = "Statistics Dashboard",
                    ["STATS_GOTOPERSONAL"] = "Go to personal statistics",
                    ["STATS_GENERALSTATISTIC"] = "General statistics",
                    ["STATS_SORT"] = "Sort by",
                    ["STATS_INFO"] = "Info",
                    ["STATS_PSTATS"] = "Player stats",
                    ["STATS_SKILL"] = "● The killings",
                    ["STATS_SDEATH"] = "● To death",
                    ["STATS_SKILLINGANIMALS"] = "● Killing animals",
                    ["STATS_SSULFUR"] = "● Sulfur mining",
                    ["STATS_SSTONE"] = "● Stone mining",
                    ["STATS_SMETAL"] = "● Metal mining",
                    ["STATS_SWOOD"] = "● Wood mining",
                    ["STATS_SHELI"] = "● Destroyed helicopters",
                    ["STATS_STANK"] = "● Destroyed tanks",
                    ["STATS_STIME"] = "● Playing times",
                    ["STATS_BLOCKDATA"] = "Choose a player to block data collection for him"
                };
                
                Dictionary<string, string> LangRU = new Dictionary<string, string>
                {
                    ["STATS_KILLS"] = "Убийства",
                    ["STATS_DEATHS"] = "Смертей",
                    ["STATS_ANIMALKILLS"] = "Убийств животных",
                    ["STATS_DTANK"] = "Уничтожено танков",
                    ["STATS_DHELI"] = "Уничтожено вертолётов",
                    ["STATS_PSULFUR"] = "Добыто серы",
                    ["STATS_PWOOD"] = "Добыто дерева",
                    ["STATS_PMETALL"] = "Добыто металла",
                    ["STATS_PSTONE"] = "Добыто камня",
                    ["STATS_PTIME"] = "Наигранно времени",
                    ["STATS_GOTOGENERAL"] = "ПЕРЕЙТИ В ОБЩУЮ СТАТИСТИКУ",
                    ["STATS_GOTODASHBOARD"] = "ПАНЕЛЬ УПРАВЛЕНИЯ СТАТИСТИКОЙ",
                    ["STATS_GOTOPERSONAL"] = "ПЕРЕЙТИ В ЛИЧНУЮ СТАТИСТИКУ",
                    ["STATS_GENERALSTATISTIC"] = "ОБЩАЯ СТАТИСТИКА",
                    ["STATS_SORT"] = "ОТСОРТИРОВАТЬ ПО",
                    ["STATS_INFO"] = "ИНФО",
                    ["STATS_PSTATS"] = "СТАТИСТИКА ИГРОКА",
                    ["STATS_SKILL"] = "● Убийствам",
                    ["STATS_SDEATH"] = "● Смертям",
                    ["STATS_SKILLINGANIMALS"] = "● Убийствам животных",
                    ["STATS_SSULFUR"] = "● Добыче серы",
                    ["STATS_SSTONE"] = "● Добыче камня",
                    ["STATS_SMETAL"] = "● Добыче металла",
                    ["STATS_SWOOD"] = "● Добыче дерева",
                    ["STATS_SHELI"] = "● Уничтоженным вертолётам",
                    ["STATS_STANK"] = "● Уничтоженным танкам",
                    ["STATS_STIME"] = "● Наигранному времени",
                    ["STATS_BLOCKDATA"] = "Выберите игрока, чтобы заблокировать сбор данных для него"
                };

                lang.RegisterMessages(LangEN, this, "en");
                lang.RegisterMessages(LangRU, this, "ru");
                PrintWarning("Lang file loaded");
            });
        }

        #endregion

        #region [DrawUI] / [Показ UI]

        string Layer = "BoxStatistics";

        void PlayerList(BasePlayer player)
        {
            CuiElementContainer Gui = new CuiElementContainer();
            CuiHelper.DestroyUi(player, Layer);

            Gui.Add(new CuiPanel
            {
                CursorEnabled = true,
                Image =
                {
                    Color = HexToRustFormat("#000000F9"),
                    Material = Blur,
                    Sprite = radial
                },
                RectTransform =
                {
                    AnchorMin = "0 0",
                    AnchorMax = "1 1"
                }
            }, "Overlay", Layer);

            Gui.Add(new CuiButton
            {
                Button =
                {
                    Command = "close.stats",
                    Color = "0 0 0 0"
                },
                Text =
                {
                    Text = " "
                },
                RectTransform =
                {
                    AnchorMin = "0 0",
                    AnchorMax = "1 1"
                }
            }, Layer, "CloseStatistics");

            Gui.Add(new CuiElement
            {
                Name = "Zagolovok",
                Parent = Layer,
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = HexToRustFormat("#EAEAEAFF"),
                        FontSize = 35,
                        Text = lang.GetMessage("STATS_GOTODASHBOARD", this, player.UserIDString),
                        Font = regular
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.9213709",
                        AnchorMax = "1 1"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = "DescPl",
                Parent = Layer,
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = HexToRustFormat("#EAEAEAFF"),
                        FontSize = 25,
                        Text = lang.GetMessage("STATS_BLOCKDATA", this, player.UserIDString),
                        Font = regular
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.8881495",
                        AnchorMax = "1 0.9446309"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = "BoxPlayers",
                Parent = Layer,
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.04166667 0.83425",
                        AnchorMax = "0.1536459 0.8731388"
                    }
                }
            });

            int x = 0, y = 0, num = 0;
            foreach (var plobj in BasePlayer.activePlayerList)
            {
                if (x == 8)
                {
                    x = 0;
                    y++;
                }

                string nick = plobj.displayName;
                if (DataBase.IgnorePlayers.Contains(plobj.userID))
                {
                    nick += " <color=#DE3A3A>✖</color>";
                }
                else
                {
                    nick += " <color=#62E24B>✔</color>";
                }


                Gui.Add(new CuiButton
                    {
                        Button =
                        {
                            Command = "zstats.ban " + plobj.userID,
                            Color = HexToRustFormat("#0000005A"),
                            Material = Blur,
                            FadeIn = 0.1f + (num * 0.01f)
                        },
                        Text =
                        {
                            Text = nick,
                            Align = TextAnchor.MiddleCenter,
                            Color = HexToRustFormat("#ffffff"),
                            Font = regular,
                            FontSize = 15,
                            FadeIn = 0.1f + (num * 0.01f)
                        },
                        RectTransform =
                        {
                            AnchorMin = $"{0 + (x * 1.02)} {0 - (y * 1.1)}",
                            AnchorMax = $"{1 + (x * 1.02)} {1 - (y * 1.1)}"
                        }
                    }, "BoxPlayers", "Player" + num);
                x++;
                num++;
            }

            CuiHelper.AddUi(player, Gui);
        }

        void MainGui(BasePlayer player)
        {
            CheckDataBase(player);
            CuiElementContainer Gui = new CuiElementContainer();
            var DB = DataBase.StatisticDB[player.userID];
            filter = false;

            Gui.Add(new CuiPanel
            {
                CursorEnabled = true,
                Image =
                {
                    Color = HexToRustFormat("#000000F9"),
                    Material = Blur,
                    Sprite = radial
                },
                RectTransform =
                {
                    AnchorMin = "0 0",
                    AnchorMax = "1 1"
                }
            }, "Overlay", "BoxStatistics");

            Gui.Add(new CuiButton
            {
                Button =
                {
                    Command = "close.stats",
                    Color = "0 0 0 0"
                },
                Text =
                {
                    Text = " "
                },
                RectTransform =
                {
                    AnchorMin = "0 0",
                    AnchorMax = "1 1"
                }
            }, Layer, "ButtonCloseGUI");

            Gui.Add(new CuiElement
            {
                Name = Layer + "ServerName",
                Parent = Layer,
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = HexToRustFormat("#EAEAEAFF"),
                        FontSize = 40,
                        Text = ConVar.Server.hostname,
                        Font = "robotocondensed-regular.ttf"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.9213709",
                        AnchorMax = "1 1"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiButton
            {
                Button =
                {
                    Command = "servertop",
                    Color = "0 0 0 0"
                },
                Text =
                {
                    Align = TextAnchor.MiddleCenter,
                    Color = HexToRustFormat("#EAEAEAFF"),
                    FontSize = 18,
                    Text = $"{lang.GetMessage("STATS_GOTOGENERAL", this, player.UserIDString)}\n▼"
                },
                RectTransform =
                {
                    AnchorMin = "0.3665158 0.01108896",
                    AnchorMax = "0.6329185 0.08165347"
                }
            }, Layer, "GoTop");

            if (player.IsAdmin)
            {
                Gui.Add(new CuiButton
                {
                    Button =
                    {
                        Command = "stats.manager",
                        Color = "0 0 0 0"
                    },
                    Text =
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = HexToRustFormat("#EAEAEAFF"),
                        FontSize = 18,
                        Text = $"{lang.GetMessage("STATS_GOTODASHBOARD", this, player.UserIDString)}\n▶"
                    },
                    RectTransform =
                    {
                        AnchorMin = "0.7331769 0.01108896",
                        AnchorMax = "1 0.08165347"
                    }
                }, Layer, "GoStatisticsManager");
            }

            Gui.Add(new CuiElement
            {
                Name = Layer + "AvatarBG",
                Parent = Layer,
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#FFFFFFA4")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.4360861 0.6925457",
                        AnchorMax = "0.5627829 0.9183521"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Avatar",
                Parent = Layer,
                Components =
                {
                    new CuiRawImageComponent
                    {
                        Color = "1 1 1 1",
                        Png = GetImg(player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.4372173 0.6945619",
                        AnchorMax = "0.5616518 0.9163328"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Sprite",
                Parent = Layer + "Avatar",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#000000AA"),
                        Sprite = radial
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0",
                        AnchorMax = "0.99 0.99"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Nick",
                Parent = Layer,
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = "1 1 1 1",
                        FontSize = 23,
                        Text = player.displayName,
                        Font = "robotocondensed-regular.ttf"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.3212669 0.641129",
                        AnchorMax = "0.6804298 0.6875"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line1",
                Parent = Layer,
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.3829193 0.6401247",
                        AnchorMax = "0.6193514 0.6411328"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "SteamID",
                Parent = Layer,
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        Color = "1 1 1 1",
                        FontSize = 14,
                        Text = player.UserIDString,
                        Font = "robotocondensed-regular.ttf"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.3212669 0.6088712",
                        AnchorMax = "0.6804298 0.6421358"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #region BoxValue1

            Gui.Add(new CuiElement
            {
                Name = "BoxValue1",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.1357466 0.4969758",
                        AnchorMax = "0.2697965 0.5977818"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName1",
                Parent = "BoxValue1",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_KILLS", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line2",
                Parent = "BoxValue1",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.5000047"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value1",
                Parent = "BoxValue1",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.Kills.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue2

            Gui.Add(new CuiElement
            {
                Name = "BoxValue2",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.2828054 0.4969758",
                        AnchorMax = "0.4168553 0.5977818"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName2",
                Parent = "BoxValue2",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_DEATHS", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line3",
                Parent = "BoxValue2",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.5000047"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value2",
                Parent = "BoxValue2",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.Death.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue3

            Gui.Add(new CuiElement
            {
                Name = "BoxValue3",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.4298643 0.4969758",
                        AnchorMax = "0.5639175 0.5977818"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName3",
                Parent = "BoxValue3",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_ANIMALKILLS", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line4",
                Parent = "BoxValue3",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.5000047"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value3",
                Parent = "BoxValue3",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.AnimalKills.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue4

            Gui.Add(new CuiElement
            {
                Name = "BoxValue4",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.5769231 0.4969758",
                        AnchorMax = "0.7109792 0.5977818"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName4",
                Parent = "BoxValue4",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 17,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_DTANK", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line5",
                Parent = "BoxValue4",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.5000047"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value4",
                Parent = "BoxValue4",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.BradleyKills.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue5

            Gui.Add(new CuiElement
            {
                Name = "BoxValue5",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.7239819 0.4969758",
                        AnchorMax = "0.8580387 0.5977818"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName5",
                Parent = "BoxValue5",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 17,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_DHELI", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line6",
                Parent = "BoxValue5",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.5000047"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value5",
                Parent = "BoxValue5",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.HeliKills.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue6

            Gui.Add(new CuiElement
            {
                Name = "BoxValue6",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.2092738 0.3669356",
                        AnchorMax = "0.343323 0.4677444"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName6",
                Parent = "BoxValue6",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_PSULFUR", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line7",
                Parent = "BoxValue6",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.4900044"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value6",
                Parent = "BoxValue6",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.Sulfur.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue7

            Gui.Add(new CuiElement
            {
                Name = "BoxValue7",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.3563318 0.3669356",
                        AnchorMax = "0.4903821 0.4677444"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName7",
                Parent = "BoxValue7",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_PSTONE", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line8",
                Parent = "BoxValue7",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.4900044"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value7",
                Parent = "BoxValue7",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.Stones.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue8

            Gui.Add(new CuiElement
            {
                Name = "BoxValue8",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.5033906 0.3669356",
                        AnchorMax = "0.637444 0.4677444"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName8",
                Parent = "BoxValue8",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_PMETALL", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Line9",
                Parent = "BoxValue8",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = HexToRustFormat("#CBCBCBFF")
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.01265823 0.4900047",
                        AnchorMax = "0.9873418 0.4900044"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "Value8",
                Parent = "BoxValue8",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 19,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = DB.MetalOre.ToString()
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.1499948",
                        AnchorMax = "1 0.4499854"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
                }
            });

            #endregion

            #region BoxValue9

            Gui.Add(new CuiElement
            {
                Name = "BoxValue9",
                Parent = "BoxStatistics",
                Components =
                {
                    new CuiImageComponent
                    {
                        Color = "0 0 0 0"
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0.6504495 0.3669356",
                        AnchorMax = "0.7845057 0.4677444"
                    }
                }
            });

            Gui.Add(new CuiElement
            {
                Name = Layer + "ValueName9",
                Parent = "BoxValue9",
                Components =
                {
                    new CuiTextComponent
                    {
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 18,
                        Color = HexToRustFormat("#CBCBCBFF"),
                        Text = lang.GetMessage("STATS_PWOOD", this, player.UserIDString)
                    },
                    new CuiRectTransformComponent
                    {
                        AnchorMin = "0 0.5300055",
                        AnchorMax = "1 0.8300002"
                    },
                    new CuiOutlineComponent
                    {
                        Color = HexToRustFormat("#000000AE"),
                        Distance = "0.5 0.5"
                    }
          
// ... [Code preview truncated due to length. Full source in attached file] ...

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

Другие ресурсы пользователя 15FPS

Сверху