renewed and improved busdriver job system, paaqo is not amused
This commit is contained in:
@@ -10,7 +10,8 @@ export default function checkpointHandle(globalData: GlobalData) {
|
||||
var inCheckpoint = false;
|
||||
|
||||
mp.events.add('setCheckPoint', (position, player) => {
|
||||
mp.gui.chat.push("exec");
|
||||
mp.gui.chat.push("jaha");
|
||||
inCheckpoint = false;
|
||||
posCp = position;
|
||||
Player = player;
|
||||
activeCheckpoint = mp.markers.new(1, posCp, 3.0, {
|
||||
@@ -19,6 +20,8 @@ export default function checkpointHandle(globalData: GlobalData) {
|
||||
dimension: 0
|
||||
});
|
||||
|
||||
//mp.events.call("SERVER:Util_setWaypoint", posCp.X, posCp.Z);
|
||||
mp.game.ui.setNewWaypoint(posCp.x, posCp.y);
|
||||
myVar = setInterval(myTimer, 100);
|
||||
});
|
||||
|
||||
@@ -26,7 +29,10 @@ export default function checkpointHandle(globalData: GlobalData) {
|
||||
let dist = mp.game.gameplay.getDistanceBetweenCoords(Player.position.x, Player.position.y, 0, posCp.x, posCp.y, 0, false);
|
||||
|
||||
if (dist <= 2 && !inCheckpoint) {
|
||||
mp.game.audio.playSoundFrontend(1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
|
||||
inCheckpoint = true;
|
||||
activeCheckpoint.visible = false;
|
||||
clearInterval(myVar);
|
||||
mp.events.callRemote("playerInCheckpoint");
|
||||
} else if (dist > 2) {
|
||||
inCheckpoint = false;
|
||||
|
||||
Reference in New Issue
Block a user