Weaponschein im Interaktionsmenü anzeigen
This commit is contained in:
@@ -181,12 +181,20 @@ export default function (globalData: GlobalData) {
|
|||||||
}
|
}
|
||||||
licenseMenu.AddItem(menuItem);
|
licenseMenu.AddItem(menuItem);
|
||||||
|
|
||||||
|
menuItem = new UIMenuItem("Waffenschein");
|
||||||
|
if (data.weaponLicense == false) {
|
||||||
|
menuItem.SetRightLabel("~r~nicht erhalten");
|
||||||
|
} else if (data.weaponLicense == true) {
|
||||||
|
menuItem.SetRightLabel("~g~erhalten");
|
||||||
|
}
|
||||||
|
licenseMenu.AddItem(menuItem);
|
||||||
|
|
||||||
licenseMenu.AddItem(new UIMenuItem("Lizenzen an Spieler zeigen"));
|
licenseMenu.AddItem(new UIMenuItem("Lizenzen an Spieler zeigen"));
|
||||||
|
|
||||||
licenseMenu.Visible = false;
|
licenseMenu.Visible = false;
|
||||||
|
|
||||||
licenseMenu.ItemSelect.on((item, index) => {
|
licenseMenu.ItemSelect.on((item, index) => {
|
||||||
if (index === 3) {
|
if (index === 4) {
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du deine Lizenzen zeigen (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du deine Lizenzen zeigen (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
@@ -269,5 +277,5 @@ export default function (globalData: GlobalData) {
|
|||||||
|
|
||||||
return servicesMenu;
|
return servicesMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -33,6 +33,7 @@ declare interface Licenses {
|
|||||||
drivingLicenseCar: boolean;
|
drivingLicenseCar: boolean;
|
||||||
drivingLicenseBike: boolean;
|
drivingLicenseBike: boolean;
|
||||||
flightLicensePlane: boolean;
|
flightLicensePlane: boolean;
|
||||||
|
weaponLicense: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface FactionRanks {
|
declare interface FactionRanks {
|
||||||
|
|||||||
@@ -16,12 +16,16 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
[JsonProperty("flightLicensePlane")]
|
[JsonProperty("flightLicensePlane")]
|
||||||
public bool PlaneLicense { get; set; }
|
public bool PlaneLicense { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("weaponLicense")]
|
||||||
|
public bool WeaponLicense { get; set; }
|
||||||
|
|
||||||
public Licenses(bool CarLicense, bool BikeLicense, bool PlaneLicense)
|
|
||||||
|
public Licenses(bool CarLicense, bool BikeLicense, bool PlaneLicense, bool weaponLicense)
|
||||||
{
|
{
|
||||||
this.CarLicense = CarLicense;
|
this.CarLicense = CarLicense;
|
||||||
this.BikeLicense = BikeLicense;
|
this.BikeLicense = BikeLicense;
|
||||||
this.PlaneLicense = PlaneLicense;
|
this.PlaneLicense = PlaneLicense;
|
||||||
|
this.WeaponLicense = weaponLicense;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
Paycheck paycheck = null;
|
Paycheck paycheck = null;
|
||||||
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
|
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
|
||||||
|
|
||||||
Licenses licenses = new Licenses(u.DriverLicenseVehicle, u.DriverLicenseBike, u.FlyingLicensePlane);
|
Licenses licenses = new Licenses(u.DriverLicenseVehicle, u.DriverLicenseBike, u.FlyingLicensePlane, u.WeaponLicense);
|
||||||
|
|
||||||
var accountData = new
|
var accountData = new
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user