From 8f9710688a18b56fd9ddbfedf8c049ae7236ebba Mon Sep 17 00:00:00 2001 From: kookroach Date: Wed, 21 Apr 2021 22:58:06 +0200 Subject: [PATCH] Fix BusDriver Problem needs testing --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 181b2436..b94308d6 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -440,7 +440,6 @@ namespace ReallifeGamemode.Server.Job else if (type == PROFESSIONAL) BusJobEvents.payWage(player, WAGE_PROFESSIOAL); - NAPI.Task.Run(() => { if (type == BEGINNER) @@ -451,6 +450,9 @@ namespace ReallifeGamemode.Server.Job playerRoutePair3.Remove(player.Name); playerRouteCurrent.Remove(player.Name); + if (!GetPlayerInJob().Contains(player)) + return; + BusDriverJob job = JobManager.GetJob(); StartBusRoute(player, type); }, delayTime: 10000); @@ -464,7 +466,6 @@ namespace ReallifeGamemode.Server.Job NAPI.ClientEvent.TriggerClientEventForAll("SERVER:setIndicatorStatus", veh.Handle.Value, data.Left, data.Right); } - public void BusCheckpoint(Player player) { if (!player.IsInVehicle || player.VehicleSeat != 0) return;