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