Busfahrer fix ANDERES AUTO BITTE FUNKTIONIER

This commit is contained in:
hydrant
2021-04-22 19:49:27 +02:00
parent 2e6f315309
commit 9eb42b09ed

View File

@@ -202,13 +202,22 @@ namespace ReallifeGamemode.Server.Managers
{ {
JobBase job = GetJob(player.GetUser().JobId ?? -1); JobBase job = GetJob(player.GetUser().JobId ?? -1);
if (job != null && job.GetUsersInJob().Contains(player) && job.CheckVehicle(player, veh) && seat == 0) if (job != null && job.GetUsersInJob().Contains(player) && seat == 0)
{ {
if (!playerTimersJobVehicleRespawn.ContainsKey(player)) if(job.CheckVehicle(player, veh))
return; {
if (!playerTimersJobVehicleRespawn.ContainsKey(player))
return;
playerTimersJobVehicleRespawn[player].Stop(); playerTimersJobVehicleRespawn[player].Stop();
playerTimersJobVehicleRespawn.Remove(player); playerTimersJobVehicleRespawn.Remove(player);
}
else
{
player.StopAnimation();
player.WarpOutOfVehicle();
player.Position = player.Position.Add(new Vector3(0, 0, 2.0f));
}
} }
} }