[+] Start WeaponDeal-System

This commit is contained in:
Lukas Moungos
2019-09-29 21:50:17 +02:00
parent fc8922f34a
commit 8f7ba2a7b5
32 changed files with 1920 additions and 50 deletions

View File

@@ -23,7 +23,8 @@ export default function checkpointHandle(globalData: GlobalData) {
delayCounter = 0;
checkPointsDone = checkPointID;
event = nEvent;
activeCheckpoint = mp.markers.new(markerID, posCp, 3.0, {
let vectorCP = new mp.Vector3(posCp.x, posCp.y, posCp.z - 2)
activeCheckpoint = mp.markers.new(markerID, vectorCP, 4.0, {
color: [255, 0, 0, 150],
visible: true,
dimension: 0
@@ -42,14 +43,14 @@ export default function checkpointHandle(globalData: GlobalData) {
if (!inCheckpoint) {
if (delay != 0) {
mp.gui.chat.push("Warte nun " + delay / 1000 + " Sekunden");
mp.gui.chat.push("Warte nun " + delay / 1000 + " Sekunden.");
}
mp.game.audio.playSoundFrontend(1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
}
inCheckpoint = true;
if (delayCounter >= delay) {
activeCheckpoint.visible = false;
activeCheckpoint.destroy();
clearInterval(myVar);
mp.events.callRemote("playerInCheckpoint");
if (event != "") {
@@ -66,4 +67,9 @@ export default function checkpointHandle(globalData: GlobalData) {
delayCounter = 0;
}
}
mp.events.add('destroyCP', () => {
activeCheckpoint.destroy();
clearInterval(myVar);
});
}