Nachträgliche Migrationsänderung

This commit is contained in:
Mac_Slash
2020-04-28 18:53:22 +02:00
parent d7f45de417
commit bba265f9d9
11 changed files with 413 additions and 124 deletions

View File

@@ -483,7 +483,10 @@ namespace ReallifeGamemode.Server.Events
}
else if (sV is FactionVehicle fV)
{
if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
{
}
else if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !(u.IsAdmin(AdminLevel.HEADADMIN)))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
@@ -491,7 +494,10 @@ namespace ReallifeGamemode.Server.Events
}
else if (sV is GroupVehicle gV)
{
if (gV.GroupId != u.Group.Id && !state && !u.IsAdmin(AdminLevel.ADMIN3))
if (u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
{
}
else if (gV.GroupId != u.Group.Id && !state && !u.IsAdmin(AdminLevel.ADMIN3))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
@@ -499,56 +505,73 @@ namespace ReallifeGamemode.Server.Events
}
else if (sV is JobVehicle jV)
{
if (!jV.GetJob().GetUsersInJob().Contains(player) && !u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
}
if(player.IsAdminDuty())
//if (jV.GetJob().GetUsersInJob().Contains(player))
if (u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
{
}
else
else if (jV.GetJob().Id == u.JobId)
{
if (u.JobId == 4)
{
if (v.Model == (uint)Types.VehicleModel.Coach)
{
if (u.JobId == 3)
{
if (u.BusSkill < 300)
if (v.Model == (uint)Types.VehicleModel.Cuban800)
{
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
return;
}
else
if (v.Model == (uint)Types.VehicleModel.Velum || v.Model == (uint)Types.VehicleModel.Velum2)
{
if (u.PilotSkill < 300)
{
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
return;
}
else
{
}
}
}
if (v.Model == (uint)Types.VehicleModel.Tourbus)
if (u.JobId == 4)
{
if (u.BusSkill < 800)
if (v.Model == (uint)Types.VehicleModel.Coach)
{
player.SendNotification("~r~Dein Skilllevel(3) ist nicht hoch genug!");
return;
if (u.BusSkill < 300)
{
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
return;
}
else
{
}
}
else
if (v.Model == (uint)Types.VehicleModel.Tourbus)
{
if (u.BusSkill < 800)
{
player.SendNotification("~r~Dein Skilllevel(3) ist nicht hoch genug!");
return;
}
else
{
}
}
}
}
}
}
else if (sV is UserVehicle uV)
{
if (uV.UserId != u.Id)
else
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
}
}
else if (sV is JobVehicle)
else if (sV is UserVehicle uV)
{
return;
if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
{
}
else if (uV.UserId != u.Id && !u.IsAdmin(AdminLevel.HEADADMIN))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
}
}
}
VehicleStreaming.SetEngineState(v, !state);