taxijob logout fix

This commit is contained in:
2020-08-06 17:59:40 +02:00
parent a8f5e085df
commit 70e3284810

View File

@@ -53,6 +53,14 @@ namespace ReallifeGamemode.Server.Events
ChatService.BroadcastAdmin("!{#FFFF00}*** " + player.Name + " hat den Server verlassen", AdminLevel.MAPPING); ChatService.BroadcastAdmin("!{#FFFF00}*** " + player.Name + " hat den Server verlassen", AdminLevel.MAPPING);
} }
TaxiDriverJob taxiJob = JobManager.GetJob<TaxiDriverJob>();
TaxiContract taxiContract = taxiJob.TaxiContracts.Where(t => t.Name == player.Name).First();
if (taxiJob.TaxiContracts.Contains(taxiContract))
{
taxiJob.TaxiContracts.Remove(taxiContract);
}
//Vehicle LastVehicle = player.GetData<Vehicle>("LastVehicle"); //Vehicle LastVehicle = player.GetData<Vehicle>("LastVehicle");
JobBase job = JobManager.GetJob(player.GetUser().JobId ?? -1); JobBase job = JobManager.GetJob(player.GetUser().JobId ?? -1);
if (job != null) if (job != null)