Weaponschein im Interaktionsmenü anzeigen
This commit is contained in:
@@ -181,12 +181,20 @@ export default function (globalData: GlobalData) {
|
||||
}
|
||||
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.Visible = false;
|
||||
|
||||
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);
|
||||
input.show();
|
||||
input.getValue(name => {
|
||||
|
||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -33,6 +33,7 @@ declare interface Licenses {
|
||||
drivingLicenseCar: boolean;
|
||||
drivingLicenseBike: boolean;
|
||||
flightLicensePlane: boolean;
|
||||
weaponLicense: boolean;
|
||||
}
|
||||
|
||||
declare interface FactionRanks {
|
||||
|
||||
@@ -16,12 +16,16 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
||||
[JsonProperty("flightLicensePlane")]
|
||||
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.BikeLicense = BikeLicense;
|
||||
this.PlaneLicense = PlaneLicense;
|
||||
this.WeaponLicense = weaponLicense;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
Paycheck paycheck = null;
|
||||
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user