From 87baaa6dc9f2d042380cf6ae13d6aaf65c20f43d Mon Sep 17 00:00:00 2001 From: Fabian Fabian Date: Tue, 12 Nov 2019 17:09:54 +0100 Subject: [PATCH] ja --- ReallifeGamemode.Client/Player/report.ts | 122 ------------------ .../ReallifeGamemode.Client.csproj | 1 - ReallifeGamemode.Server/Job/BusDriverJob.cs | 15 ++- .../Util/CheckPointHandle.cs | 5 + 4 files changed, 15 insertions(+), 128 deletions(-) delete mode 100644 ReallifeGamemode.Client/Player/report.ts diff --git a/ReallifeGamemode.Client/Player/report.ts b/ReallifeGamemode.Client/Player/report.ts deleted file mode 100644 index 666a3064..00000000 --- a/ReallifeGamemode.Client/Player/report.ts +++ /dev/null @@ -1,122 +0,0 @@ -import * as NativeUI from 'NativeUI'; -import jailList from './criminalrelease'; -import InputHelper from '../inputhelper'; - -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 screenRes = mp.game.graphics.getScreenResolution(0, 0); - -let deleteItem = new UIMenuItem("Entfernen", "Entfernt das Ticket aus der Liste"); -deleteItem.BackColor = new Color(42, 46, 49); -let saveItem = new UIMenuItem("Annehmen", "Starte direkten Chat mit dem User"); -saveItem.BackColor = new Color(13, 71, 161); -saveItem.HighlightedBackColor = new Color(25, 118, 210); - -let sendItem = new UIMenuItem("Absenden", "Sende Report an alle Admins"); -sendItem.BackColor = new Color(13, 71, 161); -sendItem.HighlightedBackColor = new Color(25, 118, 210); - -let cancelItem = new UIMenuItem("Abbrechen", ""); -cancelItem.BackColor = new Color(213, 0, 0); -cancelItem.HighlightedBackColor = new Color(229, 57, 53); - -export default function reportList(globalData: GlobalData) { - - var reportMenu: NativeUI.Menu; - - var users; - var reportTexts; - - var user = ""; - var reportText = ""; - - var reportlistBrowser: BrowserMp = null; - - //Weapon Menu - - mp.events.add('showReportMenu', (userTickets) => { - - var reportlistBrowser: BrowserMp = null; - var rList; - - mp.gui.chat.push("AHA:" + userTickets); - - if (!globalData.InMenu) { - if (reportlistBrowser === null) { - - reportlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Reportlist.html'); - mp.gui.chat.activate(false); - mp.gui.cursor.show(true, true); - rList = JSON.parse(userTickets); - rList.forEach((player) => { - //reportlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',0,0,'${JSON.stringify(player.Ping)}');`); - reportlistBrowser.execute(`ad_row('A','B',0,0,'C');`); - }); - - } else { - reportlistBrowser.destroy() - reportlistBrowser = null; - mp.gui.cursor.show(false, false); - mp.gui.chat.activate(true); - - } - } - }); - - mp.events.add('showReportType', () => { - if (!globalData.InMenu) { - - var type; - - globalData.InMenu = true; - - var types = ["Quick Report", "Ticket Report"]; - - reportMenu = new Menu("QuickReport/Ticket", "", new Point(50, 50), null, null); - var typesItem = new UIMenuListItem("Typ", "", new ItemsCollection(types)); - reportMenu.AddItem(typesItem); - - reportMenu.AddItem(sendItem); - reportMenu.AddItem(cancelItem); - reportMenu.Visible = true; - - reportMenu.ItemSelect.on((item) => { - if (item.Text === "Absenden") { - - var ticketContentBox = new InputHelper("Worin besteht dein Anliegen?", globalData); - ticketContentBox.show(); - ticketContentBox.getValue(data => { - - var type = typesItem.SelectedItem.DisplayText; - - var content = JSON.stringify(data); - - //mp.gui.chat.push(content); - //mp.gui.chat.push(type); - - mp.events.callRemote("requestReport", type, content); - mp.events.call("SERVER:CloseReportMenu"); - reportMenu.Close(); - }); - - - globalData.InMenu = false; - } else if (item.Text === "Abbrechen") { - reportMenu.Close(); - globalData.InMenu = false; - } - }); - - reportMenu.MenuClose.on(() => { - globalData.InMenu = false; - }); - } - }); -} \ No newline at end of file diff --git a/ReallifeGamemode.Client/ReallifeGamemode.Client.csproj b/ReallifeGamemode.Client/ReallifeGamemode.Client.csproj index d98e9154..e9b302cb 100644 --- a/ReallifeGamemode.Client/ReallifeGamemode.Client.csproj +++ b/ReallifeGamemode.Client/ReallifeGamemode.Client.csproj @@ -26,7 +26,6 @@ - diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 4bbd90f7..e528077e 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -131,25 +131,30 @@ namespace ReallifeGamemode.Server.Job { if (type == "Kurz 1") { - CheckPointHandle.StartCheckPointRoute(player, Route1, 3000, 1, 7, ""); + CheckPointHandle.StartCheckPointRoute(player, Route1, 3000, 1, 7, "busDriverJob"); } else if (type == "Kurz 2") { - CheckPointHandle.StartCheckPointRoute(player, Route2, 3000, 1, 7, ""); + CheckPointHandle.StartCheckPointRoute(player, Route2, 3000, 1, 7, "busDriverJob"); } else if (type == "Mittel 1") { - CheckPointHandle.StartCheckPointRoute(player, Route3, 3000, 1, 7, ""); + CheckPointHandle.StartCheckPointRoute(player, Route3, 3000, 1, 7, "busDriverJob"); } else if (type == "Lang 1") { - CheckPointHandle.StartCheckPointRoute(player, RouteLong, 3000, 1, 7, ""); + CheckPointHandle.StartCheckPointRoute(player, RouteLong, 3000, 1, 7, "busDriverJob"); } else if (type == "Lang 2") { - CheckPointHandle.StartCheckPointRoute(player, RouteVeryLong, 3000, 1, 7, ""); + CheckPointHandle.StartCheckPointRoute(player, RouteVeryLong, 3000, 1, 7, "busDriverJob"); } } + + public static void payWage(Client jobber, int wage) + { + + } } } diff --git a/ReallifeGamemode.Server/Util/CheckPointHandle.cs b/ReallifeGamemode.Server/Util/CheckPointHandle.cs index bed4fce4..f1a8a69a 100644 --- a/ReallifeGamemode.Server/Util/CheckPointHandle.cs +++ b/ReallifeGamemode.Server/Util/CheckPointHandle.cs @@ -90,6 +90,11 @@ namespace ReallifeGamemode.Server.Util if (this.list.Count() == checkPointsDone) { CheckPointHandle.RemovePlayerHandlerFromList(this.player); + + if (this.eventInCheckpoint == "busDriverJob") + { + Job.BusDriverJob.payWage(this.player, 1000); + } } }