Änderung Pilot,Busfahrer und und und
This commit is contained in:
@@ -52,7 +52,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
if (user.GetUser().JobId == 4)
|
||||
{
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId.Value);
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId??-1);
|
||||
if (job.GetUsersInJob().Contains(user))
|
||||
{
|
||||
if (!user.IsInVehicle || user.VehicleSeat != 0) return;
|
||||
@@ -159,7 +159,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
}
|
||||
if (temp.LastCheckpoint != 1)
|
||||
{
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId.Value);
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId??-1);
|
||||
if (job.GetUsersInJob().Contains(user))
|
||||
{
|
||||
if (user.GetUser().JobId == 3)
|
||||
@@ -245,8 +245,15 @@ namespace ReallifeGamemode.Server.Util
|
||||
if (player.GetUser().JobId == 4)
|
||||
{
|
||||
BusDriverJob.payWage(player, 200);
|
||||
CheckPointHandle.BusCheckpoint(player);
|
||||
//CheckPointHandle.BusCheckpoint(player);
|
||||
BusDriverJob.BusLetzterCheckpoint(player);
|
||||
if (!player.IsInVehicle || player.VehicleSeat != 0) return;
|
||||
Vehicle veh = player.Vehicle;
|
||||
if (!(veh.GetData<IndicatorData>("indicatorData") is IndicatorData data)) data = new IndicatorData();
|
||||
data.Left = false;
|
||||
data.Right = false;
|
||||
veh.SetData("indicatorData", data);
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("SERVER:setIndicatorStatus", veh.Handle.Value, data.Left, data.Right);
|
||||
}
|
||||
}
|
||||
//NAPI.Chat.SendChatMessageToAll($"this.list.Count() = {this.list.Count()}, checkPointsDone = {checkPointsDone}, LastCheckpoint = {LastCheckpoint}");
|
||||
|
||||
Reference in New Issue
Block a user