added new bus route

This commit is contained in:
2019-09-16 15:20:15 +02:00
parent b3d3d4550d
commit e075ece48a
2 changed files with 22 additions and 1 deletions

View File

@@ -34,10 +34,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); 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); //mp.gui.chat.push("delay: " + delay + " | delayCounter: " + delayCounter);
if (dist <= 2) { if (dist <= 2) {
mp.game.audio.playSoundFrontend(1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
if (!inCheckpoint) { if (!inCheckpoint) {
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; inCheckpoint = true;

View File

@@ -41,6 +41,22 @@ namespace ReallifeGamemode.Server.Job
new Vector3(235.0964, -857.1152, 29.74256), new Vector3(235.0964, -857.1152, 29.74256),
}.AsReadOnly(); }.AsReadOnly();
private readonly IReadOnlyCollection<Vector3> Route3 = new List<Vector3>
{
new Vector3(313.7626,-647.1252,28.6658),
new Vector3(28.84793,-543.386,35.42649),
new Vector3(120.2759,-195.0664,53.98029),
new Vector3(459.6921,116.3203,98.18157),
new Vector3(173.9451,220.1987,105.4178),
new Vector3(-327.3175,261.2248,85.86708),
new Vector3(-764.2745,294.4415,8500808),
new Vector3(-1031.586,107.9002,52.30307),
new Vector3(-489.973,-195.4356,36.59651),
new Vector3(-224.4042,-528.0254,34.08064),
new Vector3(-245.7707,-714.5482,32.90899),
new Vector3(-248.9475,-883.7717,30.00919),
}.AsReadOnly();
public BusDriverJob() public BusDriverJob()
{ {
JobStart += BusDriverJob_JobStart; JobStart += BusDriverJob_JobStart;
@@ -51,6 +67,7 @@ namespace ReallifeGamemode.Server.Job
List<String> listRouteTexts = new List<string>(); List<String> listRouteTexts = new List<string>();
listRouteTexts.Add("Kurz 1"); listRouteTexts.Add("Kurz 1");
listRouteTexts.Add("Kurz 2"); listRouteTexts.Add("Kurz 2");
listRouteTexts.Add("Mittel 1");
player.TriggerEvent("showBusRouteMenu", JsonConvert.SerializeObject(listRouteTexts)); player.TriggerEvent("showBusRouteMenu", JsonConvert.SerializeObject(listRouteTexts));
} }
@@ -64,6 +81,10 @@ namespace ReallifeGamemode.Server.Job
} else if (type == "Kurz 2") } else if (type == "Kurz 2")
{ {
CheckPointHandle.StartCheckPointRoute(player, Route2, 3000, 1); CheckPointHandle.StartCheckPointRoute(player, Route2, 3000, 1);
} else if (type == "Mittel 1")
{
ChatService.Broadcast("mittel 1 start");
CheckPointHandle.StartCheckPointRoute(player, Route3, 3000, 1);
} }
} }