Initial commit for player keys
This commit is contained in:
37
Client/Player/keys.js
Normal file
37
Client/Player/keys.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @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");
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user