Testserver push

This commit is contained in:
2021-04-07 01:08:22 +02:00
parent e34cd3bd01
commit 52bb80a70a
9 changed files with 70 additions and 61 deletions

View File

@@ -1,7 +1,6 @@
import { IGame, IEntity } from "../game";
import game from "..";
const maxDistance = 40 * 40;
const width = 0.03;
const height = 0.0065;
@@ -27,9 +26,7 @@ const colors = [
{ id: 9, color: [0, 166, 133, alpha] }, //news
];
export default function customNametags() {
mp.nametags.enabled = false;
mp.events.add('render', (nametags) => {
@@ -67,19 +64,19 @@ export default function customNametags() {
let y2 = y + 0.042;
if (armour > 0) {
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0 , 0, 0, 200);
graphics.drawRect(x, y2, width, height, 150, 150, 150, 255);
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0, 0, 0, 200);
graphics.drawRect(x, y2, width, height, 50, 0, 0, 255);
graphics.drawRect(x - width / 2 * (1 - health), y2, width * health, height, 200, 0, 0, 200);
var x2 = x + width / 2 + border / 2;
graphics.drawRect(x, y2 + height, width + border * 2, height + border * 2, 0, 0, 0, 200);
graphics.drawRect(x, y2 + height, width, height, 200, 200, 200, 255);
graphics.drawRect(x, y2 + height, width, height, 80, 80, 80, 255);
graphics.drawRect(x - width / 2 * (1 - armour), y2 + height, width * armour, height, 255, 255, 255, 200);
}
else {
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0, 0, 0, 200);
graphics.drawRect(x, y2, width, height, 150, 150, 150, 255);
graphics.drawRect(x, y2, width, height, 50, 0, 0, 255);
graphics.drawRect(x - width / 2 * (1 - health), y2, width * health, height, 200, 0, 0, 200);
}
}

View File

@@ -6,11 +6,9 @@
//https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes
const player = mp.players.local;
export default function keys(globalData: IGlobalData) {
var showGui = true;
//ENTER
@@ -73,7 +71,6 @@ export default function keys(globalData: IGlobalData) {
}
});
//I //Inventar
mp.keys.bind(0x49, false, function () {
if (!globalData.InChat && !globalData.InTuning) {
@@ -83,9 +80,9 @@ export default function keys(globalData: IGlobalData) {
//O //Spielerliste
mp.keys.bind(0x4F, true, function () {
if (!globalData.InChat && !globalData.InTuning ) {
if (!globalData.InChat && !globalData.InTuning) {
mp.events.callRemote("keyPress:O");
//mp.events.call("showPlayerlist");
//mp.events.call("showPlayerlist");
}
});
@@ -113,7 +110,7 @@ export default function keys(globalData: IGlobalData) {
//N //Motor Starten
mp.keys.bind(0x4E, false, function () {
if (!globalData.InChat) {
mp.events.callRemote("keyPress:N");
mp.events.callRemote("keyPress:N");
}
});
@@ -143,9 +140,16 @@ export default function keys(globalData: IGlobalData) {
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
});
//H
mp.keys.bind(0x48, false, function () {
if (mp.keys.isDown(0x11)) { //CTRL
mp.events.call("keyPress:ControllH"); //hup
return;
}
});
//F2 //Noclip
mp.keys.bind(0x71, false, () => {
mp.events.callRemote("Noclip");
mp.events.callRemote("Noclip");
});
}

View File

@@ -7,6 +7,8 @@
animationSyncData.register("getArrest", "mp_arrest_paired", "crook_p2_back_right", 3760, false, 0);
animationSyncData.register("doUncuff", "mp_arresting", "a_uncuff", 5500, false, 0);
animationSyncData.register("getUncuff", "mp_arresting", "b_uncuff", 5500, false, 0);
animationSyncData.register("hup", "mp_am_hold_up", "handsup_base", -1, true, 50);
animationSyncData.register("carryBox", "anim@heists@box_carry@", "idle", -1, true, 50);
});
const animationSyncData =