Show house owner name when house has owner

This commit is contained in:
hydrant
2019-07-30 10:39:10 +02:00
parent 436902ca57
commit 63cb557d66
2 changed files with 10 additions and 5 deletions

View File

@@ -20,8 +20,6 @@ export default function house(globalData: GlobalData) {
mp.game.ui.addTextComponentSubstringPlayerName('Drücke ~INPUT_CONTEXT~, um das Hausmenü öffnen');
mp.game.ui.displayHelpTextFromStringLabel(0, true, true, -1);
mp.keys.bind(0x45, false, keyPressHandler);
keyBound = true;
});
@@ -29,7 +27,13 @@ export default function house(globalData: GlobalData) {
function keyPressHandler() {
mp.gui.chat.push("open menu");
mp.game.ui.clearHelp(true);
houseMenu = new Menu("Hausverwaltung", houseData.Type, new Point(50, 50), null, null);
var subTitle = houseData.Type;
if (houseData.OwnerName) {
subTitle += " von " + houseData.OwnerData;
}
houseMenu = new Menu("Hausverwaltung", subTitle, new Point(50, 50), null, null);
globalData.InMenu = true;
mp.gui.chat.push(houseState.toString());