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);
|
menuItem.SetRightLabel(data.regDate);
|
||||||
accountMenu.AddItem(menuItem);
|
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 = new UIMenuItem("Adminrang");
|
||||||
menuItem.SetRightLabel(data.adminLevel);
|
menuItem.SetRightLabel(data.adminLevel);
|
||||||
accountMenu.AddItem(menuItem);
|
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[];
|
factionVehicles: VehicleData[];
|
||||||
nextPayday: number;
|
nextPayday: number;
|
||||||
stateFaction: boolean;
|
stateFaction: boolean;
|
||||||
|
playTime: number;
|
||||||
|
userWarn: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare type VehicleData = {
|
declare type VehicleData = {
|
||||||
|
|||||||
@@ -151,7 +151,9 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
licenses,
|
licenses,
|
||||||
vehicles,
|
vehicles,
|
||||||
factionVehicles,
|
factionVehicles,
|
||||||
nextPayday = u.PaydayTimer
|
nextPayday = u.PaydayTimer,
|
||||||
|
playTime = u.PlayedMinutes / 60,
|
||||||
|
userWarn = u.warn,
|
||||||
};
|
};
|
||||||
|
|
||||||
string faction = u.Faction?.Name ?? "Zivilist";
|
string faction = u.Faction?.Name ?? "Zivilist";
|
||||||
|
|||||||
Reference in New Issue
Block a user