From 9820bc3850002389e4ae16a9919c07af0c93b96a Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 02:00:54 +0200 Subject: [PATCH] =?UTF-8?q?raus=20mit=20dem=20m=C3=BCll,=20kommt=20sp?= =?UTF-8?q?=C3=A4ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Event/event.ts | 34 ------------------- .../Commands/AdminCommands.cs | 14 +------- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 ReallifeGamemode.Client/Event/event.ts diff --git a/ReallifeGamemode.Client/Event/event.ts b/ReallifeGamemode.Client/Event/event.ts deleted file mode 100644 index eafdb730..00000000 --- a/ReallifeGamemode.Client/Event/event.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as NativeUI from '../libs/NativeUI'; - -const Menu = NativeUI.Menu; -const UIMenuItem = NativeUI.UIMenuItem; -const UIMenuListItem = NativeUI.UIMenuListItem; -const UIMenuCheckboxItem = NativeUI.UIMenuCheckboxItem; -const BadgeStyle = NativeUI.BadgeStyle; -const Point = NativeUI.Point; -const ItemsCollection = NativeUI.ItemsCollection; -const Color = NativeUI.Color; - -let ggbItem = new UIMenuItem("Gut gegen Boese", ""); -ggbItem.BackColor = new Color(42, 46, 49); - -export default function createEvent(globalData: IGlobalData) { - - var eventMenu: NativeUI.Menu; - let screenRes = mp.game.graphics.getScreenResolution(0, 0); - - mp.events.add('showEventMenu', () => { - - if (!globalData.InMenu) { - globalData.InMenu = true; - - eventMenu = new Menu("Event starten", "", new Point(0, screenRes.y / 3), null, null); - eventMenu.AddItem(ggbItem); - eventMenu.Visible = true; - - eventMenu.MenuClose.on(() => { - globalData.InMenu = false; - }); - } - }); -} \ No newline at end of file diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index db79857d..d312239c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -545,18 +545,6 @@ namespace ReallifeGamemode.Server.Commands #region Admin - [Command("event", "~m~Benutzung: ~s~/event")] - public void CmdAdminEvent(Player player) - { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - - player.TriggerEvent("showEventMenu"); - } - [Command("countdown", "~m~Benutzung: ~s~/countdown [Zeit] [Text]", GreedyArg = true)] public void CmdAdminCountdown(Player player, string timer_string, string text) {