95 lines
1.8 KiB
JavaScript
95 lines
1.8 KiB
JavaScript
/**
|
||
* @overview Life of German Reallife - Player Keys keys.js
|
||
* @author VegaZ
|
||
* @copyright (c) 2008 - 2018 Life of German
|
||
*/
|
||
|
||
//https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes
|
||
|
||
var chat = false;
|
||
var showInventory = false;
|
||
var showGui = true;
|
||
|
||
//ENTER
|
||
mp.keys.bind(0x0D, false, function () {
|
||
if (chat === true) {
|
||
chat = false;
|
||
}
|
||
});
|
||
|
||
|
||
//F7 //Unshowalles
|
||
mp.keys.bind(0x76, false, function () {
|
||
if (showGui === true) {
|
||
showGui = false;
|
||
mp.events.call("toggleUi", false);
|
||
} else {
|
||
showGui = true;
|
||
mp.events.call("toggleUi", true);
|
||
}
|
||
});
|
||
|
||
//NUM2 //Save Blips in Edit Mode
|
||
mp.keys.bind(0x62, false, function () {
|
||
mp.events.callRemote("keyPress:NUM2");
|
||
});
|
||
|
||
//E
|
||
mp.keys.bind(0x45, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:E");
|
||
}
|
||
});
|
||
|
||
|
||
//I //Inventar
|
||
mp.keys.bind(0x49, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:I");
|
||
}
|
||
});
|
||
|
||
//J //Spielerliste
|
||
mp.keys.bind(0x4A, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:J");
|
||
//mp.events.call("showPlayerlist");
|
||
}
|
||
});
|
||
|
||
//K //Dienstkleidung
|
||
mp.keys.bind(0x4B, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:K");
|
||
}
|
||
});
|
||
|
||
//L //Türen auf / zuschließen
|
||
mp.keys.bind(0x4C, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:L");
|
||
}
|
||
});
|
||
|
||
//N //Motor Starten
|
||
mp.keys.bind(0x4E, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:N");
|
||
}
|
||
});
|
||
|
||
//T
|
||
mp.keys.bind(0x54, false, function () {
|
||
if (chat === false) {
|
||
chat = true;
|
||
}
|
||
});
|
||
|
||
//X //Anschnallen
|
||
mp.keys.bind(0x58, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:X");
|
||
}
|
||
});
|
||
|