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,7 +202,9 @@ namespace ReallifeGamemode.Server.Managers
{
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(job.CheckVehicle(player, veh))
{
if (!playerTimersJobVehicleRespawn.ContainsKey(player))
return;
@@ -210,6 +212,13 @@ namespace ReallifeGamemode.Server.Managers
playerTimersJobVehicleRespawn[player].Stop();
playerTimersJobVehicleRespawn.Remove(player);
}
else
{
player.StopAnimation();
player.WarpOutOfVehicle();
player.Position = player.Position.Add(new Vector3(0, 0, 2.0f));
}
}
}
[ServerEvent(Event.PlayerEnterVehicleAttempt)]