Small fix in Interaction
This commit is contained in:
@@ -42,7 +42,7 @@ const Color = NativeUI.Color;
|
||||
mp.events.add("showPlayerInteraction", (nearPlayerArr) => {
|
||||
mp.gui.chat.activate(false);
|
||||
nearbyPlayers = JSON.parse(nearPlayerArr);
|
||||
|
||||
playerInteractionMenu.Visible = true;
|
||||
let playerInteractionMenu = new Menu("Spielerinteraktion", "", new Point(0, screenRes.y / 2));
|
||||
let playerSelect = new UIMenuListItem("Mit", "~y~W\u00e4hle den Spieler aus.", new ItemsCollection(nearbyPlayers));
|
||||
playerInteractionMenu.AddItem(playerSelect);
|
||||
@@ -52,16 +52,14 @@ mp.events.add("showPlayerInteraction", (nearPlayerArr) => {
|
||||
cancelItem.BackColor = new Color(213, 0, 0);
|
||||
cancelItem.HighlightedBackColor = new Color(229, 57, 53);
|
||||
playerInteractionMenu.AddItem(cancelItem);
|
||||
|
||||
playerInteractionMenu.Visible = true;
|
||||
|
||||
|
||||
playerInteractionMenu.ItemSelect.on((item) => {
|
||||
if (item.Text === "Handeln") {
|
||||
mp.events.callRemote("openTradeInventory", playerSelect.SelectedValue);
|
||||
playerInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.PlayerInteraction = false;
|
||||
} else if (item.Text === "Abbrechen") {
|
||||
} else if (item.Text === "Schlie\u00dfen") {
|
||||
globalData.PlayerInteraction = false;
|
||||
playerInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
|
||||
Reference in New Issue
Block a user