Made changes to key.js, inventory trade result
This commit is contained in:
@@ -127,7 +127,7 @@ mp.events.add("addItem", (item) => {
|
||||
|
||||
mp.events.add("clearTradeItems", () => {
|
||||
tradeConfirm = false;
|
||||
tradeItems = [[]];
|
||||
tradeItems.splice(0,tradeItems.length);
|
||||
tradePrize = 0;
|
||||
});
|
||||
|
||||
|
||||
@@ -62,12 +62,16 @@ mp.events.add("showPlayerInteraction", (nearPlayerArr) => {
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.PlayerInteraction = false;
|
||||
} else if (item.Text === "Schlie\u00dfen") {
|
||||
globalData.PlayerInteraction = false;
|
||||
playerInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.PlayerInteraction = false;
|
||||
}
|
||||
});
|
||||
|
||||
playerInteractionMenu.MenuClose.on(() => {
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.PlayerInteraction = false;
|
||||
});
|
||||
});
|
||||
|
||||
mp.events.add("showTradeRequest", (tradeRequesterName, tradeItemsArr, tradePrizeSent) => {
|
||||
|
||||
@@ -15,15 +15,14 @@ const player = mp.players.local;
|
||||
|
||||
//ENTER
|
||||
mp.keys.bind(0x0D, false, function () {
|
||||
if (chat === true) {
|
||||
chat = false;
|
||||
if (globalData.InChat) {
|
||||
globalData.InChat = false;
|
||||
}
|
||||
});
|
||||
|
||||
//LEFT ARROW (Interaktion mit anderen Spielern)
|
||||
mp.keys.bind(0x25, false, function () {
|
||||
if (!chat && !showInv && !globalData.PlayerInteraction) {
|
||||
if (!globalData.InChat && !showInv && !globalData.PlayerInteraction) {
|
||||
mp.events.callRemote("keyPress:LEFT_ARROW");
|
||||
}
|
||||
});
|
||||
@@ -42,14 +41,14 @@ mp.keys.bind(0x76, false, function () {
|
||||
|
||||
//NUM2 //Save Blips in Edit Mode
|
||||
mp.keys.bind(0x62, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:NUM2");
|
||||
}
|
||||
});
|
||||
|
||||
//E
|
||||
mp.keys.bind(0x45, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:E");
|
||||
}
|
||||
});
|
||||
@@ -57,7 +56,7 @@ mp.keys.bind(0x45, false, function () {
|
||||
|
||||
//I //Inventar
|
||||
mp.keys.bind(0x49, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
if (showInv === false) {
|
||||
showInv = true;
|
||||
} else {
|
||||
@@ -69,7 +68,7 @@ mp.keys.bind(0x49, false, function () {
|
||||
|
||||
//J //Spielerliste
|
||||
mp.keys.bind(0x4A, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:J");
|
||||
//mp.events.call("showPlayerlist");
|
||||
}
|
||||
@@ -77,21 +76,21 @@ mp.keys.bind(0x4A, false, function () {
|
||||
|
||||
//K //Dienstkleidung
|
||||
mp.keys.bind(0x4B, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:K");
|
||||
}
|
||||
});
|
||||
|
||||
//L //Türen auf / zuschließen
|
||||
mp.keys.bind(0x4C, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:L");
|
||||
}
|
||||
});
|
||||
|
||||
//N //Motor Starten
|
||||
mp.keys.bind(0x4E, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
if (!player.vehicle) return;
|
||||
if (player.vehicle.getSpeed() > 5) return;
|
||||
mp.events.callRemote("keyPress:N");
|
||||
@@ -100,15 +99,14 @@ mp.keys.bind(0x4E, false, function () {
|
||||
|
||||
//T
|
||||
mp.keys.bind(0x54, false, function () {
|
||||
if (chat === false && showInv === false) {
|
||||
chat = true;
|
||||
if (!globalData.InChat) {
|
||||
globalData.InChat = true;
|
||||
}
|
||||
});
|
||||
|
||||
//X //Anschnallen
|
||||
mp.keys.bind(0x58, false, function () {
|
||||
if (!chat) {
|
||||
if (!globalData.InChat) {
|
||||
mp.events.callRemote("keyPress:X");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user