Add playtime and warns in M menu
This commit is contained in:
@@ -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);
|
||||
|
||||
2
ReallifeGamemode.Client/global.d.ts
vendored
2
ReallifeGamemode.Client/global.d.ts
vendored
@@ -21,6 +21,8 @@ declare type AccountData = {
|
||||
factionVehicles: VehicleData[];
|
||||
nextPayday: number;
|
||||
stateFaction: boolean;
|
||||
playTime: number;
|
||||
userWarn: number;
|
||||
}
|
||||
|
||||
declare type VehicleData = {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user