add repair at tuningmenu and fix Medic anzeige wenn tot im Fahrzeug

This commit is contained in:
Michael
2020-06-16 21:18:15 +02:00
parent a28d2d4060
commit b2f75801cf
2 changed files with 16 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ const Menu = NativeUI.Menu;
const UIMenuItem = NativeUI.UIMenuItem;
const BadgeStyle = NativeUI.BadgeStyle;
const Point = NativeUI.Point;
const Color = NativeUI.Color;
import vehicleColors from './colors';
@@ -170,6 +171,11 @@ export default function tuning(globalData: IGlobalData) {
mainMenu = new Menu("Fahrzeugwerkstatt", carName, new Point(50, 50), null, null);
var repairItem = new UIMenuItem("Fahrzeug reparieren");
mainMenu.AddItem(repairItem);
repairItem.BackColor = new Color(94, 94, 94);
repairItem.HighlightedBackColor = new Color(105, 105, 105);
var currentMod = new Array<number>();
var currentActiveModItem = new Array<NativeUI.UIMenuItem>();
@@ -284,6 +290,14 @@ export default function tuning(globalData: IGlobalData) {
});
});
mainMenu.ItemSelect.on((item: NativeUI.UIMenuItem, index: number) => {
if (item === repairItem) {
mp.events.callRemote("repairVehicle");
};
});
mainMenu.Visible = true;
mainMenu.MenuClose.on(() => {