Add F7 as representive from SA:MP /unshowalles

This commit is contained in:
VegaZ
2018-10-26 20:02:16 +02:00
parent 5962cdff42
commit fb39ed7589
2 changed files with 27 additions and 0 deletions

View File

@@ -43,6 +43,21 @@ mp.events.add("draw", (pName, pId) => {
}); });
mp.events.add("toggleUi", (show) => {
if (show === false) {
draw = false;
mp.game.ui.displayRadar(false);
mp.game.ui.displayHud(false);
mp.gui.chat.show(false);
} else {
draw = true;
mp.game.ui.displayRadar(true);
mp.game.ui.displayHud(true);
mp.gui.chat.show(true);
}
})
//function currencyFormatDE(num) { //function currencyFormatDE(num) {
// return ('$' + num.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.')); // return ('$' + num.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.'));
//} //}

View File

@@ -7,6 +7,7 @@
//https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes //https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes
var chat = false; var chat = false;
var showGui = true;
//ENTER //ENTER
mp.keys.bind(0x0D, false, function () { mp.keys.bind(0x0D, false, function () {
@@ -15,6 +16,17 @@ mp.keys.bind(0x0D, false, function () {
} }
}); });
//F7
mp.keys.bind(0x76, false, function () {
if (showGui === true) {
showGui = false;
mp.events.call("toggleUi", false);
} else {
showGui = true;
mp.events.call("toggleUi", true);
}
});
//I //I
mp.keys.bind(0x49, false, function () { mp.keys.bind(0x49, false, function () {
if (!chat) { if (!chat) {