diff --git a/ReallifeGamemode.Client/Interaction/interactionmenu.ts b/ReallifeGamemode.Client/Interaction/interactionmenu.ts index 1946fc78..3b81278e 100644 --- a/ReallifeGamemode.Client/Interaction/interactionmenu.ts +++ b/ReallifeGamemode.Client/Interaction/interactionmenu.ts @@ -226,6 +226,14 @@ export default function (globalData: IGlobalData) { menuItem.SetRightLabel(data.regDate); accountMenu.AddItem(menuItem); + menuItem = new UIMenuItem("Spielzeit"); + menuItem.SetRightLabel(data.playTime + "h"); + accountMenu.AddItem(menuItem); + + menuItem = new UIMenuItem("Verwarnungen"); + menuItem.SetRightLabel("~r~" + data.userWarn); + accountMenu.AddItem(menuItem); + menuItem = new UIMenuItem("Adminrang"); menuItem.SetRightLabel(data.adminLevel); accountMenu.AddItem(menuItem); diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index 44ec321c..266c36d6 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -21,6 +21,8 @@ declare type AccountData = { factionVehicles: VehicleData[]; nextPayday: number; stateFaction: boolean; + playTime: number; + userWarn: number; } declare type VehicleData = { diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 47008c2e..703b4916 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -151,7 +151,9 @@ namespace ReallifeGamemode.Server.Events licenses, vehicles, factionVehicles, - nextPayday = u.PaydayTimer + nextPayday = u.PaydayTimer, + playTime = u.PlayedMinutes / 60, + userWarn = u.warn, }; string faction = u.Faction?.Name ?? "Zivilist";