38 lines
673 B
JavaScript
38 lines
673 B
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;
|
||
|
||
//ENTER
|
||
mp.keys.bind(0x0D, false, function () {
|
||
if (chat === true) {
|
||
chat = false;
|
||
}
|
||
});
|
||
|
||
//N
|
||
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
|
||
mp.keys.bind(0x58, false, function () {
|
||
if (!chat) {
|
||
mp.events.callRemote("keyPress:X");
|
||
}
|
||
});
|