new busroute added
This commit is contained in:
@@ -35,6 +35,11 @@ export default function checkpointHandle(globalData: GlobalData) {
|
||||
myVar = setInterval(myTimer, 100);
|
||||
});
|
||||
|
||||
mp.events.add('destroyCP', () => {
|
||||
activeCheckpoint.destroy();
|
||||
clearInterval(myVar);
|
||||
});
|
||||
|
||||
function myTimer() {
|
||||
let dist = mp.game.gameplay.getDistanceBetweenCoords(Player.position.x, Player.position.y, 0, posCp.x, posCp.y, 0, false);
|
||||
//mp.gui.chat.push("delay: " + delay + " | delayCounter: " + delayCounter);
|
||||
@@ -49,7 +54,7 @@ export default function checkpointHandle(globalData: GlobalData) {
|
||||
inCheckpoint = true;
|
||||
|
||||
if (delayCounter >= delay) {
|
||||
activeCheckpoint.visible = false;
|
||||
activeCheckpoint.destroy();
|
||||
clearInterval(myVar);
|
||||
mp.events.callRemote("playerInCheckpoint");
|
||||
if (event != "") {
|
||||
|
||||
Reference in New Issue
Block a user