Änderung Pilot,Busfahrer und und und
This commit is contained in:
@@ -377,7 +377,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (nearestJobPoint != null)
|
||||
{
|
||||
if (player.Vehicle != null) return;
|
||||
Job.JobBase job = JobManager.GetJob(player.GetUser().JobId.Value);
|
||||
Job.JobBase job = JobManager.GetJob(player.GetUser().JobId ?? -1);
|
||||
JobManager jobb = new JobManager();
|
||||
if (nearestJobPoint.jobId != 3 && nearestJobPoint.jobId == player.GetUser().JobId)
|
||||
{
|
||||
@@ -405,7 +405,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (!job.GetUsersInJob().Contains(player))
|
||||
{
|
||||
player.SetData("PilotenBase", 1);
|
||||
player.SendChatMessage($"Debug PilotenJob PilotenBase1: {player.GetData<int>("PilotenBase")}");
|
||||
jobb.StartJobEvent(player);
|
||||
return;
|
||||
}
|
||||
@@ -421,7 +420,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (!job.GetUsersInJob().Contains(player))
|
||||
{
|
||||
player.SetData("PilotenBase", 2);
|
||||
player.SendChatMessage($"Debug PilotenJob PilotenBase2: {player.GetData<int>("PilotenBase")}");
|
||||
jobb.StartJobEvent(player);
|
||||
return;
|
||||
}
|
||||
@@ -569,30 +567,27 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!jV.GetJob().GetUsersInJob().Contains(player))
|
||||
if (!jV.GetJob().GetUsersInJob().Contains(player) && !player.IsAdminDuty())
|
||||
{
|
||||
player.SendNotification("~y~[JOB] ~w~Du musst den Job vorher starten!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (jV.JobId == 3)
|
||||
/*if(player.IsAdminDuty())
|
||||
{
|
||||
player.SendChatMessage("");
|
||||
}*/
|
||||
if (jV.JobId == 3 && player.GetUser().JobId == 3)
|
||||
{
|
||||
player.SendChatMessage("Debug Pilot 1");
|
||||
Job.PilotJob c = new Job.PilotJob();
|
||||
if ((VehicleHash)jV.Model == VehicleHash.Cuban800 && !state)
|
||||
{
|
||||
player.SendChatMessage("Debug Pilot 2");
|
||||
if (!player.HasData("HatRoute") || player.GetData<bool>("HatRoute") == false)
|
||||
{
|
||||
player.SendChatMessage("Debug Pilot 3");
|
||||
player.SetData("HatRoute", true);
|
||||
c.StartPilotRoute(player, "RouteStart");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendChatMessage("Debug Pilot 4");
|
||||
}
|
||||
}
|
||||
if ((VehicleHash)jV.Model == VehicleHash.Velum && !state || (VehicleHash)jV.Model == VehicleHash.Velum2 && !state)
|
||||
{
|
||||
@@ -611,7 +606,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jV.JobId == 4)
|
||||
if (jV.JobId == 4 && player.GetUser().JobId == 4)
|
||||
{
|
||||
Job.BusDriverJob c = new Job.BusDriverJob();
|
||||
if ((VehicleHash)jV.Model == VehicleHash.Bus && !state)
|
||||
|
||||
Reference in New Issue
Block a user